forked from qt-creator/qt-creator
MainWindow: Use FileUtils::get... functions
Changes the MainWindow to use FileUtils::getFilePaths function to access files on devices instead of QFileDialog. Change-Id: I0981c960b643edd69510cfed1cce16346962d75a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1032,11 +1032,12 @@ void DocumentManager::showFilePropertiesDialog(const FilePath &filePath)
|
||||
|
||||
FilePaths DocumentManager::getOpenFileNames(const QString &filters,
|
||||
const FilePath &pathIn,
|
||||
QString *selectedFilter)
|
||||
QString *selectedFilter,
|
||||
QFileDialog::Options options)
|
||||
{
|
||||
const FilePath path = pathIn.isEmpty() ? fileDialogInitialDirectory() : pathIn;
|
||||
const FilePaths files = FileUtils::getOpenFilePaths(nullptr, tr("Open File"), path, filters,
|
||||
selectedFilter);
|
||||
selectedFilter, options);
|
||||
if (!files.isEmpty())
|
||||
setFileDialogLastVisitedDirectory(files.front().absolutePath());
|
||||
return files;
|
||||
|
||||
Reference in New Issue
Block a user