forked from qt-creator/qt-creator
QmlDesigner: Pass filestatuscache as a ref
Change-Id: Ie5fcb1e59beaf7befd430396834e34237f91b886 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -608,6 +608,7 @@ bool BundleHelper::isItemBundle(const QString &bundleId) const
|
||||
|| bundleId == compUtils.user3DBundleId();
|
||||
}
|
||||
|
||||
#ifndef QDS_USE_PROJECTSTORAGE
|
||||
namespace {
|
||||
|
||||
Utils::FilePath getComponentFilePath(const QString &nodeType, const Utils::FilePath &compDir)
|
||||
@@ -664,6 +665,7 @@ Utils::FilePath getComponentFilePath(const QString &nodeType, const Utils::FileP
|
||||
}
|
||||
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
QSet<AssetPath> BundleHelper::getComponentDependencies(const Utils::FilePath &filePath,
|
||||
const Utils::FilePath &mainCompDir) const
|
||||
|
@@ -38,10 +38,9 @@ class ProjectStoragePathWatcher : public ProjectStoragePathWatcherInterface
|
||||
{
|
||||
public:
|
||||
ProjectStoragePathWatcher(SourcePathCache &pathCache,
|
||||
FileSystemInterface &fileSystem,
|
||||
FileStatusCache &fileStatusCache,
|
||||
ProjectStoragePathWatcherNotifierInterface *notifier = nullptr)
|
||||
: m_fileStatusCache(fileSystem)
|
||||
, m_fileSystem(fileSystem)
|
||||
: m_fileStatusCache(fileStatusCache)
|
||||
, m_pathCache(pathCache)
|
||||
, m_notifier(notifier)
|
||||
{
|
||||
@@ -390,8 +389,7 @@ public:
|
||||
private:
|
||||
WatcherEntries m_watchedEntries;
|
||||
FileSystemWatcher m_fileSystemWatcher;
|
||||
FileStatusCache m_fileStatusCache;
|
||||
FileSystemInterface &m_fileSystem;
|
||||
FileStatusCache &m_fileStatusCache;
|
||||
SourcePathCache &m_pathCache;
|
||||
ProjectStoragePathWatcherNotifierInterface *m_notifier;
|
||||
DirectoryPathCompressor<Timer> m_directoryPathCompressor;
|
||||
|
@@ -210,8 +210,9 @@ public:
|
||||
projectStorageJournalMode()}
|
||||
, errorNotifier{pathCache}
|
||||
, fileSystem{pathCache}
|
||||
, fileStatusCache(fileSystem)
|
||||
, qmlDocumentParser{storage, pathCache}
|
||||
, pathWatcher{pathCache, fileSystem, &updater}
|
||||
, pathWatcher{pathCache, fileStatusCache, &updater}
|
||||
, projectPartId{ProjectPartId::create(
|
||||
pathCache.sourceContextId(Utils::PathString{project->projectDirectory().path()})
|
||||
.internalId())}
|
||||
@@ -232,7 +233,7 @@ public:
|
||||
ProjectStorageErrorNotifier errorNotifier;
|
||||
ProjectStorage storage{database, errorNotifier, database.isInitialized()};
|
||||
FileSystem fileSystem;
|
||||
FileStatusCache fileStatusCache{fileSystem};
|
||||
FileStatusCache fileStatusCache;
|
||||
QmlDocumentParser qmlDocumentParser;
|
||||
QmlTypesParser qmlTypesParser{storage};
|
||||
ProjectStoragePathWatcher<QFileSystemWatcher, QTimer, PathCacheType> pathWatcher;
|
||||
|
@@ -84,7 +84,8 @@ protected:
|
||||
Sqlite::Database &database = staticData->database;
|
||||
QmlDesigner::ProjectStorage &storage = staticData->storage;
|
||||
SourcePathCache pathCache{staticData->sourcePathStorage};
|
||||
Watcher watcher{pathCache, mockFileSystem, ¬ifier};
|
||||
QmlDesigner::FileStatusCache fileStatusCache{mockFileSystem};
|
||||
Watcher watcher{pathCache, fileStatusCache, ¬ifier};
|
||||
NiceMock<MockQFileSytemWatcher> &mockQFileSytemWatcher = watcher.fileSystemWatcher();
|
||||
ProjectChunkId projectChunkId1{ProjectPartId::create(2), SourceType::Qml};
|
||||
ProjectChunkId projectChunkId2{ProjectPartId::create(2), SourceType::QmlUi};
|
||||
|
Reference in New Issue
Block a user