DRY
This commit is contained in:
parent
1b546dc721
commit
549e168fdb
|
@ -29,10 +29,7 @@ ApplicationWindow {
|
|||
|
||||
onClosing: {
|
||||
if (notray) {
|
||||
if (! platformDetails.isDebug()) {
|
||||
platformDetails.stopLokinetIfWeStartedIt();
|
||||
}
|
||||
Qt.quit();
|
||||
window.exitApp();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,6 +42,13 @@ ApplicationWindow {
|
|||
visible: false
|
||||
}
|
||||
|
||||
function exitApp() {
|
||||
if (! platformDetails.isDebug()) {
|
||||
platformDetails.stopLokinetIfWeStartedIt();
|
||||
}
|
||||
Qt.quit();
|
||||
}
|
||||
|
||||
function display() {
|
||||
|
||||
var rect = platformDetails.getAbsoluteCursorPosition();
|
||||
|
@ -113,10 +117,7 @@ ApplicationWindow {
|
|||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: {
|
||||
if (! platformDetails.isDebug()) {
|
||||
platformDetails.stopLokinetIfWeStartedIt();
|
||||
}
|
||||
Qt.quit();
|
||||
window.exitApp();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue