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
|
|
@ -27,7 +27,7 @@ RegisterPage::RegisterPage(QObject *parent)
|
|||
}
|
||||
|
||||
void
|
||||
RegisterPage::setError(QString err)
|
||||
RegisterPage::setError(const QString &err)
|
||||
{
|
||||
registrationError_ = err;
|
||||
emit errorChanged();
|
||||
|
|
@ -35,7 +35,7 @@ RegisterPage::setError(QString err)
|
|||
emit registeringChanged();
|
||||
}
|
||||
void
|
||||
RegisterPage::setHsError(QString err)
|
||||
RegisterPage::setHsError(const QString &err)
|
||||
{
|
||||
hsError_ = err;
|
||||
emit hsErrorChanged();
|
||||
|
|
@ -50,7 +50,7 @@ RegisterPage::initialDeviceName() const
|
|||
}
|
||||
|
||||
void
|
||||
RegisterPage::setServer(QString server)
|
||||
RegisterPage::setServer(const QString &server)
|
||||
{
|
||||
if (server == lastServer)
|
||||
return;
|
||||
|
|
@ -165,7 +165,7 @@ RegisterPage::versionsCheck()
|
|||
}
|
||||
|
||||
void
|
||||
RegisterPage::checkUsername(QString name)
|
||||
RegisterPage::checkUsername(const QString &name)
|
||||
{
|
||||
usernameAvailable_ = usernameUnavailable_ = false;
|
||||
usernameError_.clear();
|
||||
|
|
@ -197,7 +197,9 @@ RegisterPage::checkUsername(QString name)
|
|||
}
|
||||
|
||||
void
|
||||
RegisterPage::startRegistration(QString username, QString password, QString devicename)
|
||||
RegisterPage::startRegistration(const QString &username,
|
||||
const QString &password,
|
||||
const QString &devicename)
|
||||
{
|
||||
// These inputs should still be alright, but check just in case
|
||||
if (!username.isEmpty() && !password.isEmpty() && usernameAvailable_ && supported_) {
|
||||
|
|
@ -206,7 +208,7 @@ RegisterPage::startRegistration(QString username, QString password, QString devi
|
|||
registering_ = true;
|
||||
emit registeringChanged();
|
||||
|
||||
connect(UIA::instance(), &UIA::error, this, [this](QString msg) {
|
||||
connect(UIA::instance(), &UIA::error, this, [this](const QString &msg) {
|
||||
setError(msg);
|
||||
disconnect(UIA::instance(), &UIA::error, this, nullptr);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue