Cleanup - QFileInfo derp and unused variables

This commit is contained in:
Petr Mrázek 2014-06-09 01:57:10 +02:00
parent a0a805735b
commit 0bccc94471
4 changed files with 3 additions and 11 deletions

View File

@ -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()

View File

@ -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";
}

View File

@ -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())

View File

@ -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
{