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

@ -46,7 +46,7 @@ public:
}
/** Returns whether the request has finished */
bool getFinished() const
[[nodiscard]] bool getFinished() const
{
return finished->text() == "True";
}
@ -74,13 +74,13 @@ public:
}
/** Returns the start time as a string */
QString getStartTime() const
[[nodiscard]] QString getStartTime() const
{
return startTime->text();
}
/** Returns the URL of the request */
QString getUrl() const
[[nodiscard]] QString getUrl() const
{
return url->text();
}

View file

@ -117,7 +117,7 @@ private:
QSet<QString> currentlyLoading; ///< Deduplication: contains pixmapCacheKey currently being loaded
/** @brief Returns cached redirect URL for the given original URL, if available. */
QUrl getCachedRedirect(const QUrl &originalUrl) const;
[[nodiscard]] QUrl getCachedRedirect(const QUrl &originalUrl) const;
/** @brief Loads redirect cache from disk. */
void loadRedirectCache();

View file

@ -37,25 +37,25 @@ public:
explicit CardPictureToLoad(const ExactCard &_card);
/** @return The card being loaded. */
const ExactCard &getCard() const
[[nodiscard]] const ExactCard &getCard() const
{
return card;
}
/** @return The current URL being attempted. */
QString getCurrentUrl() const
[[nodiscard]] QString getCurrentUrl() const
{
return currentUrl;
}
/** @return The current set being attempted. */
CardSetPtr getCurrentSet() const
[[nodiscard]] CardSetPtr getCurrentSet() const
{
return currentSet;
}
/** @return The short name of the current set, or empty string if no set. */
QString getSetName() const;
[[nodiscard]] QString getSetName() const;
/**
* @brief Transforms a URL template into a concrete URL for this card/set.