diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-28 21:50:58 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-28 21:50:58 +0100 |
commit | 7df667f823fc4a679148dfea215b25642babb48f (patch) | |
tree | b992f3180b2703e3fcdae440f0236dbc5f2d9d64 /MultiMC.cpp | |
parent | 6ecb833dbf4c4930c8354dcce7967ad44c16c217 (diff) | |
download | MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.gz MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.lz MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.xz MultiMC-7df667f823fc4a679148dfea215b25642babb48f.zip |
Valgrind-checked early application start
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r-- | MultiMC.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp index 56109ba6..4e2a5b0b 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -351,20 +351,24 @@ std::shared_ptr<JavaVersionList> MultiMC::javalist() return m_javalist; } -int main(int argc, char *argv[]) +int main_gui(MultiMC & app) { - // initialize Qt - MultiMC app(argc, argv); - // show main window MainWindow mainWin; mainWin.show(); mainWin.checkSetDefaultJava(); + return app.exec(); +} + +int main(int argc, char *argv[]) +{ + // initialize Qt + MultiMC app(argc, argv); switch (app.status()) { case MultiMC::Initialized: - return app.exec(); + return main_gui(app); case MultiMC::Failed: return 1; case MultiMC::Succeeded: |