Fix build without E2EE
This commit is contained in:
@@ -43,6 +43,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
Controls.ToolButton {
|
Controls.ToolButton {
|
||||||
display: Controls.AbstractButton.IconOnly
|
display: Controls.AbstractButton.IconOnly
|
||||||
|
visible: Controller.encryptionSupported
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
text: i18n("Verify device")
|
text: i18n("Verify device")
|
||||||
iconName: "security-low-symbolic"
|
iconName: "security-low-symbolic"
|
||||||
|
|||||||
@@ -232,10 +232,12 @@ int main(int argc, char *argv[])
|
|||||||
qRegisterMetaType<GetRoomEventsJob *>("GetRoomEventsJob*");
|
qRegisterMetaType<GetRoomEventsJob *>("GetRoomEventsJob*");
|
||||||
qRegisterMetaType<QMimeType>("QMimeType");
|
qRegisterMetaType<QMimeType>("QMimeType");
|
||||||
#ifdef QUOTIENT_07
|
#ifdef QUOTIENT_07
|
||||||
|
#ifdef Quotient_E2EE_ENABLED
|
||||||
qRegisterMetaType<KeyVerificationSession *>("KeyVerificationSession*");
|
qRegisterMetaType<KeyVerificationSession *>("KeyVerificationSession*");
|
||||||
qmlRegisterUncreatableType<KeyVerificationSession>("org.kde.neochat", 1, 0, "KeyVerificationSession", {});
|
qmlRegisterUncreatableType<KeyVerificationSession>("org.kde.neochat", 1, 0, "KeyVerificationSession", {});
|
||||||
qRegisterMetaType<QVector<EmojiEntry>>("QVector<EmojiEntry>");
|
qRegisterMetaType<QVector<EmojiEntry>>("QVector<EmojiEntry>");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
qRegisterMetaTypeStreamOperators<Emoji>();
|
qRegisterMetaTypeStreamOperators<Emoji>();
|
||||||
|
|||||||
@@ -814,12 +814,14 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
|
|
||||||
if (role == VerifiedRole) {
|
if (role == VerifiedRole) {
|
||||||
#ifdef QUOTIENT_07
|
#ifdef QUOTIENT_07
|
||||||
|
#ifdef Quotient_E2EE_ENABLED
|
||||||
if (evt.originalEvent()) {
|
if (evt.originalEvent()) {
|
||||||
auto encrypted = dynamic_cast<const EncryptedEvent *>(evt.originalEvent());
|
auto encrypted = dynamic_cast<const EncryptedEvent *>(evt.originalEvent());
|
||||||
Q_ASSERT(encrypted);
|
Q_ASSERT(encrypted);
|
||||||
return m_currentRoom->connection()->isVerifiedSession(encrypted->sessionId());
|
return m_currentRoom->connection()->isVerifiedSession(encrypted->sessionId());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user