Cleanup - QFileInfo derp and unused variables
This commit is contained in:
parent
a0a805735b
commit
0bccc94471
@ -158,7 +158,8 @@ void VersionPage::on_jarmodBtn_clicked()
|
|||||||
auto f = [&](QStandardPaths::StandardLocation l)
|
auto f = [&](QStandardPaths::StandardLocation l)
|
||||||
{
|
{
|
||||||
QString location = QStandardPaths::writableLocation(l);
|
QString location = QStandardPaths::writableLocation(l);
|
||||||
if (!QFileInfo::exists(location))
|
QFileInfo finfo(location);
|
||||||
|
if (!finfo.exists())
|
||||||
return;
|
return;
|
||||||
locations.insert(location);
|
locations.insert(location);
|
||||||
};
|
};
|
||||||
@ -180,8 +181,7 @@ void VersionPage::on_jarmodBtn_clicked()
|
|||||||
w.setSidebarUrls(urls);
|
w.setSidebarUrls(urls);
|
||||||
|
|
||||||
if (w.exec())
|
if (w.exec())
|
||||||
;
|
m_version->installJarMods(w.selectedFiles());
|
||||||
m_version->installJarMods(w.selectedFiles());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VersionPage::on_resetLibraryOrderBtn_clicked()
|
void VersionPage::on_resetLibraryOrderBtn_clicked()
|
||||||
|
@ -108,7 +108,6 @@ QDir OneSixFTBInstance::versionsPath() const
|
|||||||
|
|
||||||
QStringList OneSixFTBInstance::externalPatches() const
|
QStringList OneSixFTBInstance::externalPatches() const
|
||||||
{
|
{
|
||||||
I_D(OneSixInstance);
|
|
||||||
return QStringList() << versionsPath().absoluteFilePath(intendedVersionId() + "/" + intendedVersionId() + ".json")
|
return QStringList() << versionsPath().absoluteFilePath(intendedVersionId() + "/" + intendedVersionId() + ".json")
|
||||||
<< minecraftRoot() + "/pack.json";
|
<< minecraftRoot() + "/pack.json";
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,6 @@ int InstanceVersion::columnCount(const QModelIndex &parent) const
|
|||||||
void InstanceVersion::saveCurrentOrder() const
|
void InstanceVersion::saveCurrentOrder() const
|
||||||
{
|
{
|
||||||
PatchOrder order;
|
PatchOrder order;
|
||||||
int index = 0;
|
|
||||||
for(auto item: VersionPatches)
|
for(auto item: VersionPatches)
|
||||||
{
|
{
|
||||||
if(!item->isMoveable())
|
if(!item->isMoveable())
|
||||||
|
@ -213,8 +213,6 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s
|
|||||||
QList<BaseVersionPtr> tempList;
|
QList<BaseVersionPtr> tempList;
|
||||||
for (auto version : versions)
|
for (auto version : versions)
|
||||||
{
|
{
|
||||||
bool is_snapshot = false;
|
|
||||||
|
|
||||||
// Load the version info.
|
// Load the version info.
|
||||||
if (!version.isObject())
|
if (!version.isObject())
|
||||||
{
|
{
|
||||||
@ -274,19 +272,15 @@ void MinecraftVersionList::loadMojangList(QJsonDocument jsonDoc, VersionSource s
|
|||||||
// OneSix or Legacy. use filter to determine type
|
// OneSix or Legacy. use filter to determine type
|
||||||
if (versionTypeStr == "release")
|
if (versionTypeStr == "release")
|
||||||
{
|
{
|
||||||
is_snapshot = false;
|
|
||||||
}
|
}
|
||||||
else if (versionTypeStr == "snapshot") // It's a snapshot... yay
|
else if (versionTypeStr == "snapshot") // It's a snapshot... yay
|
||||||
{
|
{
|
||||||
is_snapshot = true;
|
|
||||||
}
|
}
|
||||||
else if (versionTypeStr == "old_alpha")
|
else if (versionTypeStr == "old_alpha")
|
||||||
{
|
{
|
||||||
is_snapshot = false;
|
|
||||||
}
|
}
|
||||||
else if (versionTypeStr == "old_beta")
|
else if (versionTypeStr == "old_beta")
|
||||||
{
|
{
|
||||||
is_snapshot = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user