path: root/src/imports/dialogs/qquickabstractfiledialog_p.h
diff options
authorShawn Rutledge <shawn.rutledge@digia.com>2013-06-27 13:08:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-28 16:44:10 +0200
commit811337a73c160447e5218ae55e93df99ac3d9edd (patch)
treeac196f54046d031684f9ef220574656e16889ee3 /src/imports/dialogs/qquickabstractfiledialog_p.h
parent87a4a3d095f4fbabb91dade7e7313cb844256b9b (diff)
FileDialog.folder property should also be a QUrl, for consistencyv5.1.0-rc2v5.1.0
In QtQuick we never use plain file paths, because URL is more general. Also use const references for string and URL setters, and fixed the dependency between the FolderListModel's folder, the field for editing it, and the folder property of the AbstractFileDialog. Change-Id: I6e965b80b73d4eb2473712a4f4d4f816b768d802 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/imports/dialogs/qquickabstractfiledialog_p.h')
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/dialogs/qquickabstractfiledialog_p.h b/src/imports/dialogs/qquickabstractfiledialog_p.h
index 965f1a7029..5ce48e8055 100644
--- a/src/imports/dialogs/qquickabstractfiledialog_p.h
+++ b/src/imports/dialogs/qquickabstractfiledialog_p.h
@@ -67,7 +67,7 @@ class QQuickAbstractFileDialog : public QQuickAbstractDialog
Q_PROPERTY(bool selectExisting READ selectExisting WRITE setSelectExisting NOTIFY fileModeChanged)
Q_PROPERTY(bool selectMultiple READ selectMultiple WRITE setSelectMultiple NOTIFY fileModeChanged)
Q_PROPERTY(bool selectFolder READ selectFolder WRITE setSelectFolder NOTIFY fileModeChanged)
- Q_PROPERTY(QString folder READ folder WRITE setFolder NOTIFY folderChanged)
+ Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters NOTIFY nameFiltersChanged)
Q_PROPERTY(QString selectedNameFilter READ selectedNameFilter WRITE selectNameFilter NOTIFY filterSelected)
Q_PROPERTY(QUrl fileUrl READ fileUrl NOTIFY selectionAccepted)
@@ -81,7 +81,7 @@ public:
bool selectExisting() const { return m_selectExisting; }
bool selectMultiple() const { return m_selectMultiple; }
bool selectFolder() const { return m_selectFolder; }
- QString folder();
+ QUrl folder();
QStringList nameFilters() const { return m_options->nameFilters(); }
QString selectedNameFilter();
QUrl fileUrl();
@@ -89,13 +89,13 @@ public:
public Q_SLOTS:
void setVisible(bool v);
- void setTitle(QString t);
+ void setTitle(const QString &t);
void setSelectExisting(bool s);
void setSelectMultiple(bool s);
void setSelectFolder(bool s);
- void setFolder(QString f);
+ void setFolder(const QUrl &f);
void setNameFilters(const QStringList &f);
- void selectNameFilter(QString f);
+ void selectNameFilter(const QString &f);
void folderChanged();