From 3d02edf61e222a9bc839fd9ad294ab1ab1ea8615 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 18 Jan 2018 12:49:22 +0100 Subject: Mobile: start message timer on startup Since the timer will be started on first message anyway, we might just start it at application startup. Signed-off-by: Berthold Stoeger --- mobile-widgets/qmlmanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mobile-widgets/qmlmanager.cpp') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index e5e9b7892..8bea69577 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -115,6 +115,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), { m_instance = this; m_lastDevicePixelRatio = qApp->devicePixelRatio(); + timer.start(); connect(qobject_cast(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged); QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/libdivecomputer.log"; @@ -1323,8 +1324,6 @@ void QMLManager::setLogText(const QString &logText) void QMLManager::appendTextToLog(const QString &newText) { - if (!timer.isValid()) - timer.start(); qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText; } -- cgit v1.2.3-70-g09d2