Make it possible to quit the application
This will call Qt.quit when the Quit application shortcut is pressed (not just visible=false).
This commit is contained in:
@@ -20,6 +20,13 @@ Kirigami.ApplicationWindow {
|
||||
id: root
|
||||
property var currentRoom: null
|
||||
|
||||
Connections {
|
||||
target: root.quitAction
|
||||
function onTriggered() {
|
||||
Qt.quit()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage opening and close rooms
|
||||
*/
|
||||
|
||||
@@ -109,6 +109,7 @@ int main(int argc, char *argv[])
|
||||
QQmlApplicationEngine engine;
|
||||
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
|
||||
KLocalizedString::setApplicationDomain("neochat");
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::quit, &app, &QCoreApplication::quit);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(i18n("Client for the matrix communication protocol"));
|
||||
|
||||
Reference in New Issue
Block a user