aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ModPage.h
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-03-08 11:12:35 -0300
committerflow <thiagodonato300@gmail.com>2022-03-14 17:43:36 -0300
commit8409aa2571d57f015a634a220107d199e88ba2fd (patch)
treee57a9be808be1f4a19b7ae31b1ba846ca53a111b /launcher/ui/pages/modplatform/ModPage.h
parentb3c2a56ece925bc6fe327b8824c50f194610b5b9 (diff)
downloadPrismLauncher-8409aa2571d57f015a634a220107d199e88ba2fd.tar.gz
PrismLauncher-8409aa2571d57f015a634a220107d199e88ba2fd.tar.bz2
PrismLauncher-8409aa2571d57f015a634a220107d199e88ba2fd.zip
tidy: Fix clang-tidy issues on files changed in this PR
The checks used are roughly the same as the ones proposed in the clang-tidy PR (except perhaps that I used modernize-* instead of listing them individually,though I don't think this caused any readability detriments). In ModrinthModel.cpp and FlameModModel.cpp I ignored the modernize-avoid-c-arrays one, mostly because making the sorts array an std::array would most likely increase the code complexity because of the virtual function. Aside from that, the static_cast warning from Application.h was not dealt with, since it's not in this PR's scope.
Diffstat (limited to 'launcher/ui/pages/modplatform/ModPage.h')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index de66b3b0..58024260 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -14,36 +14,35 @@ namespace Ui {
class ModPage;
}
-/* This page handles most logic related to browsing and selecting mods to download.
- * By default, the methods provided work with net requests, to fetch data from remote APIs. */
+/* This page handles most logic related to browsing and selecting mods to download. */
class ModPage : public QWidget, public BasePage {
Q_OBJECT
public:
explicit ModPage(ModDownloadDialog* dialog, BaseInstance* instance, ModAPI* api);
- virtual ~ModPage();
+ ~ModPage() override;
/* Affects what the user sees */
- virtual QString displayName() const override = 0;
- virtual QIcon icon() const override = 0;
- virtual QString id() const override = 0;
- virtual QString helpPage() const override = 0;
+ auto displayName() const -> QString override = 0;
+ auto icon() const -> QIcon override = 0;
+ auto id() const -> QString override = 0;
+ auto helpPage() const -> QString override = 0;
/* Used internally */
- virtual QString metaEntryBase() const = 0;
- virtual QString debugName() const = 0;
+ virtual auto metaEntryBase() const -> QString = 0;
+ virtual auto debugName() const -> QString = 0;
- virtual bool shouldDisplay() const override = 0;
- virtual bool validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const = 0;
+ auto shouldDisplay() const -> bool override = 0;
+ virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const -> bool = 0;
- const ModAPI* apiProvider() const { return api.get(); };
+ auto apiProvider() const -> const ModAPI* { return api.get(); };
- ModPlatform::IndexedPack& getCurrent() { return current; }
+ auto getCurrent() -> ModPlatform::IndexedPack& { return current; }
void updateModVersions();
void openedImpl() override;
- bool eventFilter(QObject* watched, QEvent* event) override;
+ auto eventFilter(QObject* watched, QEvent* event) -> bool override;
BaseInstance* m_instance;