diff options
| author | Léo Lam <leo@leolam.fr> | 2021-08-31 01:43:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-31 01:43:02 +0200 |
| commit | 8ecb0447b6842c5fa2094b597129261316f38748 (patch) | |
| tree | 6cec04705030f42d14df120f64441603b2200819 /Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp | |
| parent | 48339afb9891ac18f44d6743188bb11e77fe43f6 (diff) | |
| parent | 9d45bac17538bf0e64cfad025bd82109c971f9d6 (diff) | |
Merge pull request #10025 from mbc07/gui-fixes-settings
DolphinQt: Minor consistency fixes for the Settings window
Diffstat (limited to 'Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp b/Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp index 5d6280d142..3fab4f4834 100644 --- a/Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp +++ b/Source/Core/DolphinQt/Settings/USBDeviceAddToWhitelistDialog.cpp @@ -128,25 +128,13 @@ void USBDeviceAddToWhitelistDialog::AddUSBDeviceToWhitelist() if (!IsValidUSBIDString(vid_string)) { // i18n: Here, VID means Vendor ID (for a USB device). - ModalMessageBox vid_warning_box(this); - vid_warning_box.setIcon(QMessageBox::Warning); - vid_warning_box.setWindowTitle(tr("USB Whitelist Error")); - // i18n: Here, VID means Vendor ID (for a USB device). - vid_warning_box.setText(tr("The entered VID is invalid.")); - vid_warning_box.setStandardButtons(QMessageBox::Ok); - vid_warning_box.exec(); + ModalMessageBox::critical(this, tr("USB Whitelist Error"), tr("The entered VID is invalid.")); return; } if (!IsValidUSBIDString(pid_string)) { // i18n: Here, PID means Product ID (for a USB device). - ModalMessageBox pid_warning_box(this); - pid_warning_box.setIcon(QMessageBox::Warning); - pid_warning_box.setWindowTitle(tr("USB Whitelist Error")); - // i18n: Here, PID means Product ID (for a USB device). - pid_warning_box.setText(tr("The entered PID is invalid.")); - pid_warning_box.setStandardButtons(QMessageBox::Ok); - pid_warning_box.exec(); + ModalMessageBox::critical(this, tr("USB Whitelist Error"), tr("The entered PID is invalid.")); return; } @@ -155,7 +143,8 @@ void USBDeviceAddToWhitelistDialog::AddUSBDeviceToWhitelist() if (SConfig::GetInstance().IsUSBDeviceWhitelisted({vid, pid})) { - ModalMessageBox::critical(this, tr("Error"), tr("This USB device is already whitelisted.")); + ModalMessageBox::critical(this, tr("USB Whitelist Error"), + tr("This USB device is already whitelisted.")); return; } SConfig::GetInstance().m_usb_passthrough_devices.emplace(vid, pid); |
