diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-25 10:45:58 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-27 14:24:03 +0000 |
commit | 4347e811611ab15e544765a3a34761d2f5c68cb3 (patch) | |
tree | 62375a984ad93097e4c5ffcc25773c2094686987 /src/widgets | |
parent | 696a18b063a890c4425121a6011d6fd5ba1c3f00 (diff) |
Windows: Support virtual folders as initial directory for file dialog.
Use the scheme "clsid" to be able to pass them as "clsid:<GUID>"
(with '{', '}' stripped).
Task-number: QTBUG-33962
Change-Id: Ib045fe81518bca6e91588007ce8a245a48479b1f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Patrick Spendrin <patrick.spendrin@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 455111225e..6a1374e3ee 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -976,6 +976,16 @@ QDir QFileDialog::directory() const \note The non-native QFileDialog supports only local files. + \note On Windows, it is possible to pass URLs representing + one of the \e {virtual folders}, such as "Computer" or "Network". + This is done by passing a QUrl using the scheme \c clsid followed + by the CLSID value with the curly braces removed. For example the URL + \c clsid:374DE290-123F-4565-9164-39C4925E467B denotes the download + location. For a complete list of possible values, see the MSDN documentation on + \l{https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457.aspx}{KNOWNFOLDERID}. + This feature was added in Qt 5.5. + + \sa QUuid \since 5.2 */ void QFileDialog::setDirectoryUrl(const QUrl &directory) |