diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 18:15:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-18 18:15:35 -0500 |
| commit | d41d57fe07633cc1be70c666e91c7e571afdd28f (patch) | |
| tree | bc84402369d6a1920a7d21349de7233fe21b8531 /src/main.cpp | |
| parent | e749b2072601830c11495ce210907391dfe7bc6b (diff) | |
| parent | f9ad6d97098093b5d03e7792798583ea73a1ea65 (diff) | |
Merge pull request #1004 from isanae/timings
More timings
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 105299a8..8813aaa7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -506,6 +506,8 @@ static QString getVersionDisplayString() int runApplication(MOApplication &application, SingleInstance &instance, const QString &splashPath) { + TimeThis tt("runApplication() to exec()"); + log::info( "starting Mod Organizer version {} revision {} in {}, usvfs: {}", getVersionDisplayString(), GITID, QCoreApplication::applicationDirPath(), @@ -703,7 +705,7 @@ int runApplication(MOApplication &application, SingleInstance &instance, } QPixmap pixmap; - + QSplashScreen splash(nullptr); if (useSplash) { @@ -748,13 +750,15 @@ int runApplication(MOApplication &application, SingleInstance &instance, log::debug("displaying main window"); mainWindow.show(); mainWindow.activateWindow(); - + if (useSplash) { // don't pass mainwindow as it just waits half a second for it // instead of proceding splash.finish(nullptr); } + tt.stop(); + res = application.exec(); mainWindow.close(); @@ -855,6 +859,8 @@ void initLogging() int main(int argc, char *argv[]) { + TimeThis tt("main to runApplication()"); + // handle --crashdump first for (int i=1; i<argc; ++i) { if (std::strcmp(argv[i], "--crashdump") == 0) { @@ -954,6 +960,8 @@ int main(int argc, char *argv[]) splash = ":/MO/gui/splash"; } + tt.stop(); + const int result = runApplication(application, instance, splash); if (result != RestartExitCode) { return result; |
