summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2019-03-04 17:40:27 -0500
committerGitHub <noreply@github.com>2019-03-04 17:40:27 -0500
commit147f7ca3213aef22dfe45bfab86e2d221aa248bf (patch)
treeb32f19c11585ea4e1b205eb2e959e695636e5a19 /Source/Core/DolphinQt/Debugger
parenta59010fa29ab10ca031bea87fc5df165e70e2dff (diff)
parent70da86f1c3c933ce28d122f95f34ff6c24f89d80 (diff)
Merge pull request #7849 from spycrab/qt_modal_again
Qt: Make every messagebox modal
Diffstat (limited to 'Source/Core/DolphinQt/Debugger')
-rw-r--r--Source/Core/DolphinQt/Debugger/MemoryWidget.cpp16
-rw-r--r--Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp5
-rw-r--r--Source/Core/DolphinQt/Debugger/RegisterColumn.cpp4
-rw-r--r--Source/Core/DolphinQt/Debugger/WatchWidget.cpp16
4 files changed, 21 insertions, 20 deletions
diff --git a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp
index 7cc88e8a23..4996560ae3 100644
--- a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp
@@ -11,7 +11,6 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
-#include <QMessageBox>
#include <QPushButton>
#include <QRadioButton>
#include <QScrollArea>
@@ -27,6 +26,7 @@
#include "Core/HW/Memmap.h"
#include "Core/PowerPC/PowerPC.h"
#include "DolphinQt/Debugger/MemoryViewWidget.h"
+#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Settings.h"
MemoryWidget::MemoryWidget(QWidget* parent) : QDockWidget(parent)
@@ -399,13 +399,13 @@ void MemoryWidget::OnSetValue()
if (!good_address)
{
- QMessageBox::critical(this, tr("Error"), tr("Bad address provided."));
+ ModalMessageBox::critical(this, tr("Error"), tr("Bad address provided."));
return;
}
if (m_data_edit->text().isEmpty())
{
- QMessageBox::critical(this, tr("Error"), tr("No value provided."));
+ ModalMessageBox::critical(this, tr("Error"), tr("No value provided."));
return;
}
@@ -423,7 +423,7 @@ void MemoryWidget::OnSetValue()
if (!good_value)
{
- QMessageBox::critical(this, tr("Error"), tr("Bad value provided."));
+ ModalMessageBox::critical(this, tr("Error"), tr("Bad value provided."));
return;
}
@@ -455,7 +455,7 @@ static void DumpArray(const std::string& filename, const u8* data, size_t length
if (!f)
{
- QMessageBox::critical(
+ ModalMessageBox::critical(
nullptr, QObject::tr("Error"),
QObject::tr("Failed to dump %1: Can't open file").arg(QString::fromStdString(filename)));
return;
@@ -463,9 +463,9 @@ static void DumpArray(const std::string& filename, const u8* data, size_t length
if (!f.WriteBytes(data, length))
{
- QMessageBox::critical(nullptr, QObject::tr("Error"),
- QObject::tr("Failed to dump %1: Failed to write to file")
- .arg(QString::fromStdString(filename)));
+ ModalMessageBox::critical(nullptr, QObject::tr("Error"),
+ QObject::tr("Failed to dump %1: Failed to write to file")
+ .arg(QString::fromStdString(filename)));
}
}
diff --git a/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp b/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp
index 6cf68babab..6271be807a 100644
--- a/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp
+++ b/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp
@@ -11,11 +11,11 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
-#include <QMessageBox>
#include <QRadioButton>
#include <QVBoxLayout>
#include "DolphinQt/Debugger/BreakpointWidget.h"
+#include "DolphinQt/QtUtils/ModalMessageBox.h"
NewBreakpointDialog::NewBreakpointDialog(BreakpointWidget* parent)
: QDialog(parent), m_parent(parent)
@@ -138,7 +138,8 @@ void NewBreakpointDialog::OnAddressTypeChanged()
void NewBreakpointDialog::accept()
{
auto invalid_input = [this](QString field) {
- QMessageBox::critical(this, tr("Error"), tr("Invalid input for the field \"%1\"").arg(field));
+ ModalMessageBox::critical(this, tr("Error"),
+ tr("Invalid input for the field \"%1\"").arg(field));
};
bool instruction = m_instruction_bp->isChecked();
diff --git a/Source/Core/DolphinQt/Debugger/RegisterColumn.cpp b/Source/Core/DolphinQt/Debugger/RegisterColumn.cpp
index 09c1b2562b..2aff88ef8d 100644
--- a/Source/Core/DolphinQt/Debugger/RegisterColumn.cpp
+++ b/Source/Core/DolphinQt/Debugger/RegisterColumn.cpp
@@ -7,7 +7,7 @@
#include <cstring>
#include <utility>
-#include <QMessageBox>
+#include "DolphinQt/QtUtils/ModalMessageBox.h"
RegisterColumn::RegisterColumn(RegisterType type, std::function<u64()> get,
std::function<void(u64)> set)
@@ -84,7 +84,7 @@ void RegisterColumn::SetValue()
}
if (!valid)
- QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("Invalid input provided"));
+ ModalMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("Invalid input provided"));
else
m_set_register(value);
diff --git a/Source/Core/DolphinQt/Debugger/WatchWidget.cpp b/Source/Core/DolphinQt/Debugger/WatchWidget.cpp
index d4bc8ae65a..a4c215fea9 100644
--- a/Source/Core/DolphinQt/Debugger/WatchWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/WatchWidget.cpp
@@ -4,6 +4,12 @@
#include "DolphinQt/Debugger/WatchWidget.h"
+#include <QHeaderView>
+#include <QMenu>
+#include <QTableWidget>
+#include <QToolBar>
+#include <QVBoxLayout>
+
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Core/ConfigManager.h"
@@ -11,16 +17,10 @@
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PowerPC.h"
+#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Resources.h"
#include "DolphinQt/Settings.h"
-#include <QHeaderView>
-#include <QMenu>
-#include <QMessageBox>
-#include <QTableWidget>
-#include <QToolBar>
-#include <QVBoxLayout>
-
WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)
{
// i18n: This kind of "watch" is used for watching emulated memory.
@@ -306,7 +306,7 @@ void WatchWidget::OnItemChanged(QTableWidgetItem* item)
}
else
{
- QMessageBox::critical(this, tr("Error"), tr("Invalid input provided"));
+ ModalMessageBox::critical(this, tr("Error"), tr("Invalid input provided"));
}
break;
}