QmlDesigner: reduce include in cpp

Change-Id: Ibdccbfc11834bbdefba15070d8f1c3c470b9a8ea
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
hjk
2017-02-28 15:27:21 +01:00
committed by Tim Jenssen
parent c6440c3a21
commit 3490c5751d
2 changed files with 3 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ public:
}; };
CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QAbstractListModel(parent) CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QAbstractListModel(parent)
, m_fileSystemModel(new QFileSystemModel) , m_fileSystemModel(new QFileSystemModel(this))
, m_fileSystemWatcher(new Utils::FileSystemWatcher(this)) , m_fileSystemWatcher(new Utils::FileSystemWatcher(this))
{ {
m_fileSystemModel->setIconProvider(new ItemLibraryFileIconProvider()); m_fileSystemModel->setIconProvider(new ItemLibraryFileIconProvider());

View File

@@ -27,12 +27,10 @@
#include <QAbstractTableModel> #include <QAbstractTableModel>
#include <QDir> #include <QDir>
#include <QFileSystemModel>
#include <memory>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QFileIconProvider; class QFileIconProvider;
class QFileSystemModel;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils { class FileSystemWatcher; } namespace Utils { class FileSystemWatcher; }
@@ -65,7 +63,7 @@ public:
private: private:
QModelIndex fileSystemModelIndex(const QModelIndex &index) const; QModelIndex fileSystemModelIndex(const QModelIndex &index) const;
std::unique_ptr<QFileSystemModel> m_fileSystemModel; QFileSystemModel *m_fileSystemModel;
QStringList m_files; QStringList m_files;
QString m_searchFilter; QString m_searchFilter;
Utils::FileSystemWatcher *m_fileSystemWatcher; Utils::FileSystemWatcher *m_fileSystemWatcher;