summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-06-09 01:57:10 +0200
committerPetr Mrázek <peterix@gmail.com>2014-06-09 01:57:10 +0200
commit0bccc94471d0223cf493ad860fa890614480433d (patch)
tree6b76f87da3da782eb1e0d083ad2b803fdabb83d1
parenta0a805735b568d57e09752c60c5afadbdfde5533 (diff)
downloadMultiMC-0bccc94471d0223cf493ad860fa890614480433d.tar
MultiMC-0bccc94471d0223cf493ad860fa890614480433d.tar.gz
MultiMC-0bccc94471d0223cf493ad860fa890614480433d.tar.lz
MultiMC-0bccc94471d0223cf493ad860fa890614480433d.tar.xz
MultiMC-0bccc94471d0223cf493ad860fa890614480433d.zip
Cleanup - QFileInfo derp and unused variables
-rw-r--r--gui/pages/VersionPage.cpp6
-rw-r--r--logic/OneSixFTBInstance.cpp1
-rw-r--r--logic/minecraft/InstanceVersion.cpp1
-rw-r--r--logic/minecraft/MinecraftVersionList.cpp6
4 files changed, 3 insertions, 11 deletions
diff --git a/gui/pages/VersionPage.cpp b/gui/pages/VersionPage.cpp
index 7cee0610..a59598a2 100644
--- a/gui/pages/VersionPage.cpp
+++ b/gui/pages/VersionPage.cpp
@@ -158,7 +158,8 @@ void VersionPage::on_jarmodBtn_clicked()
auto f = [&](QStandardPaths::StandardLocation l)
{
QString location = QStandardPaths::writableLocation(l);
- if (!QFileInfo::exists(location))
+ QFileInfo finfo(location);
+ if (!finfo.exists())
return;
locations.insert(location);
};
@@ -180,8 +181,7 @@ void VersionPage::on_jarmodBtn_clicked()
w.setSidebarUrls(urls);
if (w.exec())
- ;
- m_version->installJarMods(w.selectedFiles());
+ m_version->installJarMods(w.selectedFiles());
}
void VersionPage::on_resetLibraryOrderBtn_clicked()
diff --git a/logic/OneSixFTBInstance.cpp b/logic/OneSixFTBInstance.cpp
index ef9cb889..05918231 100644
--- a/logic/OneSixFTBInstance.cpp
+++ b/logic/OneSixFTBInstance.cpp
@@ -108,7 +108,6 @@ QDir OneSixFTBInstance::versionsPath() const
QStringList OneSixFTBInstance::externalPatches() const
{
- I_D(OneSixInstance);
return QStringList() << versionsPath().absoluteFilePath(intendedVersionId() + "/" + intendedVersionId() + ".json")
<< minecraftRoot() + "/pack.json";
}
diff --git a/logic/minecraft/InstanceVersion.cpp b/logic/minecraft/InstanceVersion.cpp
index baf34404..ca0e3796 100644
--- a/logic/minecraft/InstanceVersion.cpp
+++ b/logic/minecraft/InstanceVersion.cpp
@@ -357,7 +357,6 @@ int InstanceVersion::columnCount(const QModelIndex &parent) const
void InstanceVersion::saveCurrentOrder() const
{
PatchOrder order;
- int index = 0;
for(auto item: VersionPatches)
{
if(!item->isMoveable())
diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp
index b561606b..3aa1ac01 100644
--- a/logic/minecraft/MinecraftVersionList.cpp
+++ b/logic/minecraft/MinecraftVersionList.cpp
@@ -213,8 +213,6 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s
QList<BaseVersionPtr> tempList;
for (auto version : versions)
{
- bool is_snapshot = false;
-
// Load the version info.
if (!version.isObject())
{
@@ -274,19 +272,15 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s
// OneSix or Legacy. use filter to determine type
if (versionTypeStr == "release")
{
- is_snapshot = false;
}
else if (versionTypeStr == "snapshot") // It's a snapshot... yay
{
- is_snapshot = true;
}
else if (versionTypeStr == "old_alpha")
{
- is_snapshot = false;
}
else if (versionTypeStr == "old_beta")
{
- is_snapshot = false;
}
else
{