diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-18 12:49:22 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-01-18 17:35:35 +0200 |
commit | 3d02edf61e222a9bc839fd9ad294ab1ab1ea8615 (patch) | |
tree | c0475c2344ee1ac7095d0954ca0b1030aa971ff3 /mobile-widgets/qmlmanager.cpp | |
parent | 84b96ac2ae5aa60fd7ab03b0b0f8e0606af23e43 (diff) | |
download | subsurface-3d02edf61e222a9bc839fd9ad294ab1ab1ea8615.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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 *>(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; } |