diff options
author | David Faure <david.faure@kdab.com> | 2015-05-09 14:12:28 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2015-07-17 14:29:47 +0000 |
commit | 5443da6c2795255db55697471190b3eba16b28dc (patch) | |
tree | 4c6d0d26eb7ff2065f77bf70328563a476c71f31 /src/widgets/dialogs/qfiledialog.h | |
parent | 4e4b16dc1789f660f25bea3a9b9111053de2cc61 (diff) |
QFileDialog: add setSupportedSchemes and pass it along to the QPA.
This also finishes the implementation of the static methods which
were being passed a supportedSchemes argument but weren't using it.
Now they can pass it along to the QFileDialog instance, which then
passes it to the helper used by the QPA implementation of the file
dialog. The default implementation only supports local files and
can therefore ignore this, but other implementations can use this
argument to restrict the protocols allowed to the user.
[ChangeLog][Widgets][QFileDialog] Add supportedSchemes property.
Change-Id: I5235f70e785da1c06866a8355ef98f571890c4a2
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.h')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index 6bbeb3817a..bba8c5f3c7 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -66,6 +66,7 @@ class Q_WIDGETS_EXPORT QFileDialog : public QDialog Q_PROPERTY(bool nameFilterDetailsVisible READ isNameFilterDetailsVisible WRITE setNameFilterDetailsVisible DESIGNABLE false) Q_PROPERTY(Options options READ options WRITE setOptions) + Q_PROPERTY(QStringList supportedSchemes READ supportedSchemes WRITE setSupportedSchemes) public: enum ViewMode { Detail, List }; @@ -167,6 +168,9 @@ public: void setLabelText(DialogLabel label, const QString &text); QString labelText(DialogLabel label) const; + void setSupportedSchemes(const QStringList &schemes); + QStringList supportedSchemes() const; + #ifndef QT_NO_PROXYMODEL void setProxyModel(QAbstractProxyModel *model); QAbstractProxyModel *proxyModel() const; |