diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-03 14:06:39 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-18 09:20:40 +0000 |
commit | bb95b8e3eb464d26ab3e78b49c8276277c929470 (patch) | |
tree | ad9f5343e35089a2ad7fdb7e4f693a41958ccbb7 /src/widgets/qquickqfiledialog.cpp | |
parent | cbd066616b0b24fb8003323b467a3269b7edb602 (diff) | |
download | qtquickcontrols-bb95b8e3eb464d26ab3e78b49c8276277c929470.tar.gz |
Dialogs: override selectedUrls in QQPlatformfiledialog
Rather than checking if a dialog helper is in use in QAbstractFileDialog, we
override selectedUrls in QQuickPlatformFileDialog. Otherwise the version in
QQuickFileDialog will be called first, which tries to return selectedUrls from
the QML version (which might not be in use).
Change-Id: If61647078ed2dd535384dcea67767bfc729edfe0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/qquickqfiledialog.cpp')
-rw-r--r-- | src/widgets/qquickqfiledialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/qquickqfiledialog.cpp b/src/widgets/qquickqfiledialog.cpp index c922e78f..90d1ef9e 100644 --- a/src/widgets/qquickqfiledialog.cpp +++ b/src/widgets/qquickqfiledialog.cpp @@ -136,6 +136,13 @@ QPlatformFileDialogHelper *QQuickQFileDialog::helper() return m_dlgHelper; } +QList<QUrl> QQuickQFileDialog::fileUrls() const +{ + if (m_dialogHelperInUse) + return m_dlgHelper->selectedFiles(); + return QList<QUrl>(); +} + QFileDialogHelper::QFileDialogHelper() : QPlatformFileDialogHelper() { |