Commit 3fbb8df4 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.PropertyEditor: Fix FileResourcesModel

The FileResourcesModel did not work reliable, because the filters
could be set after the modelNodeBackendProperty was set.
Now we properly update the model if the filters change.

Task-number: QTCREATORBUG-12537
Change-Id: I0409531ea7ff23e671b4694605a0c8d35f0be6eb
Reviewed-by: default avatarThomas Hartmann <>
parent 7ce7c62a
......@@ -91,7 +91,10 @@ QUrl FileResourcesModel::path() const
void FileResourcesModel::setFilter(const QString &filter)
m_filter = filter;
if (m_filter != filter) {
m_filter = filter;
QString FileResourcesModel::filter() const
......@@ -173,4 +176,6 @@ void FileResourcesModel::setupModel()
m_lock = false;
emit fileModelChanged();
......@@ -45,7 +45,7 @@ class FileResourcesModel : public QObject
Q_PROPERTY(QString filter READ filter WRITE setFilter)
Q_PROPERTY(QVariant modelNodeBackendProperty READ modelNodeBackend WRITE setModelNodeBackend NOTIFY modelNodeBackendChanged)
Q_PROPERTY(QUrl path READ path WRITE setPath)
Q_PROPERTY(QStringList fileModel READ fileModel NOTIFY modelNodeBackendChanged)
Q_PROPERTY(QStringList fileModel READ fileModel NOTIFY fileModelChanged)
explicit FileResourcesModel(QObject *parent = 0);
......@@ -68,6 +68,7 @@ public:
void fileNameChanged(const QUrl &fileName);
void modelNodeBackendChanged();
void fileModelChanged();
public slots:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment