From fdbd3cab382c949ed22415eeeb13eb3f5a4f017a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 23 Mar 2015 15:40:38 +0100 Subject: 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 --- src/dialogs/qquickfiledialog_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dialogs/qquickfiledialog_p.h') 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; -- cgit v1.2.1