diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2018-09-24 16:20:43 +0200 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2018-10-09 07:17:49 +0000 |
commit | babea7efca16147737b8b995afe266c3c629b24f (patch) | |
tree | ceea18cea615e84cd682c4615f22ee417dc17b7b | |
parent | 9e4614e1a4b73d88ad140431c424e14c8d954272 (diff) | |
download | qtapplicationmanager-5.11.tar.gz |
Fix automatic startup timer reporting5.11
Cherry-picked from dev branch: 48f2823
Change-Id: Id2164a4e9a229c1edac082cdeb1897cf6916449b
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | src/common-lib/startuptimer.cpp | 6 | ||||
-rw-r--r-- | src/common-lib/startuptimer.h | 1 | ||||
-rw-r--r-- | src/launchers/qml/main.cpp | 5 | ||||
-rw-r--r-- | src/main-lib/main.cpp | 5 |
4 files changed, 11 insertions, 6 deletions
diff --git a/src/common-lib/startuptimer.cpp b/src/common-lib/startuptimer.cpp index e7f869f6..1599ac02 100644 --- a/src/common-lib/startuptimer.cpp +++ b/src/common-lib/startuptimer.cpp @@ -422,6 +422,12 @@ void StartupTimer::reset() } } +void StartupTimer::createAutomaticReport(const QString &title) +{ + if (m_automaticReporting) + createReport(title); +} + bool StartupTimer::automaticReporting() const { return m_automaticReporting; diff --git a/src/common-lib/startuptimer.h b/src/common-lib/startuptimer.h index 84fb052e..ddf5573e 100644 --- a/src/common-lib/startuptimer.h +++ b/src/common-lib/startuptimer.h @@ -69,6 +69,7 @@ public: bool automaticReporting() const; void checkpoint(const char *name); + void createAutomaticReport(const QString &title); void checkFirstFrame(); void reset(); diff --git a/src/launchers/qml/main.cpp b/src/launchers/qml/main.cpp index 5172082f..49aad257 100644 --- a/src/launchers/qml/main.cpp +++ b/src/launchers/qml/main.cpp @@ -465,8 +465,7 @@ void Controller::startApplication(const QString &baseDir, const QString &qmlFile auto st = StartupTimer::instance(); st->checkFirstFrame(); - if (!st->automaticReporting()) - st->createReport(applicationId); + st->createAutomaticReport(applicationId); for (StartupInterface *iface : qAsConst(startupPlugins)) iface->afterWindowShow(m_window); @@ -499,7 +498,7 @@ void Controller::startApplication(const QString &baseDir, const QString &qmlFile StartupTimer::instance()->checkpoint("component loading and creating complete."); if (createStartupReportNow) - StartupTimer::instance()->createReport(applicationId); + StartupTimer::instance()->createAutomaticReport(applicationId); if (!document.isEmpty() && m_applicationInterface) emit m_applicationInterface->openDocument(document, mimeType); diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index d2a8007e..4b15a4a8 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -700,8 +700,7 @@ void Main::showWindow(bool showFullscreen) # endif auto st = StartupTimer::instance(); st->checkFirstFrame(); - if (!st->automaticReporting()) - st->createReport(qSL("System-UI")); + st->createAutomaticReport(qSL("System-UI")); } }); @@ -726,7 +725,7 @@ void Main::showWindow(bool showFullscreen) checkOpenGLFormat("first window", win->format()); } }); - StartupTimer::instance()->createReport(qSL("System-UI")); + StartupTimer::instance()->createAutomaticReport(qSL("System-UI")); } #endif } |