Reduce usage of [[nodiscard]] attributes (#3952)
This commit is contained in:
commit
e043242a8e
65 changed files with 329 additions and 327 deletions
|
@ -73,8 +73,8 @@ class ModpackListModel : public QAbstractListModel {
|
|||
void refresh();
|
||||
void searchWithTerm(const QString& term, int sort, std::shared_ptr<ModFilterWidget::Filter> filter, bool filterChanged);
|
||||
|
||||
[[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); }
|
||||
[[nodiscard]] Task::Ptr activeSearchJob() { return hasActiveSearchJob() ? jobPtr : nullptr; }
|
||||
bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); }
|
||||
Task::Ptr activeSearchJob() { return hasActiveSearchJob() ? jobPtr : nullptr; }
|
||||
|
||||
void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class ModrinthPage : public QWidget, public ModpackProviderBasePage {
|
|||
/** Programatically set the term in the search bar. */
|
||||
virtual void setSearchTerm(QString) override;
|
||||
/** Get the current term in the search bar. */
|
||||
[[nodiscard]] virtual QString getSerachTerm() const override;
|
||||
virtual QString getSerachTerm() const override;
|
||||
|
||||
private slots:
|
||||
void onSelectionChanged(QModelIndex first, QModelIndex second);
|
||||
|
|
|
@ -35,8 +35,8 @@ class ModrinthModModel : public ModModel {
|
|||
~ModrinthModModel() override = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]] QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
|
@ -54,8 +54,8 @@ class ModrinthResourcePackModel : public ResourcePackResourceModel {
|
|||
~ModrinthResourcePackModel() override = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]] QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
|
@ -72,8 +72,8 @@ class ModrinthTexturePackModel : public TexturePackResourceModel {
|
|||
~ModrinthTexturePackModel() override = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]] QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
|
@ -90,8 +90,8 @@ class ModrinthShaderPackModel : public ShaderPackResourceModel {
|
|||
~ModrinthShaderPackModel() override = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]] QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
|
@ -108,8 +108,8 @@ class ModrinthDataPackModel : public DataPackResourceModel {
|
|||
~ModrinthDataPackModel() override = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]] QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
QString debugName() const override { return Modrinth::debugName() + " (Model)"; }
|
||||
QString metaEntryBase() const override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
|
|
|
@ -85,15 +85,15 @@ class ModrinthModPage : public ModPage {
|
|||
ModrinthModPage(ModDownloadDialog* dialog, BaseInstance& instance);
|
||||
~ModrinthModPage() override = default;
|
||||
|
||||
[[nodiscard]] bool shouldDisplay() const override;
|
||||
bool shouldDisplay() const override;
|
||||
|
||||
[[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
[[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
[[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
[[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
[[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return "Mod-platform"; }
|
||||
inline auto helpPage() const -> QString override { return "Mod-platform"; }
|
||||
|
||||
std::unique_ptr<ModFilterWidget> createFilterWidget() override;
|
||||
|
||||
|
@ -114,15 +114,15 @@ class ModrinthResourcePackPage : public ResourcePackResourcePage {
|
|||
ModrinthResourcePackPage(ResourcePackDownloadDialog* dialog, BaseInstance& instance);
|
||||
~ModrinthResourcePackPage() override = default;
|
||||
|
||||
[[nodiscard]] bool shouldDisplay() const override;
|
||||
bool shouldDisplay() const override;
|
||||
|
||||
[[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
[[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
[[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
[[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
[[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return ""; }
|
||||
inline auto helpPage() const -> QString override { return ""; }
|
||||
};
|
||||
|
||||
class ModrinthTexturePackPage : public TexturePackResourcePage {
|
||||
|
@ -137,15 +137,15 @@ class ModrinthTexturePackPage : public TexturePackResourcePage {
|
|||
ModrinthTexturePackPage(TexturePackDownloadDialog* dialog, BaseInstance& instance);
|
||||
~ModrinthTexturePackPage() override = default;
|
||||
|
||||
[[nodiscard]] bool shouldDisplay() const override;
|
||||
bool shouldDisplay() const override;
|
||||
|
||||
[[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
[[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
[[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
[[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
[[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return ""; }
|
||||
inline auto helpPage() const -> QString override { return ""; }
|
||||
};
|
||||
|
||||
class ModrinthShaderPackPage : public ShaderPackResourcePage {
|
||||
|
@ -160,15 +160,15 @@ class ModrinthShaderPackPage : public ShaderPackResourcePage {
|
|||
ModrinthShaderPackPage(ShaderPackDownloadDialog* dialog, BaseInstance& instance);
|
||||
~ModrinthShaderPackPage() override = default;
|
||||
|
||||
[[nodiscard]] bool shouldDisplay() const override;
|
||||
bool shouldDisplay() const override;
|
||||
|
||||
[[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
[[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
[[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
[[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
[[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return ""; }
|
||||
inline auto helpPage() const -> QString override { return ""; }
|
||||
};
|
||||
|
||||
class ModrinthDataPackPage : public DataPackResourcePage {
|
||||
|
@ -183,15 +183,15 @@ class ModrinthDataPackPage : public DataPackResourcePage {
|
|||
ModrinthDataPackPage(DataPackDownloadDialog* dialog, BaseInstance& instance);
|
||||
~ModrinthDataPackPage() override = default;
|
||||
|
||||
[[nodiscard]] bool shouldDisplay() const override;
|
||||
bool shouldDisplay() const override;
|
||||
|
||||
[[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
[[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
[[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
[[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
[[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
inline auto displayName() const -> QString override { return Modrinth::displayName(); }
|
||||
inline auto icon() const -> QIcon override { return Modrinth::icon(); }
|
||||
inline auto id() const -> QString override { return Modrinth::id(); }
|
||||
inline auto debugName() const -> QString override { return Modrinth::debugName(); }
|
||||
inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); }
|
||||
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return ""; }
|
||||
inline auto helpPage() const -> QString override { return ""; }
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue