summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/InstanceSettingsPage.h4
-rw-r--r--application/pages/LegacyJarModPage.h8
-rw-r--r--application/pages/LegacyUpgradePage.h2
-rw-r--r--application/pages/LogPage.h6
-rw-r--r--application/pages/ModFolderPage.h8
-rw-r--r--application/pages/NotesPage.h2
-rw-r--r--application/pages/ScreenshotsPage.cpp3
-rw-r--r--application/pages/ScreenshotsPage.h2
-rw-r--r--application/pages/VersionPage.cpp8
-rw-r--r--application/pages/VersionPage.h4
-rw-r--r--application/pages/WorldListPage.cpp2
-rw-r--r--application/pages/WorldListPage.h8
-rw-r--r--application/pages/global/ExternalToolsPage.h2
13 files changed, 29 insertions, 30 deletions
diff --git a/application/pages/InstanceSettingsPage.h b/application/pages/InstanceSettingsPage.h
index f85de678..1fc0bdfe 100644
--- a/application/pages/InstanceSettingsPage.h
+++ b/application/pages/InstanceSettingsPage.h
@@ -49,12 +49,12 @@ public:
{
return "settings";
}
- virtual bool apply();
+ virtual bool apply() override;
virtual QString helpPage() const override
{
return "Instance-settings";
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
private slots:
void on_javaDetectBtn_clicked();
diff --git a/application/pages/LegacyJarModPage.h b/application/pages/LegacyJarModPage.h
index 9ca862ff..698e7ff6 100644
--- a/application/pages/LegacyJarModPage.h
+++ b/application/pages/LegacyJarModPage.h
@@ -36,15 +36,15 @@ public:
explicit LegacyJarModPage(LegacyInstance *inst, QWidget *parent = 0);
virtual ~LegacyJarModPage();
- virtual QString displayName() const
+ virtual QString displayName() const override
{
return tr("Jar Mods");
}
- virtual QIcon icon() const
+ virtual QIcon icon() const override
{
return MMC->getThemedIcon("jarmods");
}
- virtual QString id() const
+ virtual QString id() const override
{
return "jarmods";
}
@@ -52,7 +52,7 @@ public:
{
return "Legacy-jar-mods";
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
private
slots:
diff --git a/application/pages/LegacyUpgradePage.h b/application/pages/LegacyUpgradePage.h
index f39bff95..8d1131c8 100644
--- a/application/pages/LegacyUpgradePage.h
+++ b/application/pages/LegacyUpgradePage.h
@@ -49,7 +49,7 @@ public:
{
return "Legacy-upgrade";
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
private
slots:
void on_upgradeButton_clicked();
diff --git a/application/pages/LogPage.h b/application/pages/LogPage.h
index 169319a3..b34a63af 100644
--- a/application/pages/LogPage.h
+++ b/application/pages/LogPage.h
@@ -48,13 +48,13 @@ public:
{
return "console";
}
- virtual bool apply();
+ virtual bool apply() override;
virtual QString helpPage() const override
{
return "Minecraft-Logs";
}
- virtual bool shouldDisplay() const;
- virtual void setParentContainer(BasePageContainer *);
+ virtual bool shouldDisplay() const override;
+ virtual void setParentContainer(BasePageContainer *) override;
private slots:
/**
diff --git a/application/pages/ModFolderPage.h b/application/pages/ModFolderPage.h
index cbd98cb7..0870aa64 100644
--- a/application/pages/ModFolderPage.h
+++ b/application/pages/ModFolderPage.h
@@ -58,12 +58,12 @@ public:
{
return m_helpName;
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
- virtual void opened();
- virtual void closed();
+ virtual void opened() override;
+ virtual void closed() override;
protected:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(QObject *obj, QEvent *ev) override;
bool modListFilter(QKeyEvent *ev);
protected:
diff --git a/application/pages/NotesPage.h b/application/pages/NotesPage.h
index e9e5aa48..c259d60e 100644
--- a/application/pages/NotesPage.h
+++ b/application/pages/NotesPage.h
@@ -48,7 +48,7 @@ public:
{
return "notes";
}
- virtual bool apply();
+ virtual bool apply() override;
virtual QString helpPage() const override
{
return "Notes";
diff --git a/application/pages/ScreenshotsPage.cpp b/application/pages/ScreenshotsPage.cpp
index 9174b33b..2a8d7a43 100644
--- a/application/pages/ScreenshotsPage.cpp
+++ b/application/pages/ScreenshotsPage.cpp
@@ -73,7 +73,6 @@ public:
small = image.scaledToWidth(512).scaledToWidth(256, Qt::SmoothTransformation);
else
small = image.scaledToHeight(512).scaledToHeight(256, Qt::SmoothTransformation);
- auto smallSize = small.size();
QPoint offset((256 - small.width()) / 2, (256 - small.height()) / 2);
QImage square(QSize(256, 256), QImage::Format_ARGB32);
square.fill(Qt::transparent);
@@ -302,7 +301,7 @@ void ScreenshotsPage::on_uploadBtn_clicked()
task.addTask(job.unwrap());
task.addTask(albumTask.unwrap());
ProgressDialog prog(this);
- if (prog.exec(&task) != QDialog::Accepted)
+ if (prog.execWithTask(&task) != QDialog::Accepted)
{
CustomMessageBox::selectable(this, tr("Failed to upload screenshots!"),
tr("Unknown error"), QMessageBox::Warning)->exec();
diff --git a/application/pages/ScreenshotsPage.h b/application/pages/ScreenshotsPage.h
index f5700ba8..f19ff35f 100644
--- a/application/pages/ScreenshotsPage.h
+++ b/application/pages/ScreenshotsPage.h
@@ -46,7 +46,7 @@ public:
NothingDone = 0x42
};
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(QObject *, QEvent *) override;
virtual QString displayName() const override
{
return tr("Screenshots");
diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp
index 36091630..e6933da7 100644
--- a/application/pages/VersionPage.cpp
+++ b/application/pages/VersionPage.cpp
@@ -275,7 +275,7 @@ int VersionPage::doUpdate()
}
ProgressDialog tDialog(this);
connect(updateTask.get(), SIGNAL(failed(QString)), SLOT(onGameUpdateError(QString)));
- int ret = tDialog.exec(updateTask.get());
+ int ret = tDialog.execWithTask(updateTask.get());
updateButtons();
return ret;
}
@@ -290,7 +290,7 @@ void VersionPage::on_forgeBtn_clicked()
if (vselect.exec() && vselect.selectedVersion())
{
ProgressDialog dialog(this);
- dialog.exec(
+ dialog.execWithTask(
ForgeInstaller().createInstallTask(m_inst, vselect.selectedVersion(), this));
preselect(m_version->rowCount(QModelIndex())-1);
}
@@ -307,7 +307,7 @@ void VersionPage::on_liteloaderBtn_clicked()
if (vselect.exec() && vselect.selectedVersion())
{
ProgressDialog dialog(this);
- dialog.exec(
+ dialog.execWithTask(
LiteLoaderInstaller().createInstallTask(m_inst, vselect.selectedVersion(), this));
preselect(m_version->rowCount(QModelIndex())-1);
}
@@ -447,7 +447,7 @@ void VersionPage::on_revertBtn_clicked()
return;
}
}
- if(!m_version->revert(version))
+ if(!m_version->revertToBase(version))
{
// TODO: some error box here
}
diff --git a/application/pages/VersionPage.h b/application/pages/VersionPage.h
index bd22e140..8f2bf024 100644
--- a/application/pages/VersionPage.h
+++ b/application/pages/VersionPage.h
@@ -45,9 +45,9 @@ public:
{
return "Instance-Versions";
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
- virtual void setParentContainer(BasePageContainer *);
+ virtual void setParentContainer(BasePageContainer *) override;
private slots:
void on_forgeBtn_clicked();
diff --git a/application/pages/WorldListPage.cpp b/application/pages/WorldListPage.cpp
index a952d02c..6bea9dbd 100644
--- a/application/pages/WorldListPage.cpp
+++ b/application/pages/WorldListPage.cpp
@@ -31,7 +31,7 @@
WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr<WorldList> worlds, QString id,
QString iconName, QString displayName, QString helpPage,
QWidget *parent)
- : QWidget(parent), ui(new Ui::WorldListPage), m_worlds(worlds), m_inst(inst), m_id(id), m_displayName(displayName), m_iconName(iconName), m_helpName(helpPage)
+ : QWidget(parent), m_inst(inst), ui(new Ui::WorldListPage), m_worlds(worlds), m_iconName(iconName), m_id(id), m_displayName(displayName), m_helpName(helpPage)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
diff --git a/application/pages/WorldListPage.h b/application/pages/WorldListPage.h
index 5cf0966a..1ef441a6 100644
--- a/application/pages/WorldListPage.h
+++ b/application/pages/WorldListPage.h
@@ -54,13 +54,13 @@ public:
{
return m_helpName;
}
- virtual bool shouldDisplay() const;
+ virtual bool shouldDisplay() const override;
- virtual void opened();
- virtual void closed();
+ virtual void opened() override;
+ virtual void closed() override;
protected:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(QObject *obj, QEvent *ev) override;
bool worldListFilter(QKeyEvent *ev);
protected:
diff --git a/application/pages/global/ExternalToolsPage.h b/application/pages/global/ExternalToolsPage.h
index b7db8450..01fe8880 100644
--- a/application/pages/global/ExternalToolsPage.h
+++ b/application/pages/global/ExternalToolsPage.h
@@ -53,7 +53,7 @@ public:
{
return "Tools";
}
- virtual bool apply();
+ virtual bool apply() override;
private:
void loadSettings();