cppcheck stuff (#1200)

* cppcheck stuff

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Fix linting

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
This commit is contained in:
Loren Burkholder 2022-10-03 17:57:30 -04:00 committed by GitHub
parent 5e9eb845ab
commit 8ecbb39dc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 162 additions and 146 deletions

View file

@ -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<DeviceVerificationFlow>
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<DeviceVerificationFlow>
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<DeviceVerificationFlow>
InitiateUserVerification(QObject *parent_, TimelineModel *timelineModel_, QString userid);
InitiateUserVerification(QObject *parent_,
TimelineModel *timelineModel_,
const QString &userid);
static QSharedPointer<DeviceVerificationFlow>
InitiateDeviceVerification(QObject *parent, QString userid, std::vector<QString> devices);
InitiateDeviceVerification(QObject *parent,
const QString &userid,
const std::vector<QString> &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<QString> deviceIds_);
const QString &userID,
const std::vector<QString> &deviceIds_);
void setState(State state)
{
if (state != state_) {