From a13f492e7d587ade54606a77c4e9f497a0fea737 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 22 Nov 2021 00:32:49 +0100 Subject: Make clang-format <13 and clang-format >=13 behave the same I think old clang-format is just buggy in those cases, so we should reenable those blocks, once everyone has 13 or up. --- src/encryption/DeviceVerificationFlow.cpp | 7 +++++-- src/encryption/DeviceVerificationFlow.h | 32 +++++++++++++++---------------- 2 files changed, 21 insertions(+), 18 deletions(-) (limited to 'src/encryption') diff --git a/src/encryption/DeviceVerificationFlow.cpp b/src/encryption/DeviceVerificationFlow.cpp index f05d5c9f..42a0d041 100644 --- a/src/encryption/DeviceVerificationFlow.cpp +++ b/src/encryption/DeviceVerificationFlow.cpp @@ -662,9 +662,12 @@ DeviceVerificationFlow::sendVerificationRequest() } else if (this->type == DeviceVerificationFlow::Type::RoomMsg && model_) { req.to = this->toClient.to_string(); req.msgtype = "m.key.verification.request"; + // clang-format off + // clang-format < 12 is buggy on this req.body = "User is requesting to verify keys with you. However, your client does " - "not support this method, so you will need to use the legacy method of " - "key verification."; + "not support this method, so you will need to use the legacy method of " + "key verification."; + // clang-format on } send(req); diff --git a/src/encryption/DeviceVerificationFlow.h b/src/encryption/DeviceVerificationFlow.h index 537adf31..396421f7 100644 --- a/src/encryption/DeviceVerificationFlow.h +++ b/src/encryption/DeviceVerificationFlow.h @@ -103,22 +103,22 @@ public: }; Q_ENUM(Error) - static QSharedPointer NewInRoomVerification( - QObject *parent_, - TimelineModel *timelineModel_, - const mtx::events::msg::KeyVerificationRequest &msg, - QString other_user_, - QString event_id_); - static QSharedPointer NewToDeviceVerification( - QObject *parent_, - const mtx::events::msg::KeyVerificationRequest &msg, - QString other_user_, - QString txn_id_); - static QSharedPointer NewToDeviceVerification( - QObject *parent_, - const mtx::events::msg::KeyVerificationStart &msg, - QString other_user_, - QString txn_id_); + static QSharedPointer + NewInRoomVerification(QObject *parent_, + TimelineModel *timelineModel_, + const mtx::events::msg::KeyVerificationRequest &msg, + QString other_user_, + QString event_id_); + static QSharedPointer + NewToDeviceVerification(QObject *parent_, + const mtx::events::msg::KeyVerificationRequest &msg, + QString other_user_, + QString txn_id_); + static QSharedPointer + NewToDeviceVerification(QObject *parent_, + const mtx::events::msg::KeyVerificationStart &msg, + QString other_user_, + QString txn_id_); static QSharedPointer InitiateUserVerification(QObject *parent_, TimelineModel *timelineModel_, QString userid); static QSharedPointer -- cgit 1.5.1