summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-02-18 18:09:03 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-02-18 18:09:03 -0500
commit75cd8b3bab3e4d094565748215013ee78c9962d9 (patch)
treeb0eb3365f79d090cf13a3144acc1f1b379140dec /src/main.cpp
parente749b2072601830c11495ce210907391dfe7bc6b (diff)
added more timings
missed fileregisterfwd.h in cmake list
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
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;