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) Permissions::Permissions(QString roomId, QObject *parent)
: QObject(parent) : QObject(parent)
, roomId_(roomId) , roomId_(std::move(roomId))
{ {
invalidate(); 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) : QAbstractListModel(parent)
, events(room_id.toStdString(), this) , room_id_(std::move(room_id))
, room_id_(room_id) , events(room_id_.toStdString(), this)
, manager_(manager) , manager_(manager)
, permissions_{room_id} , permissions_{room_id_}
{ {
lastMessage_.timestamp = 0; lastMessage_.timestamp = 0;
if (auto create = 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->isSpace_ = create->content.type == mtx::events::state::room_type::space;
this->isEncrypted_ = cache::isRoomEncrypted(room_id_.toStdString()); this->isEncrypted_ = cache::isRoomEncrypted(room_id_.toStdString());

View file

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