summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-01 12:55:37 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-02 12:47:15 -0800
commit53b572f98791146e1755a7bbb5f22f2e521eea8f (patch)
tree532f66c7b61679b3c075b839f04235d3868533ef /mobile-widgets/qmlmanager.cpp
parent995100a540c2c5a49a2cfebcb245a7e964d2d988 (diff)
downloadsubsurface-53b572f98791146e1755a7bbb5f22f2e521eea8f.tar.gz
mobile: don't connect to applicationStateChanged signal early
We don't want to connect to this until all parts of the QMLManager object are set up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 5986566cc..96fecff96 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -209,7 +209,6 @@ 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);
// make upload signals available in QML
// Remark: signal - signal connect
@@ -324,6 +323,9 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
connect(Command::getUndoStack(), &QUndoStack::undoTextChanged, this, &QMLManager::undoTextChanged);
connect(Command::getUndoStack(), &QUndoStack::redoTextChanged, this, &QMLManager::redoTextChanged);
+ // now that everything is setup, connect the application changed signal
+ connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged);
+
// we start out with clean data
updateHaveLocalChanges(false);
}