From 38414f9262aebe9e77dcb181a1672d2e929fbb48 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 10 Jan 2018 17:03:57 +0100 Subject: Fix DefaultFileDialog binding loop warnings Remove change signals from the shortcuts and __shortcuts properties, as they don't change after being populated for the first time. Task-number: QTBUG-53707 Change-Id: If305a6d63ebd98e6082fc5b7d89a63aaab6c1f43 Reviewed-by: Qt CI Bot Reviewed-by: J-P Nurmi Reviewed-by: Shawn Rutledge --- src/dialogs/qquickabstractfiledialog.cpp | 2 -- src/dialogs/qquickabstractfiledialog_p.h | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/dialogs/qquickabstractfiledialog.cpp b/src/dialogs/qquickabstractfiledialog.cpp index 49d98a1a..722838e2 100644 --- a/src/dialogs/qquickabstractfiledialog.cpp +++ b/src/dialogs/qquickabstractfiledialog.cpp @@ -298,8 +298,6 @@ void QQuickAbstractFileDialog::populateShortcuts() for (const QFileInfo &fi : drives) addShortcut(fi.absoluteFilePath(), fi.absoluteFilePath(), fi.absoluteFilePath()); #endif - - emit shortcutsChanged(); } QJSValue QQuickAbstractFileDialog::shortcuts() diff --git a/src/dialogs/qquickabstractfiledialog_p.h b/src/dialogs/qquickabstractfiledialog_p.h index b4b7165d..84816d38 100644 --- a/src/dialogs/qquickabstractfiledialog_p.h +++ b/src/dialogs/qquickabstractfiledialog_p.h @@ -74,8 +74,8 @@ class QQuickAbstractFileDialog : public QQuickAbstractDialog Q_PROPERTY(QUrl fileUrl READ fileUrl NOTIFY selectionAccepted) Q_PROPERTY(QList fileUrls READ fileUrls NOTIFY selectionAccepted) Q_PROPERTY(bool sidebarVisible READ sidebarVisible WRITE setSidebarVisible NOTIFY sidebarVisibleChanged) - Q_PROPERTY(QJSValue shortcuts READ shortcuts NOTIFY shortcutsChanged) // map of QStandardDirectory names to QUrls - Q_PROPERTY(QJSValue __shortcuts READ __shortcuts NOTIFY shortcutsChanged) // map of details for QML dialog implementations + Q_PROPERTY(QJSValue shortcuts READ shortcuts CONSTANT) // map of QStandardDirectory names to QUrls + Q_PROPERTY(QJSValue __shortcuts READ __shortcuts CONSTANT) // map of details for QML dialog implementations public: QQuickAbstractFileDialog(QObject *parent = 0); @@ -115,7 +115,6 @@ Q_SIGNALS: void fileModeChanged(); void selectionAccepted(); void sidebarVisibleChanged(); - void shortcutsChanged(); protected Q_SLOTS: void updateFolder(const QUrl &f); -- cgit v1.2.1