mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-08 13:08:29 +02:00
refactor(console): attach console early
also use RAII guard to free it instead of tracking it with a member variable Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
35121f26fd
commit
ffd50e318a
10 changed files with 79 additions and 80 deletions
|
|
@ -33,13 +33,23 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "Application.h"
|
||||
|
||||
#if defined Q_OS_WIN32
|
||||
#include "console/WindowsConsole.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if defined Q_OS_WIN32
|
||||
// used on Windows to attach the standard IO streams
|
||||
console::WindowsConsoleGuard _consoleGuard;
|
||||
#endif
|
||||
|
||||
// initialize Qt
|
||||
Application app(argc, argv);
|
||||
|
||||
switch (app.status()) {
|
||||
case Application::StartingUp:
|
||||
case Application::Initialized: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue