summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/components/MainView.qml12
-rw-r--r--gui/components/StatusBox.qml11
-rw-r--r--gui/components/Systray.qml6
-rw-r--r--gui/main.cpp6
4 files changed, 15 insertions, 20 deletions
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml
index 886e896..946e36f 100644
--- a/gui/components/MainView.qml
+++ b/gui/components/MainView.qml
@@ -48,36 +48,36 @@ Page {
ListElement {
text: qsTr("Preferences")
icon: "../resources/tools.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("Preferences.qml")
}
}
ListElement {
text: qsTr("Donate")
icon: "../resources/donate.svg"
- triggered: function () {
+ triggered: function() {
Qt.openUrlExternally(ctx.donateURL)
}
}
ListElement {
text: qsTr("Help")
icon: "../resources/help.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("Help.qml")
}
} // -> can link to another dialog with report bug / support / contribute / FAQ
ListElement {
text: qsTr("About")
icon: "../resources/about.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("About.qml")
}
}
ListElement {
text: qsTr("Quit")
icon: "../resources/quit.svg"
- triggered: function () {
- backend.quit()
+ triggered: function() {
+ Qt.callLater(backend.quit)
}
}
} // end listmodel
diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml
index bfcc175..7715123 100644
--- a/gui/components/StatusBox.qml
+++ b/gui/components/StatusBox.qml
@@ -56,13 +56,6 @@ Item {
}
onClicked: {
settingsDrawer.toggle()
- /*
- if (stackView.depth > 1) {
- stackView.pop()
- } else {
- settingsDrawer.toggle()
- }
- */
}
Icon {
@@ -71,10 +64,6 @@ Item {
height: 16
anchors.centerIn: settingsButton
source: "../resources/gear-fill.svg"
- /*
- source: stackView.depth
- > 1 ? "../resources/arrow-left.svg" : "../resources/gear-fill.svg"
- */
}
}
diff --git a/gui/components/Systray.qml b/gui/components/Systray.qml
index f25860c..1026f01 100644
--- a/gui/components/Systray.qml
+++ b/gui/components/Systray.qml
@@ -53,9 +53,11 @@ Labs.SystemTrayIcon {
}
Labs.MenuItem {
- //: Part of the systray menu; quits que application
+ //: Part of the systray menu; quits the application
text: qsTr("Quit")
- onTriggered: backend.quit()
+ onTriggered: {
+ backend.quit()
+ }
}
}
diff --git a/gui/main.cpp b/gui/main.cpp
index fe96caa..1cb2d0e 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -48,7 +48,6 @@ QString getAppName(QJsonValue info, QString provider) {
auto handler = [](int sig) -> void {
printf("\nCatched signal(%d): quitting\n", sig);
- Quit();
QApplication::quit();
};
@@ -82,6 +81,11 @@ int main(int argc, char **argv) {
app.setQuitOnLastWindowClosed(false);
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
+ QObject::connect(&app, &QApplication::aboutToQuit, []() {
+ qDebug() << ">>> Quitting, bye!";
+ Quit();
+ });
+
#ifdef OS_WIN
signal(SIGINT, handler);
signal(SIGTERM, handler);