summaryrefslogtreecommitdiff
path: root/src/spawn.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-19 17:14:09 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-19 17:14:09 -0400
commit54871e7b56a326f81e3de17f53604150d770793b (patch)
tree928b4f3b5dcdf4a6f2e98988d4f40fe687a331ac /src/spawn.cpp
parent94b0c4634290b41398915c6635982dc7b3928f60 (diff)
added details to blacklist dialog
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r--src/spawn.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index ab9d90a0..d2c8ddd5 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -384,7 +384,7 @@ bool eventLogNotRunning(
}
QMessageBox::StandardButton confirmBlacklisted(
- QWidget* parent, const SpawnParameters& sp)
+ QWidget* parent, const SpawnParameters& sp, Settings& settings)
{
const auto title = QObject::tr("Blacklisted program");
const auto mainText = QObject::tr("The program %1 is blacklisted")
@@ -394,10 +394,14 @@ QMessageBox::StandardButton confirmBlacklisted(
"filesystem. This will likely prevent it from seeing any mods, INI files "
"or any other virtualized files.");
+ const auto details =
+ "Executable: " + sp.binary.fileName() + "\n"
+ "Current blacklist: " + settings.executablesBlacklist();
+
auto r = MOBase::TaskDialog(parent, title)
.main(mainText)
.content(content)
- .details("")
+ .details(details)
.icon(QMessageBox::Question)
.remember("blacklistedExecutable", sp.binary.fileName())
.button({
@@ -413,7 +417,7 @@ QMessageBox::StandardButton confirmBlacklisted(
.exec();
if (r == QMessageBox::Retry) {
- if (!WorkaroundsSettingsTab::changeBlacklistNow(parent, Settings::instance())) {
+ if (!WorkaroundsSettingsTab::changeBlacklistNow(parent, settings)) {
r = QMessageBox::Cancel;
}
}
@@ -739,14 +743,15 @@ bool checkEnvironment(QWidget* parent, const SpawnParameters& sp)
return dialogs::eventLogNotRunning(parent, s, sp);
}
-bool checkBlacklist(QWidget* parent, const SpawnParameters& sp, const Settings& settings)
+bool checkBlacklist(
+ QWidget* parent, const SpawnParameters& sp, Settings& settings)
{
for (;;) {
if (!settings.isExecutableBlacklisted(sp.binary.fileName())) {
return true;
}
- const auto r = dialogs::confirmBlacklisted(parent, sp);
+ const auto r = dialogs::confirmBlacklisted(parent, sp, settings);
if (r != QMessageBox::Retry) {
return (r == QMessageBox::Yes);