Simplify shortcuts code in hamburger menu
This commit is contained in:
@@ -175,7 +175,7 @@ Kirigami.ApplicationWindow {
|
|||||||
icon.name: "settings-configure"
|
icon.name: "settings-configure"
|
||||||
onTriggered: pushReplaceLayer("qrc:/imports/NeoChat/Page/SettingsPage.qml")
|
onTriggered: pushReplaceLayer("qrc:/imports/NeoChat/Page/SettingsPage.qml")
|
||||||
enabled: pageStack.layers.currentItem.title !== i18n("Settings")
|
enabled: pageStack.layers.currentItem.title !== i18n("Settings")
|
||||||
shortcut: Controller.preferencesShortcuts[0]
|
shortcut: StandardKey.Preferences
|
||||||
},
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("About Neochat")
|
text: i18n("About Neochat")
|
||||||
@@ -191,6 +191,7 @@ Kirigami.ApplicationWindow {
|
|||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Quit")
|
text: i18n("Quit")
|
||||||
icon.name: "gtk-quit"
|
icon.name: "gtk-quit"
|
||||||
|
shortcut: StandardKey.Quit
|
||||||
onTriggered: Qt.quit()
|
onTriggered: Qt.quit()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -557,11 +557,6 @@ void Controller::setActiveConnection(Connection *connection)
|
|||||||
Q_EMIT activeConnectionChanged();
|
Q_EMIT activeConnectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QKeySequence> Controller::preferencesShortcuts() const
|
|
||||||
{
|
|
||||||
return KStandardShortcut::preferences();
|
|
||||||
}
|
|
||||||
|
|
||||||
NeochatDeleteDeviceJob::NeochatDeleteDeviceJob(const QString &deviceId, const Omittable<QJsonObject> &auth)
|
NeochatDeleteDeviceJob::NeochatDeleteDeviceJob(const QString &deviceId, const Omittable<QJsonObject> &auth)
|
||||||
: Quotient::BaseJob(HttpVerb::Delete, QStringLiteral("DeleteDeviceJob"), QStringLiteral("/_matrix/client/r0/devices/%1").arg(deviceId))
|
: Quotient::BaseJob(HttpVerb::Delete, QStringLiteral("DeleteDeviceJob"), QStringLiteral("/_matrix/client/r0/devices/%1").arg(deviceId))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ class Controller : public QObject
|
|||||||
Q_PROPERTY(bool busy READ busy WRITE setBusy NOTIFY busyChanged)
|
Q_PROPERTY(bool busy READ busy WRITE setBusy NOTIFY busyChanged)
|
||||||
Q_PROPERTY(KAboutData aboutData READ aboutData WRITE setAboutData NOTIFY aboutDataChanged)
|
Q_PROPERTY(KAboutData aboutData READ aboutData WRITE setAboutData NOTIFY aboutDataChanged)
|
||||||
|
|
||||||
/// Get the list of shortcuts activating the preferences page
|
|
||||||
Q_PROPERTY(QList<QKeySequence> preferencesShortcuts READ preferencesShortcuts CONSTANT)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Controller &instance();
|
static Controller &instance();
|
||||||
|
|
||||||
@@ -54,8 +51,6 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] int accountCount() const;
|
[[nodiscard]] int accountCount() const;
|
||||||
|
|
||||||
[[nodiscard]] QList<QKeySequence> preferencesShortcuts() const;
|
|
||||||
|
|
||||||
[[nodiscard]] static bool quitOnLastWindowClosed();
|
[[nodiscard]] static bool quitOnLastWindowClosed();
|
||||||
void setQuitOnLastWindowClosed(bool value);
|
void setQuitOnLastWindowClosed(bool value);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user