mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
84b96ac2ae
commit
3d02edf61e
1 changed files with 1 additions and 2 deletions
|
@ -115,6 +115,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
|
||||||
{
|
{
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
m_lastDevicePixelRatio = qApp->devicePixelRatio();
|
m_lastDevicePixelRatio = qApp->devicePixelRatio();
|
||||||
|
timer.start();
|
||||||
connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged);
|
connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged);
|
||||||
|
|
||||||
QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/libdivecomputer.log";
|
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)
|
void QMLManager::appendTextToLog(const QString &newText)
|
||||||
{
|
{
|
||||||
if (!timer.isValid())
|
|
||||||
timer.start();
|
|
||||||
qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText;
|
qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue