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:
Aleix Pol
2020-11-27 17:46:46 +01:00
committed by Carl Schwan
parent 97cba6a17a
commit 118dabb58b
2 changed files with 8 additions and 0 deletions

View File

@@ -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"));