From 8ecbb39dc6303fcf3ae36ad033d7e90ea29b9003 Mon Sep 17 00:00:00 2001 From: Loren Burkholder <55629213+LorenDB@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:57:30 -0400 Subject: cppcheck stuff (#1200) * cppcheck stuff * Update src/ui/RoomSettings.cpp Co-authored-by: DeepBlueV7.X * Update src/ui/RoomSettings.cpp Co-authored-by: DeepBlueV7.X * Fix linting Co-authored-by: DeepBlueV7.X --- src/encryption/DeviceVerificationFlow.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/encryption/DeviceVerificationFlow.h') diff --git a/src/encryption/DeviceVerificationFlow.h b/src/encryption/DeviceVerificationFlow.h index a4dce236..afaddb37 100644 --- a/src/encryption/DeviceVerificationFlow.h +++ b/src/encryption/DeviceVerificationFlow.h @@ -110,22 +110,26 @@ public: NewInRoomVerification(QObject *parent_, TimelineModel *timelineModel_, const mtx::events::msg::KeyVerificationRequest &msg, - QString other_user_, - QString event_id_); + const QString &other_user_, + const QString &event_id_); static QSharedPointer NewToDeviceVerification(QObject *parent_, const mtx::events::msg::KeyVerificationRequest &msg, - QString other_user_, - QString txn_id_); + const QString &other_user_, + const QString &txn_id_); static QSharedPointer NewToDeviceVerification(QObject *parent_, const mtx::events::msg::KeyVerificationStart &msg, - QString other_user_, - QString txn_id_); + const QString &other_user_, + const QString &txn_id_); static QSharedPointer - InitiateUserVerification(QObject *parent_, TimelineModel *timelineModel_, QString userid); + InitiateUserVerification(QObject *parent_, + TimelineModel *timelineModel_, + const QString &userid); static QSharedPointer - InitiateDeviceVerification(QObject *parent, QString userid, std::vector devices); + InitiateDeviceVerification(QObject *parent, + const QString &userid, + const std::vector &devices); // getters QString state(); @@ -137,7 +141,7 @@ public: QString transactionId() { return QString::fromStdString(this->transaction_id); } // setters void setDeviceId(QString deviceID); - void setEventId(std::string event_id); + void setEventId(const std::string &event_id); bool isDeviceVerification() const { return this->type == DeviceVerificationFlow::Type::ToDevice; @@ -164,8 +168,8 @@ private: DeviceVerificationFlow(QObject *, DeviceVerificationFlow::Type flow_type, TimelineModel *model, - QString userID, - std::vector deviceIds_); + const QString &userID, + const std::vector &deviceIds_); void setState(State state) { if (state != state_) { -- cgit 1.5.1