Commit d24cb60d authored by Fawzi Mohamed's avatar Fawzi Mohamed

qml: moving most of ModelManager logic to ModelManageInterface

Currently ModelManager contains lot logic, but as it sits in QmlJSTools
it is not possible to use it in standalone tests.
Moving most of the logic to ModelManagerInterface (and cleanup)
to allow better testing, and refactoring.
This introduces a dependency of the qmljs lib on the cplusplus lib
Also a (small) part of the CppTool::ModelManagerInterface has been
moved to CPlusPlus::CppModelManagerBase to remove the dependency on
CppTools to gather the Qml types exposed from C++.

Change-Id: Icad7fe96dfd0f1a2b1058d82bd98c77c40aa5e9d
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent bf989b75
......@@ -57,7 +57,8 @@ HEADERS += \
$$PWD/pp-scanner.h \
$$PWD/findcdbbreakpoint.h \
$$PWD/PPToken.h \
$$PWD/Dumpers.h
$$PWD/Dumpers.h \
$$PWD/cppmodelmanagerbase.h
SOURCES += \
$$PWD/SimpleLexer.cpp \
......@@ -85,6 +86,7 @@ SOURCES += \
$$PWD/pp-scanner.cpp \
$$PWD/findcdbbreakpoint.cpp \
$$PWD/PPToken.cpp \
$$PWD/Dumpers.cpp
$$PWD/Dumpers.cpp \
$$PWD/cppmodelmanagerbase.cpp
RESOURCES += $$PWD/cplusplus.qrc
......@@ -94,6 +94,7 @@ QtcLibrary {
"BackwardsScanner.cpp", "BackwardsScanner.h",
"CppDocument.cpp", "CppDocument.h",
"CppRewriter.cpp", "CppRewriter.h",
"cppmodelmanagerbase.cpp", "cppmodelmanagerbase.h",
"DependencyTable.cpp", "DependencyTable.h",
"DeprecatedGenTemplateInstance.cpp", "DeprecatedGenTemplateInstance.h",
"ExpressionUnderCursor.cpp", "ExpressionUnderCursor.h",
......
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "cppmodelmanagerbase.h"
namespace CPlusPlus {
static CppModelManagerBase *g_instance = 0;
CppModelManagerBase::CppModelManagerBase(QObject *parent)
: QObject(parent)
{
Q_ASSERT(!g_instance);
g_instance = this;
}
CppModelManagerBase::~CppModelManagerBase()
{
Q_ASSERT(g_instance == this);
g_instance = 0;
}
CppModelManagerBase *CppModelManagerBase::instance()
{
return g_instance;
}
bool CppModelManagerBase::trySetExtraDiagnostics(const QString &fileName, const QString &kind,
const QList<CPlusPlus::Document::DiagnosticMessage> &diagnostics)
{
if (CppModelManagerBase *mm = instance())
return mm->setExtraDiagnostics(fileName, kind, diagnostics);
return false;
}
bool CppModelManagerBase::setExtraDiagnostics(const QString &fileName, const QString &kind,
const QList<CPlusPlus::Document::DiagnosticMessage> &diagnostics)
{
Q_UNUSED(fileName);
Q_UNUSED(kind);
Q_UNUSED(diagnostics);
return false;
}
CPlusPlus::Snapshot CppModelManagerBase::snapshot() const
{
return CPlusPlus::Snapshot();
}
} // namespace CPlusPlus
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef CPPMODELMANAGERBASE_H
#define CPPMODELMANAGERBASE_H
#include <cplusplus/CppDocument.h>
#include <QObject>
#include <QList>
QT_BEGIN_NAMESPACE
class QString;
QT_END_NAMESPACE
namespace CPlusPlus {
class CPLUSPLUS_EXPORT CppModelManagerBase : public QObject
{
Q_OBJECT
public:
CppModelManagerBase(QObject *parent = 0);
~CppModelManagerBase();
static CppModelManagerBase *instance();
static bool trySetExtraDiagnostics(const QString &fileName, const QString &kind,
const QList<Document::DiagnosticMessage> &diagnostics);
virtual bool setExtraDiagnostics(const QString &fileName, const QString &kind,
const QList<Document::DiagnosticMessage> &diagnostics);
virtual CPlusPlus::Snapshot snapshot() const;
};
} // namespace CPlusPlus
#endif // CPPMODELMANAGERBASE_H
......@@ -11,6 +11,7 @@ HEADERS += \
$$PWD/qmljsbind.h \
$$PWD/qmljsbundle.h \
$$PWD/qmljsevaluate.h \
$$PWD/qmljsfindexportedcpptypes.h \
$$PWD/qmljsdocument.h \
$$PWD/qmljsscanner.h \
$$PWD/qmljsinterpreter.h \
......@@ -25,6 +26,7 @@ HEADERS += \
$$PWD/qmljsrewriter.h \
$$PWD/qmljsicons.h \
$$PWD/qmljsdelta.h \
$$PWD/qmljsplugindumper.h \
$$PWD/qmljstypedescriptionreader.h \
$$PWD/qmljsscopeastpath.h \
$$PWD/qmljsvalueowner.h \
......@@ -47,6 +49,7 @@ SOURCES += \
$$PWD/qmljsbind.cpp \
$$PWD/qmljsbundle.cpp \
$$PWD/qmljsevaluate.cpp \
$$PWD/qmljsfindexportedcpptypes.cpp \
$$PWD/qmljsdocument.cpp \
$$PWD/qmljsscanner.cpp \
$$PWD/qmljsinterpreter.cpp \
......@@ -60,6 +63,7 @@ SOURCES += \
$$PWD/qmljsrewriter.cpp \
$$PWD/qmljsicons.cpp \
$$PWD/qmljsdelta.cpp \
$$PWD/qmljsplugindumper.cpp \
$$PWD/qmljstypedescriptionreader.cpp \
$$PWD/qmljsscopeastpath.cpp \
$$PWD/qmljsvalueowner.cpp \
......
......@@ -11,6 +11,7 @@ QtcLibrary {
Depends { name: "Utils" }
Depends { name: "LanguageUtils" }
Depends { name: "CPlusPlus" }
Depends { name: "Qt"; submodules: ["widgets", "script", "xml"] }
Group {
......@@ -33,6 +34,7 @@ QtcLibrary {
"qmljsdelta.cpp", "qmljsdelta.h",
"qmljsdocument.cpp", "qmljsdocument.h",
"qmljsevaluate.cpp", "qmljsevaluate.h",
"qmljsfindexportedcpptypes.cpp", "qmljsfindexportedcpptypes.h",
"qmljsicons.cpp", "qmljsicons.h",
"qmljsicontextpane.h",
"qmljsimportdependencies.cpp", "qmljsimportdependencies.h",
......@@ -41,6 +43,7 @@ QtcLibrary {
"qmljslineinfo.cpp", "qmljslineinfo.h",
"qmljslink.cpp", "qmljslink.h",
"qmljsmodelmanagerinterface.cpp", "qmljsmodelmanagerinterface.h",
"qmljsplugindumper.cpp", "qmljsplugindumper.h",
"qmljspropertyreader.cpp", "qmljspropertyreader.h",
"qmljsqrcparser.cpp", "qmljsqrcparser.h",
"qmljsreformatter.cpp", "qmljsreformatter.h",
......
QTC_LIB_NAME = QmlJS
QTC_LIB_DEPENDS += \
utils \
languageutils
languageutils \
cplusplus
......@@ -80,5 +80,11 @@ enum Enum
};
}
namespace Constants {
const char TASK_INDEX[] = "QmlJSEditor.TaskIndex";
const char TASK_IMPORT_SCAN[] = "QmlJSEditor.TaskImportScan";
} // namespace Constants
} // namespace QmlJS
#endif // QMLJSCONSTANTS_H
......@@ -30,13 +30,16 @@
#include "qmljsfindexportedcpptypes.h"
#include <qmljs/qmljsinterpreter.h>
#include <qmljs/qmljsdocument.h>
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cplusplus/cppmodelmanagerbase.h>
#include <cplusplus/CppDocument.h>
#include <QDebug>
#include <QList>
using namespace QmlJSTools;
//using namespace QmlJS;
namespace {
using namespace CPlusPlus;
......@@ -66,7 +69,7 @@ class FindExportsVisitor : protected ASTVisitor
ASTMatcher _matcher;
ASTPatternBuilder _builder;
Overview _overview;
QList<Document::DiagnosticMessage> _messages;
QList<CPlusPlus::Document::DiagnosticMessage> _messages;
public:
FindExportsVisitor(CPlusPlus::Document::Ptr doc)
......@@ -82,7 +85,7 @@ public:
accept(translationUnit()->ast());
}
QList<Document::DiagnosticMessage> messages() const
QList<CPlusPlus::Document::DiagnosticMessage> messages() const
{
return _messages;
}
......@@ -181,7 +184,7 @@ protected:
Document::DiagnosticMessage::Warning,
_doc->fileName(),
line, column,
FindExportedCppTypes::tr(
QmlJS::FindExportedCppTypes::tr(
"The type will only be available in Qt Creator's QML editors when the type name is a string literal"));
return false;
}
......@@ -239,7 +242,7 @@ protected:
Document::DiagnosticMessage::Warning,
_doc->fileName(),
line, column,
FindExportedCppTypes::tr(
QmlJS::FindExportedCppTypes::tr(
"The module URI cannot be determined by static analysis. The type will be available\n"
"globally in the QML editor. You can add a \"// @uri My.Module.Uri\" annotation to let\n"
"Qt Creator know about a likely URI."));
......@@ -370,7 +373,7 @@ protected:
Document::DiagnosticMessage::Warning,
_doc->fileName(),
line, column,
FindExportedCppTypes::tr(
QmlJS::FindExportedCppTypes::tr(
"must be a string literal to be available in the QML editor"));
return false;
}
......@@ -389,7 +392,7 @@ protected:
}
private:
QString stringOf(AST *ast)
QString stringOf(CPlusPlus::AST *ast)
{
return stringOf(ast->firstToken(), ast->lastToken() - 1);
}
......@@ -681,6 +684,8 @@ static void buildContextProperties(
} // anonymous namespace
namespace QmlJS {
FindExportedCppTypes::FindExportedCppTypes(const CPlusPlus::Snapshot &snapshot)
: m_snapshot(snapshot)
{
......@@ -699,11 +704,9 @@ void FindExportedCppTypes::operator()(const CPlusPlus::Document::Ptr &document)
FindExportsVisitor finder(document);
finder();
if (CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance()) {
static const QString kindKey = QLatin1String("QmlJSTools.ExportedQmlTypesDiagnostic");
cppModelManager->setExtraDiagnostics(document->fileName(), kindKey,
finder.messages());
}
static const QString kindKey = QLatin1String("QmlJSTools.ExportedQmlTypesDiagnostic");
CppModelManagerBase::trySetExtraDiagnostics(document->fileName(), kindKey,
finder.messages());
// if nothing was found, done
const QList<ContextProperty> contextPropertyDescriptions = finder.contextProperties();
......@@ -712,8 +715,8 @@ void FindExportedCppTypes::operator()(const CPlusPlus::Document::Ptr &document)
return;
// context properties need lookup inside function scope, and thus require a full check
Document::Ptr localDoc = document;
if (document->checkMode() != Document::FullCheck && !contextPropertyDescriptions.isEmpty()) {
CPlusPlus::Document::Ptr localDoc = document;
if (document->checkMode() != CPlusPlus::Document::FullCheck && !contextPropertyDescriptions.isEmpty()) {
localDoc = m_snapshot.documentFromSource(document->utf8Source(), document->fileName());
localDoc->check();
}
......@@ -749,7 +752,7 @@ QHash<QString, QString> FindExportedCppTypes::contextProperties() const
return m_contextProperties;
}
bool FindExportedCppTypes::maybeExportsTypes(const Document::Ptr &document)
bool FindExportedCppTypes::maybeExportsTypes(const CPlusPlus::Document::Ptr &document)
{
if (!document->control())
return false;
......@@ -770,3 +773,5 @@ bool FindExportedCppTypes::maybeExportsTypes(const Document::Ptr &document)
}
return false;
}
} // namespace QmlJS
......@@ -27,18 +27,19 @@
**
****************************************************************************/
#ifndef QMLJSTOOLS_QMLJSFINDEXPORTEDCPPTYPES_H
#define QMLJSTOOLS_QMLJSFINDEXPORTEDCPPTYPES_H
#ifndef QMLJS_QMLJSFINDEXPORTEDCPPTYPES_H
#define QMLJS_QMLJSFINDEXPORTEDCPPTYPES_H
#include "qmljs_global.h"
#include <cplusplus/CppDocument.h>
#include <languageutils/fakemetaobject.h>
#include <QCoreApplication>
#include <QHash>
namespace QmlJSTools {
namespace QmlJS {
class FindExportedCppTypes
class QMLJS_EXPORT FindExportedCppTypes
{
Q_DECLARE_TR_FUNCTIONS(QmlJSTools::FindExportedCppTypes)
public:
......@@ -58,6 +59,6 @@ private:
QHash<QString, QString> m_contextProperties;
};
} // namespace QmlJSTools
} // namespace QmlJS
#endif // QMLJSTOOLS_QMLJSFINDEXPORTEDCPPTYPES_H
#endif // QMLJS_QMLJSFINDEXPORTEDCPPTYPES_H
......@@ -31,21 +31,31 @@
#define QMLJSMODELMANAGERINTERFACE_H
#include "qmljs_global.h"
#include "qmljsdocument.h"
#include "qmljsbundle.h"
#include "qmljsconstants.h"
#include "qmljsdocument.h"
#include "qmljsqrcparser.h"
#include "qmljsviewercontext.h"
#include <cplusplus/CppDocument.h>
#include <utils/environment.h>
#include <QFuture>
#include <QFutureSynchronizer>
#include <QHash>
#include <QMultiHash>
#include <QObject>
#include <QStringList>
#include <QPointer>
#include <QStringList>
#include <QStringList>
#include <QTimer>
namespace ProjectExplorer { class Project; }
namespace QmlJS {
class Snapshot;
class PluginDumper;
class QMLJS_EXPORT ModelManagerInterface: public QObject
{
......@@ -140,61 +150,130 @@ public:
static Language::Enum guessLanguageOfFile(const QString &fileName);
static QStringList globPatternsForLanguages(const QList<Language::Enum> languages);
static ModelManagerInterface *instance();
virtual WorkingCopy workingCopy() const = 0;
virtual QmlJS::Snapshot snapshot() const = 0;
virtual QmlJS::Snapshot newestSnapshot() const = 0;
virtual void updateSourceFiles(const QStringList &files,
bool emitDocumentOnDiskChanged) = 0;
virtual void fileChangedOnDisk(const QString &path) = 0;
virtual void removeFiles(const QStringList &files) = 0;
virtual QStringList filesAtQrcPath(const QString &path, const QLocale *locale = 0,
ProjectExplorer::Project *project = 0,
QrcResourceSelector resources = AllQrcResources) = 0;
virtual QMap<QString,QStringList> filesInQrcPath(const QString &path,
const QLocale *locale = 0,
ProjectExplorer::Project *project = 0,
bool addDirs = false,
QrcResourceSelector resources = AllQrcResources) = 0;
virtual QList<ProjectInfo> projectInfos() const = 0;
virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const = 0;
virtual void updateProjectInfo(const ProjectInfo &pinfo) = 0;
Q_SLOT virtual void removeProjectInfo(ProjectExplorer::Project *project) = 0;
virtual ProjectInfo projectInfoForPath(QString path) = 0;
virtual QStringList importPaths() const = 0;
virtual QmlJS::QmlLanguageBundles activeBundles() const = 0;
virtual QmlJS::QmlLanguageBundles extendedBundles() const = 0;
virtual void loadPluginTypes(const QString &libraryPath, const QString &importPath,
const QString &importUri, const QString &importVersion) = 0;
virtual CppDataHash cppData() const = 0;
virtual LibraryInfo builtins(const Document::Ptr &doc) const = 0;
static void writeWarning(const QString &msg);
static WorkingCopy workingCopy();
QmlJS::Snapshot snapshot() const;
QmlJS::Snapshot newestSnapshot() const;
void updateSourceFiles(const QStringList &files,
bool emitDocumentOnDiskChanged);
void fileChangedOnDisk(const QString &path);
void removeFiles(const QStringList &files);
QStringList filesAtQrcPath(const QString &path, const QLocale *locale = 0,
ProjectExplorer::Project *project = 0,
QrcResourceSelector resources = AllQrcResources);
QMap<QString,QStringList> filesInQrcPath(const QString &path,
const QLocale *locale = 0,
ProjectExplorer::Project *project = 0,
bool addDirs = false,
QrcResourceSelector resources = AllQrcResources);
QList<ProjectInfo> projectInfos() const;
ProjectInfo projectInfo(ProjectExplorer::Project *project) const;
void updateProjectInfo(const ProjectInfo &pinfo, ProjectExplorer::Project *p);
void updateDocument(QmlJS::Document::Ptr doc);
void updateLibraryInfo(const QString &path, const QmlJS::LibraryInfo &info);
void emitDocumentChangedOnDisk(QmlJS::Document::Ptr doc);
void updateQrcFile(const QString &path);
ProjectInfo projectInfoForPath(QString path);
QStringList importPaths() const;
QmlJS::QmlLanguageBundles activeBundles() const;
QmlJS::QmlLanguageBundles extendedBundles() const;
void loadPluginTypes(const QString &libraryPath, const QString &importPath,
const QString &importUri, const QString &importVersion);
CppDataHash cppData() const;
LibraryInfo builtins(const Document::Ptr &doc) const;
virtual ViewerContext completeVContext(const ViewerContext &vCtx,
const Document::Ptr &doc = Document::Ptr(0)) const = 0;
const Document::Ptr &doc = Document::Ptr(0)) const;
virtual ViewerContext defaultVContext(bool autoComplete = true,
const Document::Ptr &doc = Document::Ptr(0)) const = 0;
virtual void setDefaultVContext(const ViewerContext &vContext) = 0;
const Document::Ptr &doc = Document::Ptr(0)) const;
virtual void setDefaultVContext(const ViewerContext &vContext);
// Blocks until all parsing threads are done. Used for testing.
virtual void joinAllThreads() = 0;
public slots:
virtual void resetCodeModel() = 0;
void joinAllThreads();
virtual ModelManagerInterface::ProjectInfo defaultProjectInfo() const;
public slots:
virtual void resetCodeModel();
void removeProjectInfo(ProjectExplorer::Project *project);
signals:
void documentUpdated(QmlJS::Document::Ptr doc);
void documentChangedOnDisk(QmlJS::Document::Ptr doc);
void aboutToRemoveFiles(const QStringList &files);
void libraryInfoUpdated(const QString &path, const QmlJS::LibraryInfo &info);
void projectInfoUpdated(const ProjectInfo &pinfo);
void projectPathChanged(const QString &projectPath);
protected slots:
void maybeQueueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc);
void queueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc, bool scan);
void asyncReset();
virtual void startCppQmlTypeUpdate();
protected:
virtual QHash<QString,Language::Enum> languageForSuffix() const;
virtual void writeMessageInternal(const QString &msg) const;
virtual WorkingCopy workingCopyInternal() const;
virtual void addTaskInternal(QFuture<void> result, const QString &msg, const char *taskId) const;
QFuture<void> refreshSourceFiles(const QStringList &sourceFiles,
bool emitDocumentOnDiskChanged);
static void parseLoop(QSet<QString> &scannedPaths, QSet<QString> &newLibraries,
WorkingCopy workingCopyInternal, QStringList files, ModelManagerInterface *modelManager,
QmlJS::Language::Enum mainLanguage, bool emitDocChangedOnDisk,
Utils::function<bool (qreal)> reportProgress);
static void parse(QFutureInterface<void> &future,
WorkingCopy workingCopyInternal,
QStringList files,
ModelManagerInterface *modelManager,
QmlJS::Language::Enum mainLanguage,
bool emitDocChangedOnDisk);
static void importScan(QFutureInterface<void> &future,
WorkingCopy workingCopyInternal,
QStringList paths,
ModelManagerInterface *modelManager,
QmlJS::Language::Enum mainLanguage,
bool emitDocChangedOnDisk);
static void updateCppQmlTypes(QFutureInterface<void> &interface,
ModelManagerInterface *qmlModelManager,
CPlusPlus::Snapshot snapshot,
QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents);
void updateImportPaths();
void loadQmlTypeDescriptionsInternal(const QString &path);
mutable QMutex m_mutex;
QmlJS::Snapshot _validSnapshot;
QmlJS::Snapshot _newestSnapshot;
QStringList m_allImportPaths;
QStringList m_defaultImportPaths;
QmlJS::QmlLanguageBundles m_activeBundles;
QmlJS::QmlLanguageBundles m_extendedBundles;
QmlJS::ViewerContext m_vContext;
bool m_shouldScanImports;
QSet<QString> m_scannedPaths;
QTimer *m_updateCppQmlTypesTimer;
QTimer *m_asyncResetTimer;
QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > m_queuedCppDocuments;
QFuture<void> m_cppQmlTypesUpdater;
QrcCache m_qrcCache;
CppDataHash m_cppDataHash;
mutable QMutex m_cppDataMutex;
// project integration
QMap<ProjectExplorer::Project *, ProjectInfo> m_projects;
QMultiHash<QString, ProjectExplorer::Project *> m_fileToProject;
PluginDumper *m_pluginDumper;
QFutureSynchronizer<void> m_synchronizer;
};
} // namespace QmlJS
......
......@@ -28,11 +28,11 @@
****************************************************************************/
#include "qmljsplugindumper.h"
#include "qmljsmodelmanager.h"
#include "qmljsmodelmanagerinterface.h"
#include <qmljs/qmljsinterpreter.h>
#include <projectexplorer/session.h>
#include <coreplugin/messagemanager.h>
//#include <projectexplorer/session.h>
//#include <coreplugin/messagemanager.h>
#include <utils/filesystemwatcher.h>
#include <utils/fileutils.h>
......@@ -40,10 +40,8 @@
using namespace LanguageUtils;
using namespace QmlJS;
using namespace QmlJSTools;
using namespace QmlJSTools::Internal;
PluginDumper::PluginDumper(ModelManager *modelManager)
PluginDumper::PluginDumper(ModelManagerInterface *modelManager)
: QObject(modelManager)
, m_modelManager(modelManager)
, m_pluginWatcher(0)
......@@ -256,10 +254,9 @@ static QString qmldumpFailedMessage(const QString &libraryPath, const QString &e