aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/bineditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-06-02 09:10:40 +0200
committerEike Ziller <eike.ziller@qt.io>2020-06-02 11:44:53 +0000
commit5b364de1685e5bee5953e23da2552b5db4455a74 (patch)
tree13f505553880048143feea6678dbd09e31558599 /src/plugins/bineditor
parent26d46fc19dccb3b599dcd24f2a3701b7c4e25d2b (diff)
Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/bineditor')
-rw-r--r--src/plugins/bineditor/bineditorplugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index c25d36d1a1..8fc74e4f22 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -261,7 +261,7 @@ public:
if (errorString)
*errorString = msg;
else
- QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg);
+ QMessageBox::critical(ICore::dialogParent(), tr("File Error"), msg);
return OpenResult::CannotHandle;
}
if (size / 16 >= qint64(1) << 31) {
@@ -270,7 +270,7 @@ public:
if (errorString)
*errorString = msg;
else
- QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg);
+ QMessageBox::critical(ICore::dialogParent(), tr("File Error"), msg);
return OpenResult::CannotHandle;
}
if (offset >= size)
@@ -284,7 +284,7 @@ public:
if (errorString)
*errorString = errStr;
else
- QMessageBox::critical(ICore::mainWindow(), tr("File Error"), errStr);
+ QMessageBox::critical(ICore::dialogParent(), tr("File Error"), errStr);
return OpenResult::ReadError;
}
@@ -304,7 +304,7 @@ public:
data += QByteArray(blockSize - dataSize, 0);
m_widget->addData(address, data);
} else {
- QMessageBox::critical(ICore::mainWindow(), tr("File Error"),
+ QMessageBox::critical(ICore::dialogParent(), tr("File Error"),
tr("Cannot open %1: %2").arg(
fn.toUserOutput(), file.errorString()));
}