Unconditionally use SSSS
This commit is contained in:
@@ -392,8 +392,6 @@ QString Controller::loadFileContent(const QString &path) const
|
|||||||
return QString::fromLatin1(file.readAll());
|
return QString::fromLatin1(file.readAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_controller.cpp"
|
|
||||||
|
|
||||||
void Controller::setTestMode(bool test)
|
void Controller::setTestMode(bool test)
|
||||||
{
|
{
|
||||||
testMode = 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
|
bool Controller::csSupported() const
|
||||||
{
|
{
|
||||||
#if Quotient_VERSION_MINOR > 9
|
#if Quotient_VERSION_MINOR > 9
|
||||||
@@ -426,3 +415,5 @@ bool Controller::csSupported() const
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "moc_controller.cpp"
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ class Controller : public QObject
|
|||||||
|
|
||||||
Q_PROPERTY(QStringList accountsLoading MEMBER m_accountsLoading NOTIFY accountsLoadingChanged)
|
Q_PROPERTY(QStringList accountsLoading MEMBER m_accountsLoading NOTIFY accountsLoadingChanged)
|
||||||
|
|
||||||
Q_PROPERTY(bool ssssSupported READ ssssSupported CONSTANT)
|
|
||||||
Q_PROPERTY(bool csSupported READ csSupported CONSTANT)
|
Q_PROPERTY(bool csSupported READ csSupported CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -97,7 +96,6 @@ public:
|
|||||||
|
|
||||||
Q_INVOKABLE void removeConnection(const QString &userId);
|
Q_INVOKABLE void removeConnection(const QString &userId);
|
||||||
|
|
||||||
bool ssssSupported() const;
|
|
||||||
bool csSupported() const;
|
bool csSupported() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -6,10 +6,8 @@
|
|||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
|
||||||
#include <Quotient/accountregistry.h>
|
#include <Quotient/accountregistry.h>
|
||||||
#include <Quotient/keyverificationsession.h>
|
|
||||||
#if Quotient_VERSION_MINOR > 8 || Quotient_VERSION_PATCH > 1
|
|
||||||
#include <Quotient/e2ee/sssshandler.h>
|
#include <Quotient/e2ee/sssshandler.h>
|
||||||
#endif
|
#include <Quotient/keyverificationsession.h>
|
||||||
|
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "neochatconfig.h"
|
#include "neochatconfig.h"
|
||||||
@@ -47,10 +45,8 @@ struct ForeignKeyVerificationSession {
|
|||||||
QML_UNCREATABLE("")
|
QML_UNCREATABLE("")
|
||||||
};
|
};
|
||||||
|
|
||||||
#if Quotient_VERSION_MINOR > 8 || Quotient_VERSION_PATCH > 1
|
|
||||||
struct ForeignSSSSHandler {
|
struct ForeignSSSSHandler {
|
||||||
Q_GADGET
|
Q_GADGET
|
||||||
QML_FOREIGN(Quotient::SSSSHandler)
|
QML_FOREIGN(Quotient::SSSSHandler)
|
||||||
QML_NAMED_ELEMENT(SSSSHandler)
|
QML_NAMED_ELEMENT(SSSSHandler)
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ QQC2.Menu {
|
|||||||
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
|
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
|
||||||
title: i18nc("@title:window", "Open Key Backup")
|
title: i18nc("@title:window", "Open Key Backup")
|
||||||
})
|
})
|
||||||
enabled: Controller.ssssSupported
|
|
||||||
}
|
}
|
||||||
QQC2.MenuItem {
|
QQC2.MenuItem {
|
||||||
text: i18nc("@action:inmenu", "Verify this Device")
|
text: i18nc("@action:inmenu", "Verify this Device")
|
||||||
|
|||||||
Reference in New Issue
Block a user