Fixup clang-tidy suggestion

This commit is contained in:
Nicolas Werner 2021-12-28 18:44:26 +01:00
parent 5a21029423
commit 960cf2995e
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 9 additions and 8 deletions

View file

@ -10,7 +10,7 @@
Permissions::Permissions(QString roomId, QObject *parent)
: QObject(parent)
, roomId_(roomId)
, roomId_(std::move(roomId))
{
invalidate();
}

View file

@ -330,17 +330,17 @@ qml_mtx_events::fromRoomEventType(qml_mtx_events::EventType t)
};
}
TimelineModel::TimelineModel(TimelineViewManager *manager, const QString &room_id, QObject *parent)
TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObject *parent)
: QAbstractListModel(parent)
, events(room_id.toStdString(), this)
, room_id_(room_id)
, room_id_(std::move(room_id))
, events(room_id_.toStdString(), this)
, manager_(manager)
, permissions_{room_id}
, permissions_{room_id_}
{
lastMessage_.timestamp = 0;
if (auto create =
cache::client()->getStateEvent<mtx::events::state::Create>(room_id.toStdString()))
cache::client()->getStateEvent<mtx::events::state::Create>(room_id_.toStdString()))
this->isSpace_ = create->content.type == mtx::events::state::room_type::space;
this->isEncrypted_ = cache::isRoomEncrypted(room_id_.toStdString());

View file

@ -189,7 +189,7 @@ class TimelineModel : public QAbstractListModel
public:
explicit TimelineModel(TimelineViewManager *manager,
const QString &room_id,
QString room_id,
QObject *parent = nullptr);
enum Roles
@ -421,11 +421,12 @@ private:
void setPaginationInProgress(const bool paginationInProgress);
QString room_id_;
QSet<QString> read;
mutable EventStore events;
QString room_id_;
QString currentId, currentReadId;
QString reply_, edit_;