forked from qt-creator/qt-creator
Utils: Pass dialog parent to Utils::* file dialog
Amends 3edc5673b5.
Turns out quite a few potential uses have other parents than
ICore::dialogParent().
Use a nullptr parent to mean ICore::dialogParent() to keep the
caller side simple.
Change-Id: Icfe1daafd710ae273d286679e0c8e2a3a27da552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1039,8 +1039,7 @@ FilePaths DocumentManager::getOpenFileNames(const QString &filters,
|
||||
{
|
||||
const FilePath path = pathIn.isEmpty() ? FilePath::fromString(fileDialogInitialDirectory())
|
||||
: pathIn;
|
||||
const FilePaths files = FileUtils::getOpenFilePaths(tr("Open File"),
|
||||
path, filters,
|
||||
const FilePaths files = FileUtils::getOpenFilePaths(nullptr, tr("Open File"), path, filters,
|
||||
selectedFilter);
|
||||
if (!files.isEmpty())
|
||||
setFileDialogLastVisitedDirectory(files.front().absolutePath().toString());
|
||||
|
||||
Reference in New Issue
Block a user