diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-23 15:40:38 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-31 21:57:10 +0000 |
commit | fdbd3cab382c949ed22415eeeb13eb3f5a4f017a (patch) | |
tree | bff8ec64a71b2cdf3f23955fbc7fc76ef28570f5 /src/dialogs/qquickfiledialog_p.h | |
parent | ee49311d282ef089d0b34c666c06bf094a4495e7 (diff) | |
download | qtquickcontrols-fdbd3cab382c949ed22415eeeb13eb3f5a4f017a.tar.gz |
Dialogs: add shortcuts even when they point to non-existing dirs
Currently, shortcuts will only be added if the directories they point
to exists. Since QStandardPaths::writableLocation() is documented to
return paths that might not yet exist, bindings like the following
will cause warnings on e.g iOS:
FileDialog { folder: shortcuts.pictures; selectExisting: false }
This patch will change this, so that we always add all shortcuts, to
not cause trouble for bindings. That way the app can also take
the necessary steps to check and create a shortcut up front before
showing the dialog.
Change-Id: Iba85710c87ae95e82728695cf958e1bf4394bc7c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/dialogs/qquickfiledialog_p.h')
-rw-r--r-- | src/dialogs/qquickfiledialog_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dialogs/qquickfiledialog_p.h b/src/dialogs/qquickfiledialog_p.h index 0eb4eddf..d7b0804b 100644 --- a/src/dialogs/qquickfiledialog_p.h +++ b/src/dialogs/qquickfiledialog_p.h @@ -84,7 +84,7 @@ protected: Q_INVOKABLE QUrl pathFolder(const QString &path); void addShortcut(const QString &name, const QString &visibleName, const QString &path); - void maybeAdd(const QString &name, const QString &visibleName, QStandardPaths::StandardLocation loc); + void addShortcutFromStandardLocation(const QString &name, QStandardPaths::StandardLocation loc, bool local = true); void populateShortcuts(); void updateModes() Q_DECL_OVERRIDE; |