forked from qt-creator/qt-creator
FileUtils: Adds toFilePathList function
Change-Id: Ie3137751135fdb6c3161cc886f307323fcce6b72 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -556,7 +556,7 @@ FilePaths FileUtils::getOpenFilePaths(QWidget *parent,
|
||||
filter,
|
||||
selectedFilter,
|
||||
options);
|
||||
return transform(result, &FilePath::fromString);
|
||||
return FileUtils::toFilePathList(result);
|
||||
}
|
||||
|
||||
FilePath FileUtils::getOpenFilePathFromDevice(QWidget *parent,
|
||||
@@ -812,4 +812,9 @@ FilePath FileUtils::homePath()
|
||||
return FilePath::fromString(doCleanPath(QDir::homePath()));
|
||||
}
|
||||
|
||||
FilePaths FileUtils::toFilePathList(const QStringList &paths) {
|
||||
return transform(paths, [](const QString &path) { return FilePath::fromString(path); });
|
||||
}
|
||||
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user