Disable dialogs to allow changes in qtbase (use urls internally)
authorShawn Rutledge <shawn.rutledge@digia.com>
Thu, 18 Jul 2013 06:09:54 +0000 (08:09 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 18 Jul 2013 06:19:26 +0000 (08:19 +0200)
Followup to I9ae09416acdbe437acbe9672d0ecfc42059695ae so qtbase change
I61e99d498252241f38ec05724702a90ba050c4bb can get through CI.

Change-Id: I8bf3bca9b2a3b00b2471045cdc73f20329f99d9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/imports/dialogs/qquickabstractfiledialog.cpp
src/imports/widgets/qquickqfiledialog.cpp

index d8a75fe..ec5a7f6 100644 (file)
@@ -108,9 +108,12 @@ void QQuickAbstractFileDialog::setSelectFolder(bool selectFolder)
 
 QUrl QQuickAbstractFileDialog::folder()
 {
+    return QUrl();
+    /* TODO after dialog helper switches to URLs
     if (m_dlgHelper && !m_dlgHelper->directory().isEmpty())
         return QUrl::fromLocalFile(m_dlgHelper->directory());
     return QUrl::fromLocalFile(m_options->initialDirectory());
+    */
 }
 
 void QQuickAbstractFileDialog::setFolder(const QUrl &f)
@@ -160,9 +163,11 @@ QUrl QQuickAbstractFileDialog::fileUrl()
 QList<QUrl> QQuickAbstractFileDialog::fileUrls()
 {
     QList<QUrl> ret;
+    /* TODO after dialog helper switches to URLs
     if (m_dlgHelper)
         foreach (QString path, m_dlgHelper->selectedFiles())
             ret << QUrl::fromLocalFile(path);
+    */
     return ret;
 }
 
index 498e34a..6aab2ad 100644 (file)
@@ -67,9 +67,11 @@ public:
 
     virtual bool defaultNameFilterDisables() const { return true; }
     virtual void setDirectory(const QString &dir) { m_dialog.setDirectory(dir); }
-    virtual QString directory() const { return m_dialog.directory().absolutePath(); }
     virtual void selectFile(const QString &f) { m_dialog.selectFile(f); }
+    /* TODO after dialog helper switches to URLs
+    virtual QString directory() const { return m_dialog.directory().absolutePath(); }
     virtual QStringList selectedFiles() const { return m_dialog.selectedFiles(); }
+    */
 
     virtual void setFilter() {
         m_dialog.setWindowTitle(QPlatformFileDialogHelper::options()->windowTitle());
@@ -188,6 +190,7 @@ QPlatformFileDialogHelper *QQuickQFileDialog::helper()
     if (parentItem)
         m_parentWindow = parentItem->window();
 
+    /* TODO after dialog helper switches to URLs
     if (!m_dlgHelper) {
         m_dlgHelper = new QFileDialogHelper();
         connect(m_dlgHelper, SIGNAL(directoryEntered(QString)), this, SIGNAL(folderChanged()));
@@ -195,6 +198,7 @@ QPlatformFileDialogHelper *QQuickQFileDialog::helper()
         connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept()));
         connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject()));
     }
+    */
 
     return m_dlgHelper;
 }