summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-26 04:04:09 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-26 04:04:09 +0200
commitcca670013463f0062cec950d9b9bb76f9150ed93 (patch)
treef3a80479a0184f5f25af6c0ca42714cc7ba4e9c5 /logic
parent0af04dc060cfe94f25d1d3691c8bb87cbab1ecc5 (diff)
downloadMultiMC-cca670013463f0062cec950d9b9bb76f9150ed93.tar
MultiMC-cca670013463f0062cec950d9b9bb76f9150ed93.tar.gz
MultiMC-cca670013463f0062cec950d9b9bb76f9150ed93.tar.lz
MultiMC-cca670013463f0062cec950d9b9bb76f9150ed93.tar.xz
MultiMC-cca670013463f0062cec950d9b9bb76f9150ed93.zip
NOISSUE fix all clang warnings
Diffstat (limited to 'logic')
-rw-r--r--logic/BaseInstaller.h2
-rw-r--r--logic/BaseVersion.h3
-rw-r--r--logic/BaseVersionList.h2
-rw-r--r--logic/NullInstance.h28
-rw-r--r--logic/auth/MojangAccount.h1
-rw-r--r--logic/auth/YggdrasilTask.h2
-rw-r--r--logic/forge/ForgeVersionList.cpp2
-rw-r--r--logic/forge/ForgeVersionList.h18
-rw-r--r--logic/ftb/OneSixFTBInstance.h6
-rw-r--r--logic/java/JavaCheckerJob.h2
-rw-r--r--logic/java/JavaVersionList.cpp4
-rw-r--r--logic/java/JavaVersionList.h4
-rw-r--r--logic/launch/LaunchTask.h4
-rw-r--r--logic/liteloader/LiteLoaderVersionList.cpp2
-rw-r--r--logic/liteloader/LiteLoaderVersionList.h2
-rw-r--r--logic/minecraft/LegacyInstance.cpp2
-rw-r--r--logic/minecraft/LegacyInstance.h6
-rw-r--r--logic/minecraft/LwjglVersionList.h18
-rw-r--r--logic/minecraft/MinecraftInstance.h4
-rw-r--r--logic/minecraft/MinecraftProfile.cpp2
-rw-r--r--logic/minecraft/MinecraftProfile.h12
-rw-r--r--logic/minecraft/MinecraftVersionList.cpp2
-rw-r--r--logic/minecraft/MinecraftVersionList.h16
-rw-r--r--logic/minecraft/OneSixInstance.h6
-rw-r--r--logic/settings/INISettingsObject.h10
25 files changed, 80 insertions, 80 deletions
diff --git a/logic/BaseInstaller.h b/logic/BaseInstaller.h
index dd804085..a50c8cb1 100644
--- a/logic/BaseInstaller.h
+++ b/logic/BaseInstaller.h
@@ -24,7 +24,7 @@ class QDir;
class QString;
class QObject;
class Task;
-struct BaseVersion;
+class BaseVersion;
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
class MULTIMC_LOGIC_EXPORT BaseInstaller
diff --git a/logic/BaseVersion.h b/logic/BaseVersion.h
index 053fa7d2..80767518 100644
--- a/logic/BaseVersion.h
+++ b/logic/BaseVersion.h
@@ -22,8 +22,9 @@
/*!
* An abstract base class for versions.
*/
-struct BaseVersion
+class BaseVersion
{
+public:
virtual ~BaseVersion() {}
/*!
* A string used to identify this version in config files.
diff --git a/logic/BaseVersionList.h b/logic/BaseVersionList.h
index e8d0cca7..42ea77c0 100644
--- a/logic/BaseVersionList.h
+++ b/logic/BaseVersionList.h
@@ -104,7 +104,7 @@ public:
/*!
* Sorts the version list.
*/
- virtual void sort() = 0;
+ virtual void sortVersions() = 0;
protected
slots:
diff --git a/logic/NullInstance.h b/logic/NullInstance.h
index cf304f9f..dc2a8de3 100644
--- a/logic/NullInstance.h
+++ b/logic/NullInstance.h
@@ -16,11 +16,11 @@ public:
virtual void cleanupAfterRun() override
{
}
- virtual QString currentVersionId() const
+ virtual QString currentVersionId() const override
{
return "Null";
};
- virtual QString intendedVersionId() const
+ virtual QString intendedVersionId() const override
{
return "Null";
};
@@ -35,50 +35,50 @@ public:
{
return false;
};
- virtual QSet< QString > traits()
+ virtual QSet< QString > traits() override
{
return {};
};
- virtual QString instanceConfigFolder() const
+ virtual QString instanceConfigFolder() const override
{
return instanceRoot();
};
- virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr)
+ virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
{
return nullptr;
}
- virtual std::shared_ptr< Task > createUpdateTask()
+ virtual std::shared_ptr< Task > createUpdateTask() override
{
return nullptr;
}
- virtual std::shared_ptr<Task> createJarModdingTask()
+ virtual std::shared_ptr<Task> createJarModdingTask() override
{
return nullptr;
}
- virtual void setShouldUpdate(bool)
+ virtual void setShouldUpdate(bool) override
{
};
- virtual std::shared_ptr< BaseVersionList > versionList() const
+ virtual std::shared_ptr< BaseVersionList > versionList() const override
{
return nullptr;
};
- virtual QProcessEnvironment createEnvironment()
+ virtual QProcessEnvironment createEnvironment() override
{
return QProcessEnvironment();
}
- virtual QMap<QString, QString> getVariables() const
+ virtual QMap<QString, QString> getVariables() const override
{
return QMap<QString, QString>();
}
- virtual IPathMatcher::Ptr getLogFileMatcher()
+ virtual IPathMatcher::Ptr getLogFileMatcher() override
{
return nullptr;
}
- virtual QString getLogFileRoot()
+ virtual QString getLogFileRoot() override
{
return instanceRoot();
}
- virtual QString typeName() const
+ virtual QString typeName() const override
{
return "Null";
}
diff --git a/logic/auth/MojangAccount.h b/logic/auth/MojangAccount.h
index 5cf8a0f2..2de0c19c 100644
--- a/logic/auth/MojangAccount.h
+++ b/logic/auth/MojangAccount.h
@@ -26,7 +26,6 @@
#include "AuthSession.h"
#include "multimc_logic_export.h"
-MULTIMC_LOGIC_EXPORT
class Task;
class YggdrasilTask;
diff --git a/logic/auth/YggdrasilTask.h b/logic/auth/YggdrasilTask.h
index e81eeb44..d989bee3 100644
--- a/logic/auth/YggdrasilTask.h
+++ b/logic/auth/YggdrasilTask.h
@@ -83,7 +83,7 @@ public:
protected:
- virtual void executeTask();
+ virtual void executeTask() override;
/**
* Gets the JSON object that will be sent to the authentication server.
diff --git a/logic/forge/ForgeVersionList.cpp b/logic/forge/ForgeVersionList.cpp
index 7c0e851a..7f2176fd 100644
--- a/logic/forge/ForgeVersionList.cpp
+++ b/logic/forge/ForgeVersionList.cpp
@@ -108,7 +108,7 @@ void ForgeVersionList::updateListData(QList<BaseVersionPtr> versions)
// sort();
}
-void ForgeVersionList::sort()
+void ForgeVersionList::sortVersions()
{
// NO-OP for now
}
diff --git a/logic/forge/ForgeVersionList.h b/logic/forge/ForgeVersionList.h
index e2e8c3f8..dbf4b5de 100644
--- a/logic/forge/ForgeVersionList.h
+++ b/logic/forge/ForgeVersionList.h
@@ -35,20 +35,20 @@ public:
explicit ForgeVersionList(QObject *parent = 0);
- virtual Task *getLoadTask();
- virtual bool isLoaded();
- virtual const BaseVersionPtr at(int i) const;
- virtual int count() const;
- virtual void sort();
+ virtual Task *getLoadTask() override;
+ virtual bool isLoaded() override;
+ virtual const BaseVersionPtr at(int i) const override;
+ virtual int count() const override;
+ virtual void sortVersions() override;
- virtual BaseVersionPtr getLatestStable() const;
+ virtual BaseVersionPtr getLatestStable() const override;
ForgeVersionPtr findVersionByVersionNr(QString version);
- virtual QVariant data(const QModelIndex &index, int role) const;
+ virtual QVariant data(const QModelIndex &index, int role) const override;
virtual QList<ModelRoles> providesRoles() override;
- virtual int columnCount(const QModelIndex &parent) const;
+ virtual int columnCount(const QModelIndex &parent) const override;
protected:
QList<BaseVersionPtr> m_vlist;
@@ -57,7 +57,7 @@ protected:
protected
slots:
- virtual void updateListData(QList<BaseVersionPtr> versions);
+ virtual void updateListData(QList<BaseVersionPtr> versions) override;
};
class ForgeListLoadTask : public Task
diff --git a/logic/ftb/OneSixFTBInstance.h b/logic/ftb/OneSixFTBInstance.h
index c53a2ed8..35d8216b 100644
--- a/logic/ftb/OneSixFTBInstance.h
+++ b/logic/ftb/OneSixFTBInstance.h
@@ -13,16 +13,16 @@ public:
void copy(const QDir &newDir) override;
- virtual void createProfile();
+ virtual void createProfile() override;
virtual std::shared_ptr<Task> createUpdateTask() override;
- virtual QString id() const;
+ virtual QString id() const override;
QDir librariesPath() const override;
QDir versionsPath() const override;
bool providesVersionFile() const override;
- virtual QString typeName() const;
+ virtual QString typeName() const override;
private:
SettingsObjectPtr m_globalSettings;
diff --git a/logic/java/JavaCheckerJob.h b/logic/java/JavaCheckerJob.h
index 23003a03..d031c435 100644
--- a/logic/java/JavaCheckerJob.h
+++ b/logic/java/JavaCheckerJob.h
@@ -59,7 +59,7 @@ public:
{
return javacheckers.size();
}
- virtual bool isRunning() const
+ virtual bool isRunning() const override
{
return m_running;
}
diff --git a/logic/java/JavaVersionList.cpp b/logic/java/JavaVersionList.cpp
index a463ca6c..e3929f45 100644
--- a/logic/java/JavaVersionList.cpp
+++ b/logic/java/JavaVersionList.cpp
@@ -104,7 +104,7 @@ void JavaVersionList::updateListData(QList<BaseVersionPtr> versions)
m_vlist.push_back(std::make_shared<JavaVersion>("1.9.0_1", "32", "/foo/bar/baz"));
m_vlist.push_back(std::make_shared<JavaVersion>("1.9.0_1", "64", "/foo/bar/baz"));
*/
- sort();
+ sortVersions();
if(m_vlist.size())
{
auto best = std::dynamic_pointer_cast<JavaVersion>(m_vlist[0]);
@@ -136,7 +136,7 @@ bool sortJavas(BaseVersionPtr left, BaseVersionPtr right)
return labove19 < rabove19;
}
-void JavaVersionList::sort()
+void JavaVersionList::sortVersions()
{
beginResetModel();
std::sort(m_vlist.begin(), m_vlist.end(), sortJavas);
diff --git a/logic/java/JavaVersionList.h b/logic/java/JavaVersionList.h
index 905a5a7b..3acb5343 100644
--- a/logic/java/JavaVersionList.h
+++ b/logic/java/JavaVersionList.h
@@ -66,13 +66,13 @@ public:
virtual bool isLoaded() override;
virtual const BaseVersionPtr at(int i) const override;
virtual int count() const override;
- virtual void sort() override;
+ virtual void sortVersions() override;
virtual QVariant data(const QModelIndex &index, int role) const override;
virtual RoleList providesRoles() override;
public slots:
- virtual void updateListData(QList<BaseVersionPtr> versions);
+ virtual void updateListData(QList<BaseVersionPtr> versions) override;
protected:
QList<BaseVersionPtr> m_vlist;
diff --git a/logic/launch/LaunchTask.h b/logic/launch/LaunchTask.h
index eb13a72d..447445ca 100644
--- a/logic/launch/LaunchTask.h
+++ b/logic/launch/LaunchTask.h
@@ -85,8 +85,8 @@ public:
QString censorPrivateInfo(QString in);
protected: /* methods */
- virtual void emitFailed(QString reason);
- virtual void emitSucceeded();
+ virtual void emitFailed(QString reason) override;
+ virtual void emitSucceeded() override;
signals:
/**
diff --git a/logic/liteloader/LiteLoaderVersionList.cpp b/logic/liteloader/LiteLoaderVersionList.cpp
index 21bb4f50..c1b43cb8 100644
--- a/logic/liteloader/LiteLoaderVersionList.cpp
+++ b/logic/liteloader/LiteLoaderVersionList.cpp
@@ -61,7 +61,7 @@ static bool cmpVersions(BaseVersionPtr first, BaseVersionPtr second)
return left->timestamp > right->timestamp;
}
-void LiteLoaderVersionList::sort()
+void LiteLoaderVersionList::sortVersions()
{
beginResetModel();
std::sort(m_vlist.begin(), m_vlist.end(), cmpVersions);
diff --git a/logic/liteloader/LiteLoaderVersionList.h b/logic/liteloader/LiteLoaderVersionList.h
index e25f2c64..43bb270d 100644
--- a/logic/liteloader/LiteLoaderVersionList.h
+++ b/logic/liteloader/LiteLoaderVersionList.h
@@ -79,7 +79,7 @@ public:
virtual bool isLoaded();
virtual const BaseVersionPtr at(int i) const;
virtual int count() const;
- virtual void sort();
+ virtual void sortVersions();
virtual QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
virtual QList< ModelRoles > providesRoles();
diff --git a/logic/minecraft/LegacyInstance.cpp b/logic/minecraft/LegacyInstance.cpp
index f39f3c8b..342a6f2d 100644
--- a/logic/minecraft/LegacyInstance.cpp
+++ b/logic/minecraft/LegacyInstance.cpp
@@ -186,7 +186,7 @@ std::shared_ptr<Task> LegacyInstance::createJarModdingTask()
class JarModTask : public Task
{
public:
- explicit JarModTask(std::shared_ptr<LegacyInstance> inst) : m_inst(inst), Task(nullptr)
+ explicit JarModTask(std::shared_ptr<LegacyInstance> inst) : Task(nullptr), m_inst(inst)
{
}
virtual void executeTask()
diff --git a/logic/minecraft/LegacyInstance.h b/logic/minecraft/LegacyInstance.h
index 14f13b20..a2ab86de 100644
--- a/logic/minecraft/LegacyInstance.h
+++ b/logic/minecraft/LegacyInstance.h
@@ -29,7 +29,7 @@ public:
explicit LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
- virtual void init() {};
+ virtual void init() override {};
/// Path to the instance's minecraft.jar
QString runnableJar() const;
@@ -105,7 +105,7 @@ public:
virtual QString intendedVersionId() const override;
virtual bool setIntendedVersionId(QString version) override;
- virtual QSet<QString> traits()
+ virtual QSet<QString> traits() override
{
return {"legacy-instance", "texturepacks"};
};
@@ -120,7 +120,7 @@ public:
virtual void cleanupAfterRun() override;
- virtual QString typeName() const;
+ virtual QString typeName() const override;
protected:
mutable std::shared_ptr<ModList> jar_mod_list;
diff --git a/logic/minecraft/LwjglVersionList.h b/logic/minecraft/LwjglVersionList.h
index 84abaab1..f043f6e2 100644
--- a/logic/minecraft/LwjglVersionList.h
+++ b/logic/minecraft/LwjglVersionList.h
@@ -68,7 +68,7 @@ class MULTIMC_LOGIC_EXPORT LWJGLVersionList : public BaseVersionList
public:
explicit LWJGLVersionList(QObject *parent = 0);
- bool isLoaded()
+ bool isLoaded() override
{
return m_vlist.length() > 0;
}
@@ -77,27 +77,27 @@ public:
return m_vlist[i];
}
- virtual Task* getLoadTask()
+ virtual Task* getLoadTask() override
{
return nullptr;
}
- virtual void sort() {};
+ virtual void sortVersions() override {};
- virtual void updateListData(QList< BaseVersionPtr > versions) {};
+ virtual void updateListData(QList< BaseVersionPtr > versions) override {};
- int count() const
+ int count() const override
{
return m_vlist.length();
}
- virtual QVariant data(const QModelIndex &index, int role) const;
- virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- virtual int rowCount(const QModelIndex &parent) const
+ virtual QVariant data(const QModelIndex &index, int role) const override;
+ virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
+ virtual int rowCount(const QModelIndex &parent) const override
{
return count();
}
- virtual int columnCount(const QModelIndex &parent) const;
+ virtual int columnCount(const QModelIndex &parent) const override;
virtual bool isLoading() const;
virtual bool errored() const
diff --git a/logic/minecraft/MinecraftInstance.h b/logic/minecraft/MinecraftInstance.h
index b5483d1b..5381ce4f 100644
--- a/logic/minecraft/MinecraftInstance.h
+++ b/logic/minecraft/MinecraftInstance.h
@@ -37,7 +37,7 @@ public:
}
//FIXME: nuke?
- virtual std::shared_ptr< BaseVersionList > versionList() const;
+ virtual std::shared_ptr<BaseVersionList> versionList() const override;
/// get arguments passed to java
QStringList javaArguments() const;
@@ -49,7 +49,7 @@ public:
virtual QProcessEnvironment createEnvironment() override;
/// guess log level from a line of minecraft log
- virtual MessageLevel::Enum guessLevel(const QString &line, MessageLevel::Enum level);
+ virtual MessageLevel::Enum guessLevel(const QString &line, MessageLevel::Enum level) override;
virtual IPathMatcher::Ptr getLogFileMatcher() override;
diff --git a/logic/minecraft/MinecraftProfile.cpp b/logic/minecraft/MinecraftProfile.cpp
index 1baf008e..efeb254b 100644
--- a/logic/minecraft/MinecraftProfile.cpp
+++ b/logic/minecraft/MinecraftProfile.cpp
@@ -150,7 +150,7 @@ bool MinecraftProfile::customize(int index)
return true;
}
-bool MinecraftProfile::revert(int index)
+bool MinecraftProfile::revertToBase(int index)
{
auto patch = versionPatch(index);
if (!patch->isRevertible())
diff --git a/logic/minecraft/MinecraftProfile.h b/logic/minecraft/MinecraftProfile.h
index 6f56e848..7686c55b 100644
--- a/logic/minecraft/MinecraftProfile.h
+++ b/logic/minecraft/MinecraftProfile.h
@@ -45,11 +45,11 @@ public:
void setStrategy(ProfileStrategy * strategy);
ProfileStrategy *strategy();
- virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
- virtual int columnCount(const QModelIndex &parent) const;
- virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+ virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
+ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ virtual int columnCount(const QModelIndex &parent) const override;
+ virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
/// is this version unchanged by the user?
bool isVanilla();
@@ -75,7 +75,7 @@ public:
bool customize(int index);
- bool revert(int index);
+ bool revertToBase(int index);
void resetOrder();
diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp
index 8ba51b99..afa7c4c5 100644
--- a/logic/minecraft/MinecraftVersionList.cpp
+++ b/logic/minecraft/MinecraftVersionList.cpp
@@ -335,7 +335,7 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s
}
}
-void MinecraftVersionList::sort()
+void MinecraftVersionList::sortVersions()
{
beginResetModel();
sortInternal();
diff --git a/logic/minecraft/MinecraftVersionList.h b/logic/minecraft/MinecraftVersionList.h
index 110f8a66..e414a1da 100644
--- a/logic/minecraft/MinecraftVersionList.h
+++ b/logic/minecraft/MinecraftVersionList.h
@@ -47,13 +47,13 @@ public:
std::shared_ptr<Task> createUpdateTask(QString version);
- virtual Task *getLoadTask();
- virtual bool isLoaded();
- virtual const BaseVersionPtr at(int i) const;
- virtual int count() const;
- virtual void sort();
- virtual QVariant data(const QModelIndex & index, int role) const;
- virtual RoleList providesRoles();
+ virtual Task *getLoadTask() override;
+ virtual bool isLoaded() override;
+ virtual const BaseVersionPtr at(int i) const override;
+ virtual int count() const override;
+ virtual void sortVersions() override;
+ virtual QVariant data(const QModelIndex & index, int role) const override;
+ virtual RoleList providesRoles() override;
virtual BaseVersionPtr getLatestStable() const override;
virtual BaseVersionPtr getRecommended() const override;
@@ -69,5 +69,5 @@ protected:
protected
slots:
- virtual void updateListData(QList<BaseVersionPtr> versions);
+ virtual void updateListData(QList<BaseVersionPtr> versions) override;
};
diff --git a/logic/minecraft/OneSixInstance.h b/logic/minecraft/OneSixInstance.h
index 6d09b81a..824e3786 100644
--- a/logic/minecraft/OneSixInstance.h
+++ b/logic/minecraft/OneSixInstance.h
@@ -29,7 +29,7 @@ public:
explicit OneSixInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
virtual ~OneSixInstance(){};
- virtual void init();
+ virtual void init() override;
////// Mod Lists //////
std::shared_ptr<ModList> loaderModList() const;
@@ -40,7 +40,7 @@ public:
virtual QList<Mod> getJarMods() const override;
virtual void createProfile();
- virtual QSet<QString> traits();
+ virtual QSet<QString> traits() override;
////// Directories and files //////
QString jarModsDir() const;
@@ -90,7 +90,7 @@ public:
std::shared_ptr<OneSixInstance> getSharedPtr();
- virtual QString typeName() const;
+ virtual QString typeName() const override;
signals:
void versionReloaded();
diff --git a/logic/settings/INISettingsObject.h b/logic/settings/INISettingsObject.h
index 426b62f5..4afa2a2c 100644
--- a/logic/settings/INISettingsObject.h
+++ b/logic/settings/INISettingsObject.h
@@ -49,15 +49,15 @@ public:
bool reload() override;
- void suspendSave();
- void resumeSave();
+ void suspendSave() override;
+ void resumeSave() override;
protected slots:
- virtual void changeSetting(const Setting &setting, QVariant value);
- virtual void resetSetting(const Setting &setting);
+ virtual void changeSetting(const Setting &setting, QVariant value) override;
+ virtual void resetSetting(const Setting &setting) override;
protected:
- virtual QVariant retrieveValue(const Setting &setting);
+ virtual QVariant retrieveValue(const Setting &setting) override;
void doSave();
protected: