diff --git a/qml/main.qml b/qml/main.qml index 63989fad0..b48cf64b8 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -175,7 +175,7 @@ Kirigami.ApplicationWindow { icon.name: "settings-configure" onTriggered: pushReplaceLayer("qrc:/imports/NeoChat/Page/SettingsPage.qml") enabled: pageStack.layers.currentItem.title !== i18n("Settings") - shortcut: Controller.preferencesShortcuts[0] + shortcut: StandardKey.Preferences }, Kirigami.Action { text: i18n("About Neochat") @@ -191,6 +191,7 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: i18n("Quit") icon.name: "gtk-quit" + shortcut: StandardKey.Quit onTriggered: Qt.quit() } ] diff --git a/src/controller.cpp b/src/controller.cpp index 85cdc28f2..b4efca2b9 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -557,11 +557,6 @@ void Controller::setActiveConnection(Connection *connection) Q_EMIT activeConnectionChanged(); } -QList Controller::preferencesShortcuts() const -{ - return KStandardShortcut::preferences(); -} - NeochatDeleteDeviceJob::NeochatDeleteDeviceJob(const QString &deviceId, const Omittable &auth) : Quotient::BaseJob(HttpVerb::Delete, QStringLiteral("DeleteDeviceJob"), QStringLiteral("/_matrix/client/r0/devices/%1").arg(deviceId)) { diff --git a/src/controller.h b/src/controller.h index 0c3dc8fd4..566e89e03 100644 --- a/src/controller.h +++ b/src/controller.h @@ -33,9 +33,6 @@ class Controller : public QObject Q_PROPERTY(bool busy READ busy WRITE setBusy NOTIFY busyChanged) Q_PROPERTY(KAboutData aboutData READ aboutData WRITE setAboutData NOTIFY aboutDataChanged) - /// Get the list of shortcuts activating the preferences page - Q_PROPERTY(QList preferencesShortcuts READ preferencesShortcuts CONSTANT) - public: static Controller &instance(); @@ -54,8 +51,6 @@ public: [[nodiscard]] int accountCount() const; - [[nodiscard]] QList preferencesShortcuts() const; - [[nodiscard]] static bool quitOnLastWindowClosed(); void setQuitOnLastWindowClosed(bool value);