From 3dd28a0382658eb810cd4033b762a6d900543191 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 5 May 2024 21:55:02 +0200 Subject: [PATCH] Unconditionally use SSSS --- src/controller.cpp | 13 ++----------- src/controller.h | 2 -- src/foreigntypes.h | 6 +----- src/qml/AccountMenu.qml | 1 - 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 30b981236..66d73ad6e 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -392,8 +392,6 @@ QString Controller::loadFileContent(const QString &path) const return QString::fromLatin1(file.readAll()); } -#include "moc_controller.cpp" - void Controller::setTestMode(bool test) { testMode = test; @@ -409,15 +407,6 @@ void Controller::removeConnection(const QString &userId) } } -bool Controller::ssssSupported() const -{ -#if Quotient_VERSION_MINOR > 8 || Quotient_VERSION_PATCH > 1 - return true; -#else - return false; -#endif -} - bool Controller::csSupported() const { #if Quotient_VERSION_MINOR > 9 @@ -426,3 +415,5 @@ bool Controller::csSupported() const return false; #endif } + +#include "moc_controller.cpp" diff --git a/src/controller.h b/src/controller.h index 6b1d4122c..7829af31f 100644 --- a/src/controller.h +++ b/src/controller.h @@ -50,7 +50,6 @@ class Controller : public QObject Q_PROPERTY(QStringList accountsLoading MEMBER m_accountsLoading NOTIFY accountsLoadingChanged) - Q_PROPERTY(bool ssssSupported READ ssssSupported CONSTANT) Q_PROPERTY(bool csSupported READ csSupported CONSTANT) public: @@ -97,7 +96,6 @@ public: Q_INVOKABLE void removeConnection(const QString &userId); - bool ssssSupported() const; bool csSupported() const; private: diff --git a/src/foreigntypes.h b/src/foreigntypes.h index 654145977..3bfb65fac 100644 --- a/src/foreigntypes.h +++ b/src/foreigntypes.h @@ -6,10 +6,8 @@ #include #include -#include -#if Quotient_VERSION_MINOR > 8 || Quotient_VERSION_PATCH > 1 #include -#endif +#include #include "controller.h" #include "neochatconfig.h" @@ -47,10 +45,8 @@ struct ForeignKeyVerificationSession { QML_UNCREATABLE("") }; -#if Quotient_VERSION_MINOR > 8 || Quotient_VERSION_PATCH > 1 struct ForeignSSSSHandler { Q_GADGET QML_FOREIGN(Quotient::SSSSHandler) QML_NAMED_ELEMENT(SSSSHandler) }; -#endif diff --git a/src/qml/AccountMenu.qml b/src/qml/AccountMenu.qml index 214485898..a70b4ef3c 100644 --- a/src/qml/AccountMenu.qml +++ b/src/qml/AccountMenu.qml @@ -70,7 +70,6 @@ QQC2.Menu { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, { title: i18nc("@title:window", "Open Key Backup") }) - enabled: Controller.ssssSupported } QQC2.MenuItem { text: i18nc("@action:inmenu", "Verify this Device")