summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/ModFolderPage.cpp13
-rw-r--r--application/pages/VersionPage.cpp9
2 files changed, 14 insertions, 8 deletions
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index bbe16671..cef4ed73 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -47,8 +47,7 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
ui->modTreeView->setModel(m_mods.get());
ui->modTreeView->installEventFilter(this);
auto smodel = ui->modTreeView->selectionModel();
- connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- SLOT(modCurrent(QModelIndex, QModelIndex)));
+ connect(smodel, &QItemSelectionModel::currentChanged, this, &ModFolderPage::modCurrent);
}
void ModFolderPage::opened()
@@ -91,7 +90,15 @@ bool CoreModFolderPage::shouldDisplay() const
auto version = inst->getMinecraftProfile();
if (!version)
return true;
- if (version->m_releaseTime < g_VersionFilterData.legacyCutoffDate)
+ if(!version->versionPatch("net.minecraftforge"))
+ {
+ return false;
+ }
+ if(!version->versionPatch("net.minecraft"))
+ {
+ return false;
+ }
+ if(version->versionPatch("net.minecraft")->getReleaseDateTime() < g_VersionFilterData.legacyCutoffDate)
{
return true;
}
diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp
index 42e4a9bf..137abcfc 100644
--- a/application/pages/VersionPage.cpp
+++ b/application/pages/VersionPage.cpp
@@ -156,10 +156,10 @@ void VersionPage::packageCurrent(const QModelIndex &current, const QModelIndex &
switch(severity)
{
case PROBLEM_WARNING:
- ui->frame->setModText(tr("%1 possibly has issues.").arg(patch->getPatchName()));
+ ui->frame->setModText(tr("%1 possibly has issues.").arg(patch->getName()));
break;
case PROBLEM_ERROR:
- ui->frame->setModText(tr("%1 has issues!").arg(patch->getPatchName()));
+ ui->frame->setModText(tr("%1 has issues!").arg(patch->getName()));
break;
default:
case PROBLEM_NONE:
@@ -251,8 +251,7 @@ void VersionPage::on_modBtn_clicked()
void VersionPage::on_jarmodBtn_clicked()
{
bool nagShown = false;
- auto traits = m_version->traits;
- if (!traits.contains("legacyLaunch") && !traits.contains("alphaLaunch"))
+ if (!m_version->hasTrait("legacyLaunch") && !m_version->hasTrait("alphaLaunch"))
{
// not legacy launch... nag
auto seenNag = MMC->settings()->get("JarModNagSeen").toBool();
@@ -513,7 +512,7 @@ void VersionPage::on_editBtn_clicked()
{
return;
}
- auto filename = version->getPatchFilename();
+ auto filename = version->getFilename();
if(!QFileInfo::exists(filename))
{
qWarning() << "file" << filename << "can't be opened for editing, doesn't exist!";