diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-06-02 09:10:40 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-06-02 11:44:53 +0000 |
commit | 5b364de1685e5bee5953e23da2552b5db4455a74 (patch) | |
tree | 13f505553880048143feea6678dbd09e31558599 /src/plugins/ctfvisualizer/ctfvisualizertool.cpp | |
parent | 26d46fc19dccb3b599dcd24f2a3701b7c4e25d2b (diff) | |
download | qt-creator-5b364de1685e5bee5953e23da2552b5db4455a74.tar.gz |
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/ctfvisualizer/ctfvisualizertool.cpp')
-rw-r--r-- | src/plugins/ctfvisualizer/ctfvisualizertool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/ctfvisualizer/ctfvisualizertool.cpp b/src/plugins/ctfvisualizer/ctfvisualizertool.cpp index c3fac0bceb..cbc317dedb 100644 --- a/src/plugins/ctfvisualizer/ctfvisualizertool.cpp +++ b/src/plugins/ctfvisualizer/ctfvisualizertool.cpp @@ -171,7 +171,7 @@ void CtfVisualizerTool::loadJson() m_isLoading = true; QString filename = QFileDialog::getOpenFileName( - ICore::mainWindow(), tr("Load Chrome Trace Format File"), + ICore::dialogParent(), tr("Load Chrome Trace Format File"), "", tr("JSON File (*.json)")); if (filename.isEmpty()) { m_isLoading = false; @@ -192,7 +192,7 @@ void CtfVisualizerTool::loadJson() connect(thread, &QThread::finished, this, [this, thread, task, futureInterface]() { // in main thread: if (m_traceManager->isEmpty()) { - QMessageBox::warning(Core::ICore::mainWindow(), + QMessageBox::warning(Core::ICore::dialogParent(), tr("CTF Visualizer"), tr("The file does not contain any trace data.")); } else { |