InputBar: Mark some functions as [[nodiscard]]

This warns when you the return value of those functions isn't used.

Suggested-by: Clang-Tidy: Function X should be marked [[nodiscard]]
This commit is contained in:
Marcus Hoffmann 2021-12-03 01:34:34 +01:00
parent 9676b7709d
commit a9d8059fb2

View file

@ -45,19 +45,19 @@ public:
}
public slots:
QString text() const;
[[nodiscard]] QString text() const;
QString previousText();
QString nextText();
void setText(const QString& newText);
bool containsAtRoom() const { return containsAtRoom_; }
[[nodiscard]] bool containsAtRoom() const { return containsAtRoom_; }
void send();
void paste(bool fromMouse);
void insertMimeData(const QMimeData *data);
void updateState(int selectionStart, int selectionEnd, int cursorPosition, const QString& text);
void openFileSelection();
bool uploading() const { return uploading_; }
[[nodiscard]] bool uploading() const { return uploading_; }
void message(const QString& body,
MarkdownOverride useMarkdown = MarkdownOverride::NOT_SPECIFIED,
bool rainbowify = false);