fix: fix more warnings

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-08-10 20:41:52 +02:00
parent ef6f9487f4
commit ea43d0f687
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951
8 changed files with 17 additions and 17 deletions

View File

@ -43,8 +43,8 @@ class BaseVersion {
* the kind of version this is (Stable, Beta, Snapshot, whatever) * the kind of version this is (Stable, Beta, Snapshot, whatever)
*/ */
virtual QString typeString() const = 0; 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) Q_DECLARE_METATYPE(BaseVersion::Ptr)

View File

@ -112,8 +112,8 @@ class copy : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); } bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
int totalCopied() { return m_copied; } qsizetype totalCopied() { return m_copied; }
int totalFailed() { return m_failedPaths.length(); } qsizetype totalFailed() { return m_failedPaths.length(); }
QStringList failed() { return m_failedPaths; } QStringList failed() { return m_failedPaths; }
signals: signals:
@ -130,7 +130,7 @@ class copy : public QObject {
bool m_whitelist = false; bool m_whitelist = false;
QDir m_src; QDir m_src;
QDir m_dst; QDir m_dst;
int m_copied; qsizetype m_copied;
QStringList m_failedPaths; QStringList m_failedPaths;
}; };
@ -475,8 +475,8 @@ class clone : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); } bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
int totalCloned() { return m_cloned; } qsizetype totalCloned() { return m_cloned; }
int totalFailed() { return m_failedClones.length(); } qsizetype totalFailed() { return m_failedClones.length(); }
QList<QPair<QString, QString>> failed() { return m_failedClones; } QList<QPair<QString, QString>> failed() { return m_failedClones; }
@ -492,7 +492,7 @@ class clone : public QObject {
bool m_whitelist = false; bool m_whitelist = false;
QDir m_src; QDir m_src;
QDir m_dst; QDir m_dst;
int m_cloned; qsizetype m_cloned;
QList<QPair<QString, QString>> m_failedClones; QList<QPair<QString, QString>> m_failedClones;
}; };

View File

@ -63,7 +63,7 @@ class Version {
struct Section { struct Section {
explicit Section(QString fullString) : m_fullString(std::move(fullString)) 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++) { for (int i = 0; i < m_fullString.size(); i++) {
if (!m_fullString[i].isDigit()) { if (!m_fullString[i].isDigit()) {
cutoff = i; cutoff = i;

View File

@ -78,7 +78,7 @@ class ResourceFolderModel : public QAbstractListModel {
/** Creates a new parse task, if needed, for 'res' and start it.*/ /** Creates a new parse task, if needed, for 'res' and start it.*/
virtual void resolveResource(Resource* res); 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]] bool empty() const { return size() == 0; }
[[nodiscard]] Resource& at(int index) { return *m_resources.at(index); } [[nodiscard]] Resource& at(int index) { return *m_resources.at(index); }
[[nodiscard]] Resource const& at(int index) const { return *m_resources.at(index); } [[nodiscard]] Resource const& at(int index) const { return *m_resources.at(index); }

View File

@ -31,8 +31,8 @@ struct HeaderPair {
class HeaderProxy { class HeaderProxy {
public: public:
HeaderProxy(){}; HeaderProxy(){}
virtual ~HeaderProxy(){}; virtual ~HeaderProxy(){}
public: public:
virtual QList<HeaderPair> headers(const QNetworkRequest& request) const = 0; virtual QList<HeaderPair> headers(const QNetworkRequest& request) const = 0;

View File

@ -52,7 +52,7 @@ namespace Net {
class NetRequest : public NetAction { class NetRequest : public NetAction {
Q_OBJECT Q_OBJECT
protected: protected:
explicit NetRequest() : NetAction(){}; explicit NetRequest() : NetAction(){}
public: public:
using Ptr = shared_qobject_ptr<class NetRequest>; using Ptr = shared_qobject_ptr<class NetRequest>;
@ -62,7 +62,7 @@ class NetRequest : public NetAction {
public: public:
~NetRequest() override = default; ~NetRequest() override = default;
void init() override{}; void init() override{}
public: public:
void addValidator(Validator* v); void addValidator(Validator* v);

View File

@ -52,8 +52,8 @@ class BasicCatPack : public CatPack {
public: public:
BasicCatPack(QString id, QString name) : m_id(id), m_name(name) {} BasicCatPack(QString id, QString name) : m_id(id), m_name(name) {}
BasicCatPack(QString id) : BasicCatPack(id, id) {} BasicCatPack(QString id) : BasicCatPack(id, id) {}
virtual QString id() { return m_id; }; virtual QString id() { return m_id; }
virtual QString name() { return m_name; }; virtual QString name() { return m_name; }
virtual QString path(); virtual QString path();
protected: protected:

View File

@ -19,7 +19,7 @@ class BasicTask : public Task {
BasicTask(bool show_debug_log = true) : Task(nullptr, show_debug_log) {} BasicTask(bool show_debug_log = true) : Task(nullptr, show_debug_log) {}
private: private:
void executeTask() override { emitSucceeded(); }; void executeTask() override { emitSucceeded(); }
}; };
/* Does nothing. Only used for testing. */ /* Does nothing. Only used for testing. */