diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-15 14:42:08 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-15 14:42:08 -0700 |
commit | ecf44bb2faccf080215ccb2f660b36316169ec60 (patch) | |
tree | f59e3dd2c5291fceae95405cc585b62f14c8c36f /mobile-widgets/qmlmanager.cpp | |
parent | 71d74f9e3c7cb49ab93aef035dbf7735b5ae3454 (diff) | |
download | subsurface-ecf44bb2faccf080215ccb2f660b36316169ec60.tar.gz |
QML UI: quit on back key while showing dive list
Make sure you save first, though.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 05490ab42..3c2f8d311 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1198,3 +1198,10 @@ void QMLManager::screenChanged(QScreen *screen) m_lastDevicePixelRatio = screen->devicePixelRatio(); emit sendScreenChanged(screen); } + +void QMLManager::quit() +{ + if (unsaved_changes()) + saveChangesCloud(false); + QApplication::quit(); +} |