Skip to content

Commit 7829d43

Browse files
committed
Qt: Add proper alert titles in a couple of areas
1 parent 6146d33 commit 7829d43

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

src/duckstation-qt/controllerbindingwidgets.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ void ControllerBindingWidget::doDeviceAutomaticBinding(const QString& device)
342342
if (mapping.empty())
343343
{
344344
QtUtils::MessageBoxCritical(
345-
this, tr("Automatic Mapping"),
345+
this, tr("Automatic Mapping Failed"),
346346
tr("No generic bindings were generated for device '%1'. The controller/source may not support automatic mapping.")
347347
.arg(device));
348348
return;
@@ -1047,7 +1047,7 @@ void MultipleDeviceAutobindDialog::doAutomaticBinding()
10471047
{
10481048
lock.unlock();
10491049
QtUtils::MessageBoxCritical(
1050-
this, tr("Automatic Mapping"),
1050+
this, tr("Automatic Mapping Failed"),
10511051
tr("No generic bindings were generated for device '%1'. The controller/source may not "
10521052
"support automatic mapping.")
10531053
.arg(identifier));
@@ -1062,7 +1062,7 @@ void MultipleDeviceAutobindDialog::doAutomaticBinding()
10621062

10631063
if (!tried_any)
10641064
{
1065-
QtUtils::MessageBoxInformation(this, tr("Automatic Mapping"), tr("No devices were selected."));
1065+
QtUtils::MessageBoxInformation(this, tr("Automatic Mapping Failed"), tr("No devices were selected."));
10661066
return;
10671067
}
10681068

src/duckstation-qt/gamelistrefreshthread.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#include "moc_gamelistrefreshthread.cpp"
1414

15+
LOG_CHANNEL(Host);
16+
1517
GameListRefreshThread::GameListRefreshThread(bool invalidate_cache) : QThread(), m_invalidate_cache(invalidate_cache)
1618
{
1719
}
@@ -79,18 +81,21 @@ void GameListRefreshThread::SetProgressValue(u32 value)
7981

8082
void GameListRefreshThread::ModalError(const std::string_view message)
8183
{
82-
QtUtils::MessageBoxCritical(nullptr, QStringLiteral("Error"), QtUtils::StringViewToQString(message));
84+
// Not used.
85+
WARNING_LOG(message);
8386
}
8487

8588
bool GameListRefreshThread::ModalConfirmation(const std::string_view message)
8689
{
87-
return QtUtils::MessageBoxQuestion(nullptr, QStringLiteral("Question"), QtUtils::StringViewToQString(message)) ==
88-
QMessageBox::Yes;
90+
// Not used.
91+
WARNING_LOG(message);
92+
return true;
8993
}
9094

9195
void GameListRefreshThread::ModalInformation(const std::string_view message)
9296
{
93-
QtUtils::MessageBoxInformation(nullptr, QStringLiteral("Information"), QtUtils::StringViewToQString(message));
97+
// Not used.
98+
WARNING_LOG(message);
9499
}
95100

96101
void GameListRefreshThread::fireUpdate()

src/duckstation-qt/postprocessingsettingswidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ void PostProcessingChainConfigWidget::onRemoveButtonClicked()
235235

236236
void PostProcessingChainConfigWidget::onClearButtonClicked()
237237
{
238-
if (QtUtils::MessageBoxQuestion(this, tr("Question"), tr("Are you sure you want to clear all shader stages?")) ==
239-
QMessageBox::Yes)
238+
if (QtUtils::MessageBoxQuestion(this, tr("Clear Shader Stages"),
239+
tr("Are you sure you want to clear all shader stages?")) == QMessageBox::Yes)
240240
{
241241
auto lock = Host::GetSettingsLock();
242242
SettingsInterface& si = getSettingsInterfaceToUpdate();

src/duckstation-qt/qtprogresscallback.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ void QtModalProgressCallback::SetProgressValue(u32 value)
7373

7474
void QtModalProgressCallback::ModalError(const std::string_view message)
7575
{
76-
QtUtils::MessageBoxCritical(&m_dialog, tr("Error"), QtUtils::StringViewToQString(message));
76+
QtUtils::MessageBoxCritical(&m_dialog, m_dialog.windowTitle(), QtUtils::StringViewToQString(message));
7777
}
7878

7979
bool QtModalProgressCallback::ModalConfirmation(const std::string_view message)
8080
{
81-
return (QtUtils::MessageBoxQuestion(&m_dialog, tr("Question"), QtUtils::StringViewToQString(message)) ==
81+
return (QtUtils::MessageBoxQuestion(&m_dialog, m_dialog.windowTitle(), QtUtils::StringViewToQString(message)) ==
8282
QMessageBox::Yes);
8383
}
8484

8585
void QtModalProgressCallback::ModalInformation(const std::string_view message)
8686
{
87-
QtUtils::MessageBoxInformation(&m_dialog, tr("Information"), QtUtils::StringViewToQString(message));
87+
QtUtils::MessageBoxInformation(&m_dialog, m_dialog.windowTitle(), QtUtils::StringViewToQString(message));
8888
}
8989

9090
void QtModalProgressCallback::dialogCancelled()

src/duckstation-qt/setupwizarddialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bool SetupWizardDialog::canShowNextPage()
4646
if (!BIOS::HasAnyBIOSImages())
4747
{
4848
if (QtUtils::MessageBoxQuestion(
49-
this, tr("Warning"),
49+
this, tr("No BIOS Image Found"),
5050
tr("No BIOS images were found. DuckStation WILL NOT be able to run games without a BIOS image.\n\nAre "
5151
"you sure you wish to continue without selecting a BIOS image?")) != QMessageBox::Yes)
5252
{
@@ -61,7 +61,7 @@ bool SetupWizardDialog::canShowNextPage()
6161
if (m_ui.searchDirectoryList->rowCount() == 0)
6262
{
6363
if (QtUtils::MessageBoxQuestion(
64-
this, tr("Warning"),
64+
this, tr("No Game Directories Selected"),
6565
tr("No game directories have been selected. You will have to manually open any game dumps you "
6666
"want to play, DuckStation's list will be empty.\n\nAre you sure you want to continue?")) !=
6767
QMessageBox::Yes)
@@ -467,7 +467,7 @@ void SetupWizardDialog::doDeviceAutomaticBinding(u32 port, QLabel* update_label,
467467
if (mapping.empty())
468468
{
469469
QtUtils::MessageBoxCritical(
470-
this, tr("Automatic Binding"),
470+
this, tr("Automatic Binding Failed"),
471471
tr("No generic bindings were generated for device '%1'. The controller/source may not support automatic "
472472
"mapping.")
473473
.arg(device));

0 commit comments

Comments
 (0)