mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: quit on back key while showing dive list
Make sure you save first, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
71d74f9e3c
commit
ecf44bb2fa
3 changed files with 13 additions and 0 deletions
|
@ -278,5 +278,10 @@ Kirigami.ScrollablePage {
|
||||||
manager.credentialStatus = oldStatus
|
manager.credentialStatus = oldStatus
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
}
|
}
|
||||||
|
if (!startPageWrapper.visible) {
|
||||||
|
manager.quit()
|
||||||
|
// we shouldn't come back from there, but just in case
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1198,3 +1198,10 @@ void QMLManager::screenChanged(QScreen *screen)
|
||||||
m_lastDevicePixelRatio = screen->devicePixelRatio();
|
m_lastDevicePixelRatio = screen->devicePixelRatio();
|
||||||
emit sendScreenChanged(screen);
|
emit sendScreenChanged(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMLManager::quit()
|
||||||
|
{
|
||||||
|
if (unsaved_changes())
|
||||||
|
saveChangesCloud(false);
|
||||||
|
QApplication::quit();
|
||||||
|
}
|
||||||
|
|
|
@ -132,6 +132,7 @@ public slots:
|
||||||
void screenChanged(QScreen *screen);
|
void screenChanged(QScreen *screen);
|
||||||
qreal lastDevicePixelRatio();
|
qreal lastDevicePixelRatio();
|
||||||
void appendTextToLog(const QString &newText);
|
void appendTextToLog(const QString &newText);
|
||||||
|
void quit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_cloudUserName;
|
QString m_cloudUserName;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue