aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-10 20:41:52 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2023-08-11 10:57:57 +0200
commitea43d0f687391db08459ea43794ee97b93e654fa (patch)
tree76a8bbbbe3fe4bb0518da61970732432c2e3d02b
parentef6f9487f48ee6f114d47108977380fb4c278597 (diff)
downloadPrismLauncher-ea43d0f687391db08459ea43794ee97b93e654fa.tar.gz
PrismLauncher-ea43d0f687391db08459ea43794ee97b93e654fa.tar.bz2
PrismLauncher-ea43d0f687391db08459ea43794ee97b93e654fa.zip
fix: fix more warnings
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
-rw-r--r--launcher/BaseVersion.h4
-rw-r--r--launcher/FileSystem.h12
-rw-r--r--launcher/Version.h2
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.h2
-rw-r--r--launcher/net/HeaderProxy.h4
-rw-r--r--launcher/net/NetRequest.h4
-rw-r--r--launcher/ui/themes/CatPack.h4
-rw-r--r--tests/Task_test.cpp2
8 files changed, 17 insertions, 17 deletions
diff --git a/launcher/BaseVersion.h b/launcher/BaseVersion.h
index c4c9a1c5..2837ff3a 100644
--- a/launcher/BaseVersion.h
+++ b/launcher/BaseVersion.h
@@ -43,8 +43,8 @@ class BaseVersion {
* the kind of version this is (Stable, Beta, Snapshot, whatever)
*/
virtual QString typeString() const = 0;
- virtual bool operator<(BaseVersion& a) { return name() < a.name(); };
- virtual bool operator>(BaseVersion& a) { return name() > a.name(); };
+ virtual bool operator<(BaseVersion& a) { return name() < a.name(); }
+ virtual bool operator>(BaseVersion& a) { return name() > a.name(); }
};
Q_DECLARE_METATYPE(BaseVersion::Ptr)
diff --git a/launcher/FileSystem.h b/launcher/FileSystem.h
index f8a82bae..2a4b2620 100644
--- a/launcher/FileSystem.h
+++ b/launcher/FileSystem.h
@@ -112,8 +112,8 @@ class copy : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
- int totalCopied() { return m_copied; }
- int totalFailed() { return m_failedPaths.length(); }
+ qsizetype totalCopied() { return m_copied; }
+ qsizetype totalFailed() { return m_failedPaths.length(); }
QStringList failed() { return m_failedPaths; }
signals:
@@ -130,7 +130,7 @@ class copy : public QObject {
bool m_whitelist = false;
QDir m_src;
QDir m_dst;
- int m_copied;
+ qsizetype m_copied;
QStringList m_failedPaths;
};
@@ -475,8 +475,8 @@ class clone : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
- int totalCloned() { return m_cloned; }
- int totalFailed() { return m_failedClones.length(); }
+ qsizetype totalCloned() { return m_cloned; }
+ qsizetype totalFailed() { return m_failedClones.length(); }
QList<QPair<QString, QString>> failed() { return m_failedClones; }
@@ -492,7 +492,7 @@ class clone : public QObject {
bool m_whitelist = false;
QDir m_src;
QDir m_dst;
- int m_cloned;
+ qsizetype m_cloned;
QList<QPair<QString, QString>> m_failedClones;
};
diff --git a/launcher/Version.h b/launcher/Version.h
index 659f8e54..df379082 100644
--- a/launcher/Version.h
+++ b/launcher/Version.h
@@ -63,7 +63,7 @@ class Version {
struct Section {
explicit Section(QString fullString) : m_fullString(std::move(fullString))
{
- int cutoff = m_fullString.size();
+ qsizetype cutoff = m_fullString.size();
for (int i = 0; i < m_fullString.size(); i++) {
if (!m_fullString[i].isDigit()) {
cutoff = i;
diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h
index 45a5cc3a..e7884894 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.h
+++ b/launcher/minecraft/mod/ResourceFolderModel.h
@@ -78,7 +78,7 @@ class ResourceFolderModel : public QAbstractListModel {
/** Creates a new parse task, if needed, for 'res' and start it.*/
virtual void resolveResource(Resource* res);
- [[nodiscard]] int size() const { return m_resources.size(); }
+ [[nodiscard]] qsizetype size() const { return m_resources.size(); }
[[nodiscard]] bool empty() const { return size() == 0; }
[[nodiscard]] Resource& at(int index) { return *m_resources.at(index); }
[[nodiscard]] Resource const& at(int index) const { return *m_resources.at(index); }
diff --git a/launcher/net/HeaderProxy.h b/launcher/net/HeaderProxy.h
index f41c5875..213c04c5 100644
--- a/launcher/net/HeaderProxy.h
+++ b/launcher/net/HeaderProxy.h
@@ -31,8 +31,8 @@ struct HeaderPair {
class HeaderProxy {
public:
- HeaderProxy(){};
- virtual ~HeaderProxy(){};
+ HeaderProxy(){}
+ virtual ~HeaderProxy(){}
public:
virtual QList<HeaderPair> headers(const QNetworkRequest& request) const = 0;
diff --git a/launcher/net/NetRequest.h b/launcher/net/NetRequest.h
index 9a602162..f91207ef 100644
--- a/launcher/net/NetRequest.h
+++ b/launcher/net/NetRequest.h
@@ -52,7 +52,7 @@ namespace Net {
class NetRequest : public NetAction {
Q_OBJECT
protected:
- explicit NetRequest() : NetAction(){};
+ explicit NetRequest() : NetAction(){}
public:
using Ptr = shared_qobject_ptr<class NetRequest>;
@@ -62,7 +62,7 @@ class NetRequest : public NetAction {
public:
~NetRequest() override = default;
- void init() override{};
+ void init() override{}
public:
void addValidator(Validator* v);
diff --git a/launcher/ui/themes/CatPack.h b/launcher/ui/themes/CatPack.h
index b03a19f0..fdd117a7 100644
--- a/launcher/ui/themes/CatPack.h
+++ b/launcher/ui/themes/CatPack.h
@@ -52,8 +52,8 @@ class BasicCatPack : public CatPack {
public:
BasicCatPack(QString id, QString name) : m_id(id), m_name(name) {}
BasicCatPack(QString id) : BasicCatPack(id, id) {}
- virtual QString id() { return m_id; };
- virtual QString name() { return m_name; };
+ virtual QString id() { return m_id; }
+ virtual QString name() { return m_name; }
virtual QString path();
protected:
diff --git a/tests/Task_test.cpp b/tests/Task_test.cpp
index eae3527d..5bc73765 100644
--- a/tests/Task_test.cpp
+++ b/tests/Task_test.cpp
@@ -19,7 +19,7 @@ class BasicTask : public Task {
BasicTask(bool show_debug_log = true) : Task(nullptr, show_debug_log) {}
private:
- void executeTask() override { emitSucceeded(); };
+ void executeTask() override { emitSucceeded(); }
};
/* Does nothing. Only used for testing. */