Mark more functions as [[nodiscard]] (#6320)

* Fix local variable double declaration.

Took 44 seconds

* Mark functions as [[nodiscard]]

Took 31 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-11-16 01:39:24 +01:00 committed by GitHub
parent 27708d5964
commit 73763b5ee6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 258 additions and 257 deletions

View file

@ -45,10 +45,10 @@ public:
QGraphicsItem *parent = nullptr,
QAction *_doubleClickAction = nullptr,
bool _highlightable = true);
QRectF boundingRect() const override;
[[nodiscard]] QRectF boundingRect() const override;
void setWidth(double _width);
void setActive(bool _active);
bool getActive() const
[[nodiscard]] bool getActive() const
{
return active;
}
@ -77,18 +77,18 @@ private:
public:
explicit PhasesToolbar(QGraphicsItem *parent = nullptr);
QRectF boundingRect() const override;
[[nodiscard]] QRectF boundingRect() const override;
void retranslateUi();
void setHeight(double _height);
double getWidth() const
[[nodiscard]] double getWidth() const
{
return width;
}
int phaseCount() const
[[nodiscard]] int phaseCount() const
{
return buttonList.size();
}
QString getLongPhaseName(int phase) const;
[[nodiscard]] QString getLongPhaseName(int phase) const;
public slots:
void setActivePhase(int phase);
void triggerPhaseAction(int phase);