Commit f1b2100e authored by Erik Verbruggen's avatar Erik Verbruggen

Move the ModelManagerInterface out of the CPlusPlus library.

Change-Id: Iffaa18f848a22f6961b49dff048672b194570df6
Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent b7304e2f
......@@ -53,9 +53,7 @@ HEADERS += \
$$PWD/pp-engine.h \
$$PWD/pp-macro-expander.h \
$$PWD/pp-scanner.h \
$$PWD/ModelManagerInterface.h \
$$PWD/findcdbbreakpoint.h \
$$PWD/TypeHierarchyBuilder.h
$$PWD/findcdbbreakpoint.h
SOURCES += \
$$PWD/SimpleLexer.cpp \
......@@ -82,8 +80,6 @@ SOURCES += \
$$PWD/pp-engine.cpp \
$$PWD/pp-macro-expander.cpp \
$$PWD/pp-scanner.cpp \
$$PWD/ModelManagerInterface.cpp \
$$PWD/findcdbbreakpoint.cpp \
$$PWD/TypeHierarchyBuilder.cpp
$$PWD/findcdbbreakpoint.cpp
RESOURCES += $$PWD/cplusplus.qrc
......@@ -41,7 +41,7 @@
#include <utils/qtcassert.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/LookupItem.h>
#include <cplusplus/TypeOfExpression.h>
......
......@@ -48,7 +48,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <extensionsystem/pluginmanager.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
......
......@@ -2,5 +2,4 @@ include(../../libs/utils/utils.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/cpptools/cpptools.pri)
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../libs/cplusplus/cplusplus.pri)
include(../../plugins/texteditor/texteditor.pri)
......@@ -40,7 +40,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/basetexteditor.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cpptools/cpptoolsconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
......
......@@ -41,7 +41,7 @@
#include <Name.h>
// other
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/Overview.h>
#include <cplusplus/Icons.h>
#include <projectexplorer/projectexplorer.h>
......
......@@ -38,7 +38,7 @@
#include "classviewparsertreeitem.h"
#include <CPlusPlusForwardDeclarations.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
// might be changed to forward declaration - is not done to be less dependent
......
......@@ -47,7 +47,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/toolchain.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
......
......@@ -35,7 +35,7 @@
#include "cmaketarget.h"
#include "cmakebuildconfiguration.h"
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <QProcess>
......
......@@ -33,7 +33,7 @@
#ifndef CMAKEUICODEMODELSUPPORT_H
#define CMAKEUICODEMODELSUPPORT_H
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cpptools/uicodecompletionsupport.h>
#include <QDateTime>
......
......@@ -49,7 +49,7 @@
#include <SymbolVisitor.h>
#include <TranslationUnit.h>
#include <cplusplus/ASTPath.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/TypeOfExpression.h>
#include <cplusplus/Overview.h>
......
......@@ -36,7 +36,7 @@
#include "cppeditorenums.h"
#include "cppfunctiondecldeflink.h"
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/LookupContext.h>
#include <texteditor/basetexteditor.h>
......
......@@ -42,8 +42,8 @@
#include <Scope.h>
#include <Symbol.h>
#include <Symbols.h>
#include <TypeHierarchyBuilder.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/TypeHierarchyBuilder.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
......
......@@ -37,7 +37,7 @@
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/helpmanager.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
......
......@@ -57,7 +57,7 @@
#include <texteditor/texteditorplugin.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/texteditorconstants.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cpptoolssettings.h>
......
......@@ -56,7 +56,7 @@
#include <cplusplus/DependencyTable.h>
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppRewriter.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cpprefactoringchanges.h>
......
......@@ -35,8 +35,7 @@
#include <cplusplus/CppDocument.h>
#include <languageutils/fakemetaobject.h>
#include <projectexplorer/project.h>
#include <projectexplorer/toolchain.h>
#include "cpptools_global.h"
#include <QObject>
#include <QHash>
......@@ -66,18 +65,20 @@ namespace CppTools {
namespace CPlusPlus {
class CPLUSPLUS_EXPORT CppModelManagerInterface : public QObject
class CPPTOOLS_EXPORT CppModelManagerInterface : public QObject
{
Q_OBJECT
public:
enum Language { CXX, OBJC };
class CPLUSPLUS_EXPORT ProjectPart
class CPPTOOLS_EXPORT ProjectPart
{
public:
ProjectPart()
: qtVersion(UnknownQt)
: language(CXX)
, cxx11Enabled(false)
, qtVersion(UnknownQt)
{}
public: //attributes
......@@ -87,7 +88,7 @@ public:
QStringList frameworkPaths;
QStringList precompiledHeaders;
Language language;
ProjectExplorer::ToolChain::CompilerFlags flags;
bool cxx11Enabled;
enum QtVersion {
UnknownQt = -1,
NoQt = 0,
......@@ -96,16 +97,13 @@ public:
};
QtVersion qtVersion;
bool cpp0xEnabled() const
{ return flags == ProjectExplorer::ToolChain::STD_CXX11; }
bool objcEnabled() const
{ return language == CppModelManagerInterface::OBJC; }
typedef QSharedPointer<ProjectPart> Ptr;
};
class CPLUSPLUS_EXPORT ProjectInfo
class CPPTOOLS_EXPORT ProjectInfo
{
public:
ProjectInfo()
......@@ -155,7 +153,7 @@ public:
QByteArray m_defines;
};
class CPLUSPLUS_EXPORT WorkingCopy
class CPPTOOLS_EXPORT WorkingCopy
{
public:
void insert(const QString &fileName, const QString &source, unsigned revision = 0)
......
......@@ -36,6 +36,7 @@
#include "CppDocument.h"
#include "ModelManagerInterface.h"
#include "Overview.h"
#include "cpptools_global.h"
#include <QList>
#include <QStringList>
......@@ -43,7 +44,7 @@
namespace CPlusPlus {
class CPLUSPLUS_EXPORT TypeHierarchy
class CPPTOOLS_EXPORT TypeHierarchy
{
friend class TypeHierarchyBuilder;
......@@ -59,7 +60,7 @@ private:
QList<TypeHierarchy> _hierarchy;
};
class CPLUSPLUS_EXPORT TypeHierarchyBuilder
class CPPTOOLS_EXPORT TypeHierarchyBuilder
{
public:
TypeHierarchyBuilder(Symbol *symbol, const Snapshot &snapshot);
......
......@@ -37,7 +37,7 @@
#include <cplusplus/Overview.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/ModelManagerInterface.h>
#include "ModelManagerInterface.h"
#include <CoreTypes.h>
#include <Names.h>
#include <Symbols.h>
......
......@@ -55,7 +55,7 @@
#include <Names.h>
#include <Scope.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/Overview.h>
#include <cplusplus/FindUsages.h>
......
......@@ -96,7 +96,7 @@
namespace CPlusPlus {
uint qHash(const CppModelManagerInterface::ProjectPart &p)
{
uint h = qHash(p.defines) ^ p.language ^ p.flags;
uint h = qHash(p.defines) ^ p.language ^ ((int) p.cxx11Enabled);
foreach (const QString &i, p.includePaths)
h ^= qHash(i);
......@@ -113,7 +113,7 @@ bool operator==(const CppModelManagerInterface::ProjectPart &p1,
return false;
if (p1.language != p2.language)
return false;
if (p1.flags != p2.flags)
if (p1.cxx11Enabled != p2.cxx11Enabled)
return false;
if (p1.includePaths != p2.includePaths)
return false;
......
......@@ -35,7 +35,7 @@
#include "cpptools_global.h"
#include "cpptoolsconstants.h"
#include <cplusplus/ModelManagerInterface.h>
#include "ModelManagerInterface.h"
#ifndef ICHECK_BUILD
# include <projectexplorer/project.h>
#endif
......
......@@ -34,7 +34,7 @@
#define CPPREFACTORINGCHANGES_H
#include <ASTfwd.h>
#include <cplusplus/ModelManagerInterface.h>
#include "ModelManagerInterface.h"
#include <cplusplus/CppDocument.h>
#include <cplusplus/LookupContext.h>
......
......@@ -45,7 +45,9 @@ HEADERS += completionsettingspage.h \
cppchecksymbols.h \
cpplocalsymbols.h \
cppsemanticinfo.h \
cppcompletionassistprovider.h
cppcompletionassistprovider.h \
ModelManagerInterface.h \
TypeHierarchyBuilder.h
SOURCES += completionsettingspage.cpp \
cppclassesfilter.cpp \
......@@ -82,7 +84,9 @@ SOURCES += completionsettingspage.cpp \
cppchecksymbols.cpp \
cpplocalsymbols.cpp \
cppsemanticinfo.cpp \
cppcompletionassistprovider.cpp
cppcompletionassistprovider.cpp \
ModelManagerInterface.cpp \
TypeHierarchyBuilder.cpp
FORMS += completionsettingspage.ui \
cppfilesettingspage.ui \
......
......@@ -37,7 +37,7 @@
#include "cpptools_global.h"
#include "abstracteditorsupport.h"
#include <cplusplus/ModelManagerInterface.h>
#include "ModelManagerInterface.h"
#include <QDateTime>
......
......@@ -75,7 +75,7 @@
#include <cplusplus/findcdbbreakpoint.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <QCoreApplication>
#include <QFileInfo>
......
......@@ -84,7 +84,7 @@
#include <coreplugin/modemanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/invoker.h>
......
......@@ -47,7 +47,7 @@
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/abstracteditorsupport.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/Overview.h>
#include <Symbols.h>
......
......@@ -32,7 +32,7 @@
#include "codemodelhelpers.h"
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/CoreTypes.h>
#include <cplusplus/Name.h>
......
......@@ -43,7 +43,7 @@
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/insertionpointlocator.h>
#include <cpptools/symbolfinder.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/Overview.h>
#include <cplusplus/CoreTypes.h>
......
......@@ -33,7 +33,7 @@
#ifndef QTCREATORINTEGRATION_H
#define QTCREATORINTEGRATION_H
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#if QT_VERSION >= 0x050000
# include <QDesignerIntegration>
......
......@@ -42,7 +42,7 @@
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
......
......@@ -45,7 +45,7 @@
#include <cplusplus/CoreTypes.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/SimpleLexer.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <utils/qtcassert.h>
#include <QDebug>
......
......@@ -40,7 +40,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/messagemanager.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <qmljs/qmljscontext.h>
#include <qmljs/qmljsbind.h>
......
......@@ -4,3 +4,4 @@ include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs.pri)
include($$IDE_SOURCE_TREE/src/plugins/projectexplorer/projectexplorer.pri)
include($$IDE_SOURCE_TREE/src/plugins/qtsupport/qtsupport.pri)
include($$IDE_SOURCE_TREE/src/plugins/texteditor/texteditor.pri)
include($$IDE_SOURCE_TREE/src/plugins/cpptools/cpptools.pri)
......@@ -50,7 +50,7 @@
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/vcsmanager.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/CppDocument.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorer.h>
......
......@@ -51,7 +51,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/headerpath.h>
......@@ -542,7 +542,7 @@ void Qt4Project::updateCppCodeModel()
part->language = CPlusPlus::CppModelManagerInterface::CXX;
// part->flags
if (tc)
part->flags = tc->compilerFlags(pro->variableValue(CppFlagsVar));
part->cxx11Enabled = tc->compilerFlags(pro->variableValue(CppFlagsVar)) == ToolChain::STD_CXX11;
part->sourceFiles = pro->variableValue(CppSourceVar);
pinfo.appendProjectPart(part);
......
......@@ -36,7 +36,7 @@
#include "todoitemsscanner.h"
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
namespace Todo {
namespace Internal {
......
......@@ -2,4 +2,4 @@ include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/find/find.pri)
include(../../libs/cplusplus/cplusplus.pri)
include(../../plugins/cpptools/cpptools.pri)
......@@ -43,7 +43,7 @@
#include <cplusplus/CoreTypes.h>
#include <cplusplus/FullySpecifiedType.h>
#include <cplusplus/Literals.h>
#include <cplusplus/ModelManagerInterface.h>
#include <cpptools/ModelManagerInterface.h>
#include <cplusplus/Symbol.h>
#include <cplusplus/Symbols.h>
#include <cplusplus/TranslationUnit.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment