Fix some linting issues

This commit is contained in:
Joseph Donofry 2019-07-04 13:18:32 -04:00
parent 713f9dbe89
commit 175737c28b
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
2 changed files with 8 additions and 7 deletions

View file

@ -1575,7 +1575,7 @@ Cache::getRoomVersion(lmdb::txn &txn, lmdb::dbi &statesdb)
} }
} }
nhlog::db()->warn("m.room.create event is missing room version, assuming version \"1\""); nhlog::db()->warn("m.room.create event is missing room version, assuming version \"1\"");
return QString("1"); return QString("1");
} }
@ -2183,7 +2183,7 @@ to_json(json &j, const RoomInfo &info)
j["name"] = info.name; j["name"] = info.name;
j["topic"] = info.topic; j["topic"] = info.topic;
j["avatar_url"] = info.avatar_url; j["avatar_url"] = info.avatar_url;
j["version"] = info.version; j["version"] = info.version;
j["is_invite"] = info.is_invite; j["is_invite"] = info.is_invite;
j["join_rule"] = info.join_rule; j["join_rule"] = info.join_rule;
j["guest_access"] = info.guest_access; j["guest_access"] = info.guest_access;
@ -2198,10 +2198,11 @@ to_json(json &j, const RoomInfo &info)
void void
from_json(const json &j, RoomInfo &info) from_json(const json &j, RoomInfo &info)
{ {
info.name = j.at("name"); info.name = j.at("name");
info.topic = j.at("topic"); info.topic = j.at("topic");
info.avatar_url = j.at("avatar_url"); info.avatar_url = j.at("avatar_url");
info.version = j.value("version", QCoreApplication::translate("RoomInfo", "no version stored").toStdString()); info.version = j.value(
"version", QCoreApplication::translate("RoomInfo", "no version stored").toStdString());
info.is_invite = j.at("is_invite"); info.is_invite = j.at("is_invite");
info.join_rule = j.at("join_rule"); info.join_rule = j.at("join_rule");
info.guest_access = j.at("guest_access"); info.guest_access = j.at("guest_access");

View file

@ -206,7 +206,7 @@ RoomSettings::RoomSettings(const QString &room_id, QWidget *parent)
auto roomVersionLayout = new QHBoxLayout; auto roomVersionLayout = new QHBoxLayout;
roomVersionLayout->setMargin(0); roomVersionLayout->setMargin(0);
roomVersionLayout->addWidget(new QLabel(tr("Room Version"), this), roomVersionLayout->addWidget(new QLabel(tr("Room Version"), this),
Qt::AlignBottom | Qt::AlignLeft); Qt::AlignBottom | Qt::AlignLeft);
roomVersionLayout->addWidget(roomVersionLabel, 0, Qt::AlignBottom | Qt::AlignRight); roomVersionLayout->addWidget(roomVersionLabel, 0, Qt::AlignBottom | Qt::AlignRight);
auto notifLabel = new QLabel(tr("Notifications"), this); auto notifLabel = new QLabel(tr("Notifications"), this);