mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Apply (selective) Clang-tidy const function and new const pointer suggestions on TimelineModel
This commit is contained in:
parent
a872bdf8c5
commit
049613211a
2 changed files with 9 additions and 9 deletions
|
@ -1027,13 +1027,13 @@ TimelineModel::readEvent(const std::string &id)
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
TimelineModel::displayName(QString id) const
|
TimelineModel::displayName(const QString &id) const
|
||||||
{
|
{
|
||||||
return cache::displayName(room_id_, id).toHtmlEscaped();
|
return cache::displayName(room_id_, id).toHtmlEscaped();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
TimelineModel::avatarUrl(QString id) const
|
TimelineModel::avatarUrl(const QString &id) const
|
||||||
{
|
{
|
||||||
return cache::avatarUrl(room_id_, id);
|
return cache::avatarUrl(room_id_, id);
|
||||||
}
|
}
|
||||||
|
@ -1093,9 +1093,9 @@ TimelineModel::openUserProfile(QString userid)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TimelineModel::replyAction(QString id)
|
TimelineModel::replyAction(const QString &id)
|
||||||
{
|
{
|
||||||
setReply(std::move(id));
|
setReply(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -242,8 +242,8 @@ public:
|
||||||
bool canFetchMore(const QModelIndex &) const override;
|
bool canFetchMore(const QModelIndex &) const override;
|
||||||
void fetchMore(const QModelIndex &) override;
|
void fetchMore(const QModelIndex &) override;
|
||||||
|
|
||||||
Q_INVOKABLE QString displayName(QString id) const;
|
Q_INVOKABLE QString displayName(const QString &id) const;
|
||||||
Q_INVOKABLE QString avatarUrl(QString id) const;
|
Q_INVOKABLE QString avatarUrl(const QString &id) const;
|
||||||
Q_INVOKABLE QString formatDateSeparator(QDate date) const;
|
Q_INVOKABLE QString formatDateSeparator(QDate date) const;
|
||||||
Q_INVOKABLE QString formatTypingUsers(const std::vector<QString> &users, const QColor &bg);
|
Q_INVOKABLE QString formatTypingUsers(const std::vector<QString> &users, const QColor &bg);
|
||||||
Q_INVOKABLE bool showAcceptKnockButton(const QString &id);
|
Q_INVOKABLE bool showAcceptKnockButton(const QString &id);
|
||||||
|
@ -260,7 +260,7 @@ public:
|
||||||
Q_INVOKABLE void viewDecryptedRawMessage(const QString &id);
|
Q_INVOKABLE void viewDecryptedRawMessage(const QString &id);
|
||||||
Q_INVOKABLE void openUserProfile(QString userid);
|
Q_INVOKABLE void openUserProfile(QString userid);
|
||||||
Q_INVOKABLE void editAction(QString id);
|
Q_INVOKABLE void editAction(QString id);
|
||||||
Q_INVOKABLE void replyAction(QString id);
|
Q_INVOKABLE void replyAction(const QString &id);
|
||||||
Q_INVOKABLE void unpin(const QString &id);
|
Q_INVOKABLE void unpin(const QString &id);
|
||||||
Q_INVOKABLE void pin(const QString &id);
|
Q_INVOKABLE void pin(const QString &id);
|
||||||
Q_INVOKABLE void showReadReceipts(QString id);
|
Q_INVOKABLE void showReadReceipts(QString id);
|
||||||
|
@ -367,8 +367,8 @@ public slots:
|
||||||
QString roomAvatarUrl() const;
|
QString roomAvatarUrl() const;
|
||||||
QString roomId() const { return room_id_; }
|
QString roomId() const { return room_id_; }
|
||||||
|
|
||||||
bool hasMentions() { return highlight_count > 0; }
|
bool hasMentions() const { return highlight_count > 0; }
|
||||||
int notificationCount() { return notification_count; }
|
int notificationCount() const { return notification_count; }
|
||||||
|
|
||||||
QString scrollTarget() const;
|
QString scrollTarget() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue