forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -639,7 +639,7 @@ static bool continueDespiteReleaseBuild(const QString &toolName)
|
||||
"<p>%2</p>"
|
||||
"</body></html>")
|
||||
.arg(problem, question);
|
||||
return CheckableMessageBox::doNotAskAgainQuestion(ICore::mainWindow(),
|
||||
return CheckableMessageBox::doNotAskAgainQuestion(ICore::dialogParent(),
|
||||
title,
|
||||
message,
|
||||
ICore::settings(),
|
||||
@@ -791,7 +791,7 @@ void ClangTool::loadDiagnosticsFromFiles()
|
||||
{
|
||||
// Ask user for files
|
||||
const QStringList filePaths
|
||||
= QFileDialog::getOpenFileNames(Core::ICore::mainWindow(),
|
||||
= QFileDialog::getOpenFileNames(Core::ICore::dialogParent(),
|
||||
tr("Select YAML Files with Diagnostics"),
|
||||
QDir::homePath(),
|
||||
tr("YAML Files (*.yml *.yaml);;All Files (*)"));
|
||||
|
Reference in New Issue
Block a user