From 3490c5751d611838ed8ad80afe1ef5fa1b0cf6c7 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 28 Feb 2017 15:27:21 +0100 Subject: [PATCH] QmlDesigner: reduce include in cpp Change-Id: Ibdccbfc11834bbdefba15070d8f1c3c470b9a8ea Reviewed-by: hjk Reviewed-by: Thomas Hartmann --- .../components/itemlibrary/customfilesystemmodel.cpp | 2 +- .../components/itemlibrary/customfilesystemmodel.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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;