summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-12-14 00:29:00 +0100
committerPetr Mrázek <peterix@gmail.com>2017-12-14 00:29:00 +0100
commitf18afd3d1e73cc0020bfa1189e0b8fefc0f14e61 (patch)
tree391235d09867cf718d69a8e8d4beed6cefda5057 /application
parentef2cbe16e611da68f3cb529f87f4ecb3038af161 (diff)
downloadMultiMC-f18afd3d1e73cc0020bfa1189e0b8fefc0f14e61.tar
MultiMC-f18afd3d1e73cc0020bfa1189e0b8fefc0f14e61.tar.gz
MultiMC-f18afd3d1e73cc0020bfa1189e0b8fefc0f14e61.tar.lz
MultiMC-f18afd3d1e73cc0020bfa1189e0b8fefc0f14e61.tar.xz
MultiMC-f18afd3d1e73cc0020bfa1189e0b8fefc0f14e61.zip
NOISSUE fix a bunch of warnings thrown by Qt internals
Badly connected signals/slots and similar things.
Diffstat (limited to 'application')
-rw-r--r--application/MainWindow.cpp13
-rw-r--r--application/MainWindow.h6
-rw-r--r--application/pages/LogPage.cpp6
-rw-r--r--application/pages/LogPage.h2
-rw-r--r--application/themes/SystemTheme.cpp4
5 files changed, 17 insertions, 14 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 83e6b227..900609d3 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -779,6 +779,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
{
bool updatesAllowed = MMC->updatesAreAllowed();
updatesAllowedChanged(updatesAllowed);
+
+ connect(ui->actionCheckUpdate, &QAction::triggered, this, &MainWindow::checkForUpdates);
+
// set up the updater object.
auto updater = MMC->updateChecker();
connect(updater.get(), &UpdateChecker::updateAvailable, this, &MainWindow::updateAvailable);
@@ -868,7 +871,7 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
QVariantMap data;
data["group"] = group;
actionDeleteGroup->setData(data);
- connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(on_actionDeleteGroup_triggered()));
+ connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(deleteGroup()));
actions.append(actionDeleteGroup);
}
}
@@ -1080,7 +1083,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
on_actionDeleteInstance_triggered();
return true;
case Qt::Key_F5:
- on_actionRefresh_triggered();
+ refreshInstances();
return true;
case Qt::Key_F2:
on_actionRenameInstance_triggered();
@@ -1450,7 +1453,7 @@ void MainWindow::on_actionChangeInstGroup_triggered()
m_selectedInstance->setGroupPost(name);
}
-void MainWindow::on_actionDeleteGroup_triggered()
+void MainWindow::deleteGroup()
{
QObject* obj = sender();
if(!obj)
@@ -1474,7 +1477,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered()
DesktopServices::openDirectory(str);
}
-void MainWindow::on_actionRefresh_triggered()
+void MainWindow::refreshInstances()
{
MMC->instances()->loadList(true);
}
@@ -1493,7 +1496,7 @@ void MainWindow::on_actionConfig_Folder_triggered()
}
}
-void MainWindow::on_actionCheckUpdate_triggered()
+void MainWindow::checkForUpdates()
{
if(BuildConfig.UPDATER_ENABLED)
{
diff --git a/application/MainWindow.h b/application/MainWindow.h
index e22b96c0..b4c584eb 100644
--- a/application/MainWindow.h
+++ b/application/MainWindow.h
@@ -85,11 +85,11 @@ private slots:
void on_actionViewSelectedInstFolder_triggered();
- void on_actionRefresh_triggered();
+ void refreshInstances();
void on_actionViewCentralModsFolder_triggered();
- void on_actionCheckUpdate_triggered();
+ void checkForUpdates();
void on_actionSettings_triggered();
@@ -113,7 +113,7 @@ private slots:
void on_actionDeleteInstance_triggered();
- void on_actionDeleteGroup_triggered();
+ void deleteGroup();
void on_actionExportInstance_triggered();
diff --git a/application/pages/LogPage.cpp b/application/pages/LogPage.cpp
index 025d902b..009a9f55 100644
--- a/application/pages/LogPage.cpp
+++ b/application/pages/LogPage.cpp
@@ -141,9 +141,9 @@ LogPage::LogPage(InstancePtr instance, QWidget *parent)
auto launchTask = m_instance->getLaunchTask();
if(launchTask)
{
- on_InstanceLaunchTask_changed(launchTask);
+ onInstanceLaunchTaskChanged(launchTask);
}
- connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &LogPage::on_InstanceLaunchTask_changed);
+ connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &LogPage::onInstanceLaunchTaskChanged);
}
ui->text->setWordWrap(true);
@@ -162,7 +162,7 @@ LogPage::~LogPage()
delete ui;
}
-void LogPage::on_InstanceLaunchTask_changed(std::shared_ptr<LaunchTask> proc)
+void LogPage::onInstanceLaunchTaskChanged(std::shared_ptr<LaunchTask> proc)
{
m_process = proc;
if(m_process)
diff --git a/application/pages/LogPage.h b/application/pages/LogPage.h
index 7346f93f..3ca47b8a 100644
--- a/application/pages/LogPage.h
+++ b/application/pages/LogPage.h
@@ -69,7 +69,7 @@ private slots:
void findNextActivated();
void findPreviousActivated();
- void on_InstanceLaunchTask_changed(std::shared_ptr<LaunchTask> proc);
+ void onInstanceLaunchTaskChanged(std::shared_ptr<LaunchTask> proc);
private:
Ui::LogPage *ui;
diff --git a/application/themes/SystemTheme.cpp b/application/themes/SystemTheme.cpp
index 069b0b1b..a9ee853a 100644
--- a/application/themes/SystemTheme.cpp
+++ b/application/themes/SystemTheme.cpp
@@ -9,7 +9,7 @@ SystemTheme::SystemTheme()
const auto & style = QApplication::style();
systemPalette = style->standardPalette();
QString lowerThemeName = style->objectName();
- qWarning() << systemTheme;
+ qDebug() << systemTheme;
QStringList styles = QStyleFactory::keys();
for(auto &st: styles)
{
@@ -21,7 +21,7 @@ SystemTheme::SystemTheme()
}
// fall back to fusion if we can't find the current theme.
systemTheme = "Fusion";
- qWarning() << "System theme not found, defaulted to Fusion";
+ qDebug() << "System theme not found, defaulted to Fusion";
}
void SystemTheme::apply(bool initial)