summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-09-29 08:23:52 +0200
committerGitHub <noreply@github.com>2023-09-29 08:23:52 +0200
commitff0eb2fb70df3aa374acd1bbba23871a2d4b1cf5 (patch)
treeb45190059131ca0d3eb99df57a46fa6c846f3863 /src/mainwindow.cpp
parent63f663ac8a3b93668b38045f8e5aa5ac4e12fea6 (diff)
Refresh Callback (+ Extra for AboutToRun) (#1884)
* Add working directory and arguments to onAboutToRun (optional). * Add onRefreshCallback functionality.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 12586d3b..8610f5e4 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1803,7 +1803,9 @@ void MainWindow::on_profileBox_currentIndexChanged(int index)
m_OrganizerCore.managedGame()->feature<BSAInvalidation>();
if (invalidation != nullptr) {
if (invalidation->prepareProfile(m_OrganizerCore.currentProfile())) {
- QTimer::singleShot(5, &m_OrganizerCore, SLOT(profileRefresh()));
+ QTimer::singleShot(5, [this] {
+ m_OrganizerCore.refresh();
+ });
}
}
}
@@ -2389,7 +2391,9 @@ void MainWindow::on_actionAdd_Profile_triggered()
m_OrganizerCore.managedGame()->feature<BSAInvalidation>();
if (invalidation != nullptr) {
if (invalidation->prepareProfile(m_OrganizerCore.currentProfile())) {
- QTimer::singleShot(5, &m_OrganizerCore, SLOT(profileRefresh()));
+ QTimer::singleShot(5, [this] {
+ m_OrganizerCore.refresh();
+ });
}
}
}
@@ -2549,7 +2553,7 @@ void MainWindow::setWindowEnabled(bool enabled)
void MainWindow::refreshProfile_activated()
{
- m_OrganizerCore.profileRefresh();
+ m_OrganizerCore.refresh();
}
void MainWindow::saveArchiveList()
@@ -2776,7 +2780,7 @@ void MainWindow::on_actionSettings_triggered()
if ((settings.paths().mods() != oldModDirectory) ||
(settings.interface().displayForeign() != oldDisplayForeign)) {
- m_OrganizerCore.profileRefresh();
+ m_OrganizerCore.refresh();
}
const auto state = settings.archiveParsing();