From 6b7ad6b1af6f8bd7eb19109ebc358f55aba118b0 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 22 Mar 2025 18:51:39 +0100 Subject: [PATCH] Remove unneeded property --- src/controller.cpp | 5 ----- src/controller.h | 4 ---- src/qml/AccountMenu.qml | 1 - src/qml/RoomInformation.qml | 2 +- src/settings/NeoChatSecurityPage.qml | 2 -- 5 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 2a4dd5058..d5ec59d67 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -434,11 +434,6 @@ void Controller::removeConnection(const QString &userId) } } -bool Controller::csSupported() const -{ - return true; -} - void Controller::revertToDefaultConfig() { const auto config = NeoChatConfig::self(); diff --git a/src/controller.h b/src/controller.h index 21e7b1d27..ed2f6db71 100644 --- a/src/controller.h +++ b/src/controller.h @@ -50,8 +50,6 @@ class Controller : public QObject Q_PROPERTY(QStringList accountsLoading MEMBER m_accountsLoading NOTIFY accountsLoadingChanged) - Q_PROPERTY(bool csSupported READ csSupported CONSTANT) - public: static Controller &instance(); static Controller *create(QQmlEngine *engine, QJSEngine *) @@ -103,8 +101,6 @@ public: Q_INVOKABLE void removeConnection(const QString &userId); - bool csSupported() const; - /** * @brief Revert all configuration values to their default. * diff --git a/src/qml/AccountMenu.qml b/src/qml/AccountMenu.qml index 9f56a1fc6..ce7ce54b7 100644 --- a/src/qml/AccountMenu.qml +++ b/src/qml/AccountMenu.qml @@ -99,7 +99,6 @@ KirigamiComponents.ConvergentContextMenu { dialog.close(); }); } - enabled: Controller.csSupported } QQC2.Action { diff --git a/src/qml/RoomInformation.qml b/src/qml/RoomInformation.qml index 0d58ac3a8..52ffa9301 100644 --- a/src/qml/RoomInformation.qml +++ b/src/qml/RoomInformation.qml @@ -92,7 +92,7 @@ QQC2.ScrollView { } Delegates.RoundedItemDelegate { - visible: root.room.isDirectChat() && Controller.csSupported + visible: root.room.isDirectChat() icon.name: "security-low-symbolic" text: i18nc("@action:button", "Verify user") diff --git a/src/settings/NeoChatSecurityPage.qml b/src/settings/NeoChatSecurityPage.qml index 1861193ac..40e09bbce 100644 --- a/src/settings/NeoChatSecurityPage.qml +++ b/src/settings/NeoChatSecurityPage.qml @@ -83,10 +83,8 @@ FormCard.FormCardPage { } FormCard.FormHeader { title: i18nc("@title:group", "Encryption") - visible: Controller.csSupported } FormCard.FormCard { - visible: Controller.csSupported FormCard.FormButtonDelegate { id: importKeysDelegate text: i18nc("@action:button", "Import Keys")