aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ctfvisualizer/ctftracemanager.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2020-06-02 09:10:40 +0200
committerEike Ziller <[email protected]>2020-06-02 11:44:53 +0000
commit5b364de1685e5bee5953e23da2552b5db4455a74 (patch)
tree13f505553880048143feea6678dbd09e31558599 /src/plugins/ctfvisualizer/ctftracemanager.cpp
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 <[email protected]>
Diffstat (limited to 'src/plugins/ctfvisualizer/ctftracemanager.cpp')
-rw-r--r--src/plugins/ctfvisualizer/ctftracemanager.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/ctfvisualizer/ctftracemanager.cpp b/src/plugins/ctfvisualizer/ctftracemanager.cpp
index 157c565a32f..ba0976dbec5 100644
--- a/src/plugins/ctfvisualizer/ctftracemanager.cpp
+++ b/src/plugins/ctfvisualizer/ctftracemanager.cpp
@@ -159,7 +159,7 @@ void CtfTraceManager::load(const QString &filename)
std::ifstream file(filename.toStdString());
if (!file.is_open()) {
- QMessageBox::warning(Core::ICore::mainWindow(),
+ QMessageBox::warning(Core::ICore::dialogParent(),
tr("CTF Visualizer"),
tr("Cannot read the CTF file."));
return;
@@ -179,10 +179,13 @@ void CtfTraceManager::finalize()
for (qint64 tid: m_threadModels.keys()) {
if (m_threadModels[tid]->m_maxStackSize > 512) {
if (!userConsentToIgnoreDeepTraces) {
- QMessageBox::StandardButton answer = QMessageBox::question(Core::ICore::mainWindow(),
- tr("CTF Visualizer"),
- tr("The trace contains threads with stack depth > 512.\nDo you want to display them anyway?"),
- QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
+ QMessageBox::StandardButton answer
+ = QMessageBox::question(Core::ICore::dialogParent(),
+ tr("CTF Visualizer"),
+ tr("The trace contains threads with stack depth > "
+ "512.\nDo you want to display them anyway?"),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No);
if (answer == QMessageBox::No) {
userConsentToIgnoreDeepTraces = true;
} else {