diff --git a/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.cpp index 7a04d4598a0..1371ec8d9a8 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.cpp @@ -75,7 +75,7 @@ public: }; CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QAbstractListModel(parent) - , m_fileSystemModel(new QFileSystemModel) + , m_fileSystemModel(new QFileSystemModel(this)) , m_fileSystemWatcher(new Utils::FileSystemWatcher(this)) { m_fileSystemModel->setIconProvider(new ItemLibraryFileIconProvider()); diff --git a/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.h b/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.h index f61923201bd..98928486684 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.h +++ b/src/plugins/qmldesigner/components/itemlibrary/customfilesystemmodel.h @@ -27,12 +27,10 @@ #include #include -#include - -#include QT_BEGIN_NAMESPACE class QFileIconProvider; +class QFileSystemModel; QT_END_NAMESPACE namespace Utils { class FileSystemWatcher; } @@ -65,7 +63,7 @@ public: private: QModelIndex fileSystemModelIndex(const QModelIndex &index) const; - std::unique_ptr m_fileSystemModel; + QFileSystemModel *m_fileSystemModel; QStringList m_files; QString m_searchFilter; Utils::FileSystemWatcher *m_fileSystemWatcher;