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:
parent
5e9eb845ab
commit
8ecbb39dc6
33 changed files with 162 additions and 146 deletions
|
|
@ -21,18 +21,17 @@
|
|||
#include "timeline/TimelineViewManager.h"
|
||||
#include "ui/UIA.h"
|
||||
|
||||
UserProfile::UserProfile(QString roomid,
|
||||
QString userid,
|
||||
UserProfile::UserProfile(const QString &roomid,
|
||||
const QString &userid,
|
||||
TimelineViewManager *manager_,
|
||||
TimelineModel *parent)
|
||||
: QObject(parent)
|
||||
, roomid_(roomid)
|
||||
, userid_(userid)
|
||||
, globalAvatarUrl{QLatin1String("")}
|
||||
, manager(manager_)
|
||||
, model(parent)
|
||||
{
|
||||
globalAvatarUrl = QLatin1String("");
|
||||
|
||||
connect(this,
|
||||
&UserProfile::globalUsernameRetrieved,
|
||||
this,
|
||||
|
|
@ -325,7 +324,7 @@ UserProfile::startChat()
|
|||
}
|
||||
|
||||
void
|
||||
UserProfile::changeUsername(QString username)
|
||||
UserProfile::changeUsername(const QString &username)
|
||||
{
|
||||
if (isGlobalUserProfile()) {
|
||||
// change global
|
||||
|
|
@ -349,7 +348,7 @@ UserProfile::changeUsername(QString username)
|
|||
}
|
||||
|
||||
void
|
||||
UserProfile::changeDeviceName(QString deviceID, QString deviceName)
|
||||
UserProfile::changeDeviceName(const QString &deviceID, const QString &deviceName)
|
||||
{
|
||||
http::client()->set_device_name(
|
||||
deviceID.toStdString(), deviceName.toStdString(), [this](mtx::http::RequestErr err) {
|
||||
|
|
@ -372,7 +371,7 @@ UserProfile::verify(QString device)
|
|||
}
|
||||
|
||||
void
|
||||
UserProfile::unverify(QString device)
|
||||
UserProfile::unverify(const QString &device)
|
||||
{
|
||||
cache::markDeviceUnverified(userid_.toStdString(), device.toStdString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue