Commit ea23948e authored by Tobias Hunger's avatar Tobias Hunger

CppTools: Use namespace CppTools consistently

There were quite a few classes using CPlusPlus namespace in the
CppTools plugin. Rename them and do some other small namespace
related coding style fixups.

Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent ff3bf324
...@@ -82,7 +82,7 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor() ...@@ -82,7 +82,7 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
const int pos = tc.position(); const int pos = tc.position();
editorWidget->convertPosition(pos, &line, &column); editorWidget->convertPosition(pos, &line, &column);
const CPlusPlus::Snapshot &snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot(); const CPlusPlus::Snapshot &snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
CPlusPlus::Document::Ptr doc = snapshot.document(editor->document()->fileName()); CPlusPlus::Document::Ptr doc = snapshot.document(editor->document()->fileName());
QTC_ASSERT(doc, return 0); QTC_ASSERT(doc, return 0);
......
...@@ -406,8 +406,8 @@ QList<Node *> AutotoolsProject::nodes(FolderNode *parent) const ...@@ -406,8 +406,8 @@ QList<Node *> AutotoolsProject::nodes(FolderNode *parent) const
void AutotoolsProject::updateCppCodeModel() void AutotoolsProject::updateCppCodeModel()
{ {
CPlusPlus::CppModelManagerInterface *modelManager = CppTools::CppModelManagerInterface *modelManager =
CPlusPlus::CppModelManagerInterface::instance(); CppTools::CppModelManagerInterface::instance();
if (!modelManager) if (!modelManager)
return; return;
...@@ -435,7 +435,7 @@ void AutotoolsProject::updateCppCodeModel() ...@@ -435,7 +435,7 @@ void AutotoolsProject::updateCppCodeModel()
} }
} }
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this); CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
const bool update = (pinfo.includePaths() != allIncludePaths) const bool update = (pinfo.includePaths() != allIncludePaths)
|| (pinfo.sourceFiles() != m_files) || (pinfo.sourceFiles() != m_files)
...@@ -443,15 +443,15 @@ void AutotoolsProject::updateCppCodeModel() ...@@ -443,15 +443,15 @@ void AutotoolsProject::updateCppCodeModel()
|| (pinfo.frameworkPaths() != allFrameworkPaths); || (pinfo.frameworkPaths() != allFrameworkPaths);
if (update) { if (update) {
pinfo.clearProjectParts(); pinfo.clearProjectParts();
CPlusPlus::ProjectPart::Ptr part(new CPlusPlus::ProjectPart); CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->includePaths = allIncludePaths; part->includePaths = allIncludePaths;
foreach (const QString &file, m_files) foreach (const QString &file, m_files)
part->files << CPlusPlus::ProjectFile(file, CPlusPlus::ProjectFile::CXXSource); part->files << CppTools::ProjectFile(file, CppTools::ProjectFile::CXXSource);
part->defines = macros; part->defines = macros;
part->frameworkPaths = allFrameworkPaths; part->frameworkPaths = allFrameworkPaths;
part->cVersion = CPlusPlus::ProjectPart::C99; part->cVersion = CppTools::ProjectPart::C99;
part->cxxVersion = CPlusPlus::ProjectPart::CXX11; part->cxxVersion = CppTools::ProjectPart::CXX11;
pinfo.appendProjectPart(part); pinfo.appendProjectPart(part);
modelManager->updateProjectInfo(pinfo); modelManager->updateProjectInfo(pinfo);
......
...@@ -182,8 +182,8 @@ void Manager::initialize() ...@@ -182,8 +182,8 @@ void Manager::initialize()
&d->parser, SLOT(setFlatMode(bool)), Qt::QueuedConnection); &d->parser, SLOT(setFlatMode(bool)), Qt::QueuedConnection);
// connect to the cpp model manager for signals about document updates // connect to the cpp model manager for signals about document updates
CPlusPlus::CppModelManagerInterface *codeModelManager CppTools::CppModelManagerInterface *codeModelManager
= CPlusPlus::CppModelManagerInterface::instance(); = CppTools::CppModelManagerInterface::instance();
// when code manager signals that document is updated - handle it by ourselves // when code manager signals that document is updated - handle it by ourselves
connect(codeModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)), connect(codeModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
......
...@@ -568,7 +568,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot) ...@@ -568,7 +568,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot)
void Parser::resetDataToCurrentState() void Parser::resetDataToCurrentState()
{ {
// get latest data // get latest data
CPlusPlus::CppModelManagerInterface *codeModel = CPlusPlus::CppModelManagerInterface::instance(); CppTools::CppModelManagerInterface *codeModel = CppTools::CppModelManagerInterface::instance();
if (codeModel) if (codeModel)
resetData(codeModel->snapshot()); resetData(codeModel->snapshot());
} }
......
...@@ -123,8 +123,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName) ...@@ -123,8 +123,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
CMakeProject::~CMakeProject() CMakeProject::~CMakeProject()
{ {
// Remove CodeModel support // Remove CodeModel support
CPlusPlus::CppModelManagerInterface *modelManager CppTools::CppModelManagerInterface *modelManager
= CPlusPlus::CppModelManagerInterface::instance(); = CppTools::CppModelManagerInterface::instance();
QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end; QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
it = m_uiCodeModelSupport.constBegin(); it = m_uiCodeModelSupport.constBegin();
end = m_uiCodeModelSupport.constEnd(); end = m_uiCodeModelSupport.constEnd();
...@@ -367,29 +367,29 @@ bool CMakeProject::parseCMakeLists() ...@@ -367,29 +367,29 @@ bool CMakeProject::parseCMakeLists()
allIncludePaths.append(headerPath.path()); allIncludePaths.append(headerPath.path());
} }
CPlusPlus::CppModelManagerInterface *modelmanager = CppTools::CppModelManagerInterface *modelmanager =
CPlusPlus::CppModelManagerInterface::instance(); CppTools::CppModelManagerInterface::instance();
if (modelmanager) { if (modelmanager) {
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this); CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
if (pinfo.includePaths() != allIncludePaths if (pinfo.includePaths() != allIncludePaths
|| pinfo.sourceFiles() != m_files || pinfo.sourceFiles() != m_files
|| pinfo.defines() != allDefines || pinfo.defines() != allDefines
|| pinfo.frameworkPaths() != allFrameworkPaths) { || pinfo.frameworkPaths() != allFrameworkPaths) {
pinfo.clearProjectParts(); pinfo.clearProjectParts();
CPlusPlus::ProjectPart::Ptr part(new CPlusPlus::ProjectPart); CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->includePaths = allIncludePaths; part->includePaths = allIncludePaths;
CPlusPlus::ProjectFileAdder adder(part->files); CppTools::ProjectFileAdder adder(part->files);
foreach (const QString &file, m_files) foreach (const QString &file, m_files)
adder.maybeAdd(file); adder.maybeAdd(file);
part->defines = allDefines; part->defines = allDefines;
part->frameworkPaths = allFrameworkPaths; part->frameworkPaths = allFrameworkPaths;
part->cVersion = CPlusPlus::ProjectPart::C99; part->cVersion = CppTools::ProjectPart::C99;
if (tc) if (tc)
part->cxxVersion = tc->compilerFlags(cxxflags) == ToolChain::STD_CXX11 part->cxxVersion = tc->compilerFlags(cxxflags) == ToolChain::STD_CXX11
? CPlusPlus::ProjectPart::CXX11 ? CppTools::ProjectPart::CXX11
: CPlusPlus::ProjectPart::CXX98; : CppTools::ProjectPart::CXX98;
else else
part->cxxVersion = CPlusPlus::ProjectPart::CXX11; part->cxxVersion = CppTools::ProjectPart::CXX11;
pinfo.appendProjectPart(part); pinfo.appendProjectPart(part);
modelmanager->updateProjectInfo(pinfo); modelmanager->updateProjectInfo(pinfo);
m_codeModelFuture.cancel(); m_codeModelFuture.cancel();
...@@ -787,8 +787,8 @@ void CMakeProject::updateRunConfigurations(Target *t) ...@@ -787,8 +787,8 @@ void CMakeProject::updateRunConfigurations(Target *t)
void CMakeProject::createUiCodeModelSupport() void CMakeProject::createUiCodeModelSupport()
{ {
// qDebug()<<"creatUiCodeModelSupport()"; // qDebug()<<"creatUiCodeModelSupport()";
CPlusPlus::CppModelManagerInterface *modelManager CppTools::CppModelManagerInterface *modelManager
= CPlusPlus::CppModelManagerInterface::instance(); = CppTools::CppModelManagerInterface::instance();
// First move all to // First move all to
QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport; QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
using namespace CMakeProjectManager; using namespace CMakeProjectManager;
using namespace Internal; using namespace Internal;
CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager, CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
CMakeProject *project, CMakeProject *project,
const QString &source, const QString &source,
const QString &uiHeaderFile) const QString &uiHeaderFile)
......
...@@ -43,7 +43,7 @@ class CMakeProject; ...@@ -43,7 +43,7 @@ class CMakeProject;
class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
{ {
public: public:
CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager, CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
CMakeProject *project, CMakeProject *project,
const QString &sourceFile, const QString &sourceFile,
const QString &uiHeaderFile); const QString &uiHeaderFile);
......
...@@ -84,11 +84,11 @@ TestCase::TestCase(const QByteArray &input) ...@@ -84,11 +84,11 @@ TestCase::TestCase(const QByteArray &input)
Utils::FileSaver srcSaver(fileName); Utils::FileSaver srcSaver(fileName);
srcSaver.write(originalText); srcSaver.write(originalText);
srcSaver.finalize(); srcSaver.finalize();
CPlusPlus::CppModelManagerInterface::instance()->updateSourceFiles(QStringList()<<fileName); CppTools::CppModelManagerInterface::instance()->updateSourceFiles(QStringList()<<fileName);
// Wait for the parser in the future to give us the document // Wait for the parser in the future to give us the document
while (true) { while (true) {
Snapshot s = CPlusPlus::CppModelManagerInterface::instance()->snapshot(); Snapshot s = CppTools::CppModelManagerInterface::instance()->snapshot();
if (s.contains(fileName)) if (s.contains(fileName))
break; break;
QCoreApplication::processEvents(); QCoreApplication::processEvents();
...@@ -120,7 +120,7 @@ TestCase::~TestCase() ...@@ -120,7 +120,7 @@ TestCase::~TestCase()
QCoreApplication::processEvents(); // process any pending events QCoreApplication::processEvents(); // process any pending events
// Remove the test file from the code-model // Remove the test file from the code-model
CppModelManagerInterface *mmi = CPlusPlus::CppModelManagerInterface::instance(); CppTools::CppModelManagerInterface *mmi = CppTools::CppModelManagerInterface::instance();
mmi->GC(); mmi->GC();
QCOMPARE(mmi->snapshot().size(), 0); QCOMPARE(mmi->snapshot().size(), 0);
} }
......
...@@ -1282,7 +1282,7 @@ void CPPEditorWidget::finishHighlightSymbolUsages() ...@@ -1282,7 +1282,7 @@ void CPPEditorWidget::finishHighlightSymbolUsages()
if (m_modelManager) if (m_modelManager)
m_modelManager->setExtraDiagnostics(m_lastSemanticInfo.doc->fileName(), m_modelManager->setExtraDiagnostics(m_lastSemanticInfo.doc->fileName(),
CPlusPlus::CppModelManagerInterface::CppSemanticsDiagnostic, CppTools::CppModelManagerInterface::CppSemanticsDiagnostic,
m_lastSemanticInfo.doc->diagnosticMessages()); m_lastSemanticInfo.doc->diagnosticMessages());
} }
......
...@@ -59,17 +59,15 @@ QT_END_NAMESPACE ...@@ -59,17 +59,15 @@ QT_END_NAMESPACE
namespace CPlusPlus { namespace CPlusPlus {
class OverviewModel; class OverviewModel;
class Symbol; class Symbol;
class CppModelManagerInterface;
} }
namespace CppTools { namespace CppTools {
class CppCodeStyleSettings; class CppCodeStyleSettings;
class CppModelManagerInterface;
class CppRefactoringFile; class CppRefactoringFile;
} }
namespace TextEditor { namespace TextEditor { class FontSettings; }
class FontSettings;
}
namespace CppEditor { namespace CppEditor {
namespace Internal { namespace Internal {
...@@ -185,7 +183,7 @@ public: ...@@ -185,7 +183,7 @@ public:
virtual void cut(); // reimplemented from BaseTextEditorWidget virtual void cut(); // reimplemented from BaseTextEditorWidget
virtual void selectAll(); // reimplemented from BaseTextEditorWidget virtual void selectAll(); // reimplemented from BaseTextEditorWidget
CPlusPlus::CppModelManagerInterface *modelManager() const; CppTools::CppModelManagerInterface *modelManager() const;
virtual void setMimeType(const QString &mt); virtual void setMimeType(const QString &mt);
...@@ -293,7 +291,7 @@ private: ...@@ -293,7 +291,7 @@ private:
bool handleDocumentationComment(QKeyEvent *e); bool handleDocumentationComment(QKeyEvent *e);
bool isStartOfDoxygenComment(const QTextCursor &cursor) const; bool isStartOfDoxygenComment(const QTextCursor &cursor) const;
CPlusPlus::CppModelManagerInterface *m_modelManager; CppTools::CppModelManagerInterface *m_modelManager;
QComboBox *m_outlineCombo; QComboBox *m_outlineCombo;
CPlusPlus::OverviewModel *m_outlineModel; CPlusPlus::OverviewModel *m_outlineModel;
......
...@@ -73,7 +73,7 @@ namespace { ...@@ -73,7 +73,7 @@ namespace {
CppElementEvaluator::CppElementEvaluator(CPPEditorWidget *editor) : CppElementEvaluator::CppElementEvaluator(CPPEditorWidget *editor) :
m_editor(editor), m_editor(editor),
m_modelManager(CppModelManagerInterface::instance()), m_modelManager(CppTools::CppModelManagerInterface::instance()),
m_tc(editor->textCursor()), m_tc(editor->textCursor()),
m_lookupBaseClasses(false), m_lookupBaseClasses(false),
m_lookupDerivedClasses(false) m_lookupDerivedClasses(false)
...@@ -348,18 +348,18 @@ void CppClass::lookupBases(Symbol *declaration, const CPlusPlus::LookupContext & ...@@ -348,18 +348,18 @@ void CppClass::lookupBases(Symbol *declaration, const CPlusPlus::LookupContext &
void CppClass::lookupDerived(CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot) void CppClass::lookupDerived(CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot)
{ {
typedef QPair<CppClass *, TypeHierarchy> Data; typedef QPair<CppClass *, CppTools::TypeHierarchy> Data;
TypeHierarchyBuilder builder(declaration, snapshot); CppTools::TypeHierarchyBuilder builder(declaration, snapshot);
const TypeHierarchy &completeHierarchy = builder.buildDerivedTypeHierarchy(); const CppTools::TypeHierarchy &completeHierarchy = builder.buildDerivedTypeHierarchy();
QQueue<Data> q; QQueue<Data> q;
q.enqueue(qMakePair(this, completeHierarchy)); q.enqueue(qMakePair(this, completeHierarchy));
while (!q.isEmpty()) { while (!q.isEmpty()) {
const Data &current = q.dequeue(); const Data &current = q.dequeue();
CppClass *clazz = current.first; CppClass *clazz = current.first;
const TypeHierarchy &classHierarchy = current.second; const CppTools::TypeHierarchy &classHierarchy = current.second;
foreach (const TypeHierarchy &derivedHierarchy, classHierarchy.hierarchy()) { foreach (const CppTools::TypeHierarchy &derivedHierarchy, classHierarchy.hierarchy()) {
clazz->derived.append(CppClass(derivedHierarchy.symbol())); clazz->derived.append(CppClass(derivedHierarchy.symbol()));
q.enqueue(qMakePair(&clazz->derived.last(), derivedHierarchy)); q.enqueue(qMakePair(&clazz->derived.last(), derivedHierarchy));
} }
......
...@@ -49,9 +49,7 @@ class LookupItem; ...@@ -49,9 +49,7 @@ class LookupItem;
class LookupContext; class LookupContext;
} }
namespace CppTools { namespace CppTools { class CppModelManagerInterface; }
class CppModelManagerInterface;
}
namespace CppEditor { namespace CppEditor {
namespace Internal { namespace Internal {
...@@ -84,7 +82,7 @@ private: ...@@ -84,7 +82,7 @@ private:
const CPlusPlus::LookupContext &lookupContext); const CPlusPlus::LookupContext &lookupContext);
CPPEditorWidget *m_editor; CPPEditorWidget *m_editor;
CPlusPlus::CppModelManagerInterface *m_modelManager; CppTools::CppModelManagerInterface *m_modelManager;
QTextCursor m_tc; QTextCursor m_tc;
bool m_lookupBaseClasses; bool m_lookupBaseClasses;
bool m_lookupDerivedClasses; bool m_lookupDerivedClasses;
......
...@@ -283,7 +283,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess ...@@ -283,7 +283,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cppToolsMenu->addSeparator(globalContext); cppToolsMenu->addSeparator(globalContext);
m_updateCodeModelAction = new QAction(tr("Update Code Model"), this); m_updateCodeModelAction = new QAction(tr("Update Code Model"), this);
cmd = Core::ActionManager::registerAction(m_updateCodeModelAction, Core::Id(Constants::UPDATE_CODEMODEL), globalContext); cmd = Core::ActionManager::registerAction(m_updateCodeModelAction, Core::Id(Constants::UPDATE_CODEMODEL), globalContext);
CPlusPlus::CppModelManagerInterface *cppModelManager = CPlusPlus::CppModelManagerInterface::instance(); CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles())); connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd); cppToolsMenu->addAction(cmd);
......
...@@ -34,10 +34,7 @@ ...@@ -34,10 +34,7 @@
#include <texteditor/quickfix.h> #include <texteditor/quickfix.h>
namespace CPlusPlus { namespace CPlusPlus { class Snapshot; }
class CppModelManagerInterface;
class Snapshot;
}
namespace CppEditor { namespace CppEditor {
namespace Internal { class CppQuickFixAssistInterface; } namespace Internal { class CppQuickFixAssistInterface; }
......
...@@ -207,12 +207,12 @@ void TestCase::init() ...@@ -207,12 +207,12 @@ void TestCase::init()
QStringList filePaths; QStringList filePaths;
foreach (const TestDocumentPtr &testFile, testFiles) foreach (const TestDocumentPtr &testFile, testFiles)
filePaths << testFile->filePath(); filePaths << testFile->filePath();
CPlusPlus::CppModelManagerInterface::instance()->updateSourceFiles(filePaths); CppTools::CppModelManagerInterface::instance()->updateSourceFiles(filePaths);
// Wait for the parser in the future to give us the document // Wait for the parser in the future to give us the document
QStringList filePathsNotYetInSnapshot(filePaths); QStringList filePathsNotYetInSnapshot(filePaths);
forever { forever {
Snapshot snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot(); Snapshot snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
foreach (const QString &filePath, filePathsNotYetInSnapshot) { foreach (const QString &filePath, filePathsNotYetInSnapshot) {
if (snapshot.contains(filePath)) if (snapshot.contains(filePath))
filePathsNotYetInSnapshot.removeOne(filePath); filePathsNotYetInSnapshot.removeOne(filePath);
...@@ -267,7 +267,7 @@ TestCase::~TestCase() ...@@ -267,7 +267,7 @@ TestCase::~TestCase()
QCoreApplication::processEvents(); // process any pending events QCoreApplication::processEvents(); // process any pending events
// Remove the test files from the code-model // Remove the test files from the code-model
CppModelManagerInterface *mmi = CPlusPlus::CppModelManagerInterface::instance(); CppModelManagerInterface *mmi = CppTools::CppModelManagerInterface::instance();
mmi->GC(); mmi->GC();
QCOMPARE(mmi->snapshot().size(), 0); QCOMPARE(mmi->snapshot().size(), 0);
} }
......
...@@ -101,7 +101,7 @@ CppQuickFixAssistInterface::CppQuickFixAssistInterface(CPPEditorWidget *editor, ...@@ -101,7 +101,7 @@ CppQuickFixAssistInterface::CppQuickFixAssistInterface(CPPEditorWidget *editor,
editor->editorDocument()->fileName(), reason) editor->editorDocument()->fileName(), reason)
, m_editor(editor) , m_editor(editor)
, m_semanticInfo(editor->semanticInfo()) , m_semanticInfo(editor->semanticInfo())
, m_snapshot(CPlusPlus::CppModelManagerInterface::instance()->snapshot()) , m_snapshot(CppTools::CppModelManagerInterface::instance()->snapshot())
, m_currentFile(CppRefactoringChanges::file(editor, m_semanticInfo.doc)) , m_currentFile(CppRefactoringChanges::file(editor, m_semanticInfo.doc))
, m_context(m_semanticInfo.doc, m_snapshot) , m_context(m_semanticInfo.doc, m_snapshot)
{ {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <QtCore/QSet> #include <QtCore/QSet>
/*! /*!
\enum CPlusPlus::CppModelManagerInterface::QtVersion \enum CppTools::CppModelManagerInterface::QtVersion
Allows C++ parser engine to inject headers or change inner settings as Allows C++ parser engine to inject headers or change inner settings as
needed to parse Qt language extensions for concrete major Qt version needed to parse Qt language extensions for concrete major Qt version
\value UnknownQt \value UnknownQt
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
Parser may enable tricks for Qt v5.x Parser may enable tricks for Qt v5.x
*/ */
using namespace CPlusPlus; using namespace CppTools;
static CppModelManagerInterface *g_instance = 0; static CppModelManagerInterface *g_instance = 0;
const QString CppModelManagerInterface::configurationFileName() const QString CppModelManagerInterface::configurationFileName()
{ return Preprocessor::configurationFileName; } { return CPlusPlus::Preprocessor::configurationFileName; }
CppModelManagerInterface::CppModelManagerInterface(QObject *parent) CppModelManagerInterface::CppModelManagerInterface(QObject *parent)
: QObject(parent) : QObject(parent)
......
...@@ -42,28 +42,17 @@ ...@@ -42,28 +42,17 @@
#include <QStringList> #include <QStringList>
#include <QFuture> #include <QFuture>
namespace Core { namespace Core { class IEditor; }
class IEditor; namespace CPlusPlus { class LookupContext; }
} namespace ProjectExplorer { class Project; }
namespace CPlusPlus {
class LookupContext;
}
namespace ProjectExplorer {
class Project;
}
namespace CppTools { namespace CppTools {
class AbstractEditorSupport; class AbstractEditorSupport;
class CppCompletionSupport; class CppCompletionSupport;
class CppCompletionAssistProvider; class CppCompletionAssistProvider;
class CppHighlightingSupport; class CppHighlightingSupport;
class CppHighlightingSupportFactory; class CppHighlightingSupportFactory;
class CppIndexingSupport; class CppIndexingSupport;
}
namespace CPlusPlus {
class CPPTOOLS_EXPORT ProjectPart class CPPTOOLS_EXPORT ProjectPart
{ {
...@@ -268,6 +257,6 @@ public Q_SLOTS: ...@@ -268,6 +257,6 @@ public Q_SLOTS:
virtual void GC() = 0; virtual void GC() = 0;
}; };
} // namespace CPlusPlus } // namespace CppTools
#endif // CPPMODELMANAGERINTERFACE_H #endif // CPPMODELMANAGERINTERFACE_H
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <cplusplus/Symbols.h> #include <cplusplus/Symbols.h>
#include <cplusplus/TranslationUnit.h> #include <cplusplus/TranslationUnit.h>
using namespace CPlusPlus; using namespace CppTools;
namespace { namespace {
...@@ -50,7 +50,7 @@ QString unqualifyName(const QString &qualifiedName) ...@@ -50,7 +50,7 @@ QString unqualifyName(const QString &qualifiedName)
return qualifiedName.right(qualifiedName.length() - index - 2); return qualifiedName.right(qualifiedName.length() - index - 2);
} }
class DerivedHierarchyVisitor : public SymbolVisitor class DerivedHierarchyVisitor :