| 49 | } |
| 50 | |
| 51 | QStringList FileDialogHelpers::getOpenFileNames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options) |
| 52 | { |
| 53 | const QStringList schemes = QStringList(QStringLiteral("file")); |
| 54 | const QList<QUrl> selectedUrls = getOpenFileUrls(parent, caption, dir, filter, selectedFilter, options, schemes); |
| 55 | QStringList fileNames; |
| 56 | |
| 57 | fileNames.reserve(selectedUrls.size()); |
| 58 | for (const QUrl &url : selectedUrls) { |
| 59 | if (url.isLocalFile() || url.isEmpty()) |
| 60 | fileNames << url.toLocalFile(); |
| 61 | else |
| 62 | fileNames << url.toString(); |
| 63 | } |
| 64 | return fileNames; |
| 65 | } |
| 66 | |
| 67 | QUrl FileDialogHelpers::getSaveFileUrl(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QStringList &supportedSchemes) |
| 68 | { |