diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-03-17 10:55:31 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-03-18 15:13:23 +0000 |
commit | c9e558a64833a7f74e9c0423c35a73ed5229f112 (patch) | |
tree | 8a0b679c906a35cc47e423ab6369585f9caeb16e /src/dialogs/qquickabstractfiledialog_p.h | |
parent | 9e6389591e781e76d17dc99f9395219785797b32 (diff) | |
download | qtquickcontrols-c9e558a64833a7f74e9c0423c35a73ed5229f112.tar.gz |
FileDialog: expose several QStandardPaths in the shortcuts property
QStandardPaths::PicturesLocation is a specialized kind of file URL on iOS;
if this folder is set, then when the dialog is opened, it will be the new
dialog helper which uses the native picture gallery picker interface.
This will always work, so we do not need to check whether the path exists.
The application developer needs to have a way to get that platform-specific
(and odd-looking) URL by name, so the FileDialog.shortcuts property is now
public API: a map from programmatic names (similar to those in QStandardPaths)
to URLs. But DefaultFileDialog.qml should not display the names from this map,
because they are not translated to the user's language. So __shortcuts
is added as a private property providing a map from programmatic name to
an object containing the translated name and the URL.
This makes possible setting
FileDialog { folder: shortcuts.pictures }
which will open the special image gallery browser on iOS; and several
other paths from QStandardPaths can be set in the same way.
[ChangeLog][QtQuick.Dialogs] added FileDialog.shortcuts to enable setting
the starting folder to a standard system path. Setting folder to
shortcuts.pictures will result in a special image gallery dialog on iOS.
Change-Id: I14f04712eb4f44ff422ac91a8720b9e3ff8fb920
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/dialogs/qquickabstractfiledialog_p.h')
0 files changed, 0 insertions, 0 deletions