Commit b8a6a4dd authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Erik Verbruggen

CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}

Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 077bbf68
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <cpptools/cppdoxygen.h> #include <cpptools/cppdoxygen.h>
#include <cpptools/cppmodelmanagerinterface.h> #include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cppworkingcopy.h>
#include <texteditor/basetexteditor.h> #include <texteditor/basetexteditor.h>
#include <texteditor/convenience.h> #include <texteditor/convenience.h>
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <cpptools/cppworkingcopy.h>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
#include <QSet> #include <QSet>
...@@ -64,7 +66,7 @@ bool isBlacklisted(const QString &path) ...@@ -64,7 +66,7 @@ bool isBlacklisted(const QString &path)
} }
} // anonymous namespace } // anonymous namespace
UnsavedFiles createUnsavedFiles(CppModelManagerInterface::WorkingCopy workingCopy) UnsavedFiles createUnsavedFiles(WorkingCopy workingCopy)
{ {
// TODO: change the modelmanager to hold one working copy, and amend it every time we ask for one. // TODO: change the modelmanager to hold one working copy, and amend it every time we ask for one.
// TODO: Reason: the UnsavedFile needs a QByteArray. // TODO: Reason: the UnsavedFile needs a QByteArray.
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
namespace ClangCodeModel { namespace ClangCodeModel {
namespace Utils { namespace Utils {
ClangCodeModel::Internal::UnsavedFiles createUnsavedFiles(CppTools::CppModelManagerInterface::WorkingCopy workingCopy); ClangCodeModel::Internal::UnsavedFiles createUnsavedFiles(CppTools::WorkingCopy workingCopy);
QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart, CppTools::ProjectFile::Kind fileKind); QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart, CppTools::ProjectFile::Kind fileKind);
QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart, const QString &fileName = QString()); QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart, const QString &fileName = QString());
......
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
#include "clangutils.h" #include "clangutils.h"
#include "cppcreatemarkers.h" #include "cppcreatemarkers.h"
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h> #include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cppworkingcopy.h>
#include <cplusplus/CppDocument.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/runextensions.h> #include <utils/runextensions.h>
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <cpptools/cppcodemodelinspectordumper.h> #include <cpptools/cppcodemodelinspectordumper.h>
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <cpptools/cpptoolseditorsupport.h> #include <cpptools/cpptoolseditorsupport.h>
#include <cpptools/cppworkingcopy.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <cplusplus/CppDocument.h> #include <cplusplus/CppDocument.h>
...@@ -1050,7 +1051,7 @@ class WorkingCopyModel : public QAbstractListModel ...@@ -1050,7 +1051,7 @@ class WorkingCopyModel : public QAbstractListModel
public: public:
WorkingCopyModel(QObject *parent); WorkingCopyModel(QObject *parent);
void configure(const CppModelManagerInterface::WorkingCopy &workingCopy); void configure(const WorkingCopy &workingCopy);
QModelIndex indexForFile(const QString &filePath); QModelIndex indexForFile(const QString &filePath);
enum Columns { RevisionColumn, FilePathColumn, ColumnCount }; enum Columns { RevisionColumn, FilePathColumn, ColumnCount };
...@@ -1078,7 +1079,7 @@ WorkingCopyModel::WorkingCopyModel(QObject *parent) : QAbstractListModel(parent) ...@@ -1078,7 +1079,7 @@ WorkingCopyModel::WorkingCopyModel(QObject *parent) : QAbstractListModel(parent)
{ {
} }
void WorkingCopyModel::configure(const CppModelManagerInterface::WorkingCopy &workingCopy) void WorkingCopyModel::configure(const WorkingCopy &workingCopy)
{ {
emit layoutAboutToBeChanged(); emit layoutAboutToBeChanged();
m_workingCopyList.clear(); m_workingCopyList.clear();
...@@ -1431,7 +1432,7 @@ void CppCodeModelInspectorDialog::refresh() ...@@ -1431,7 +1432,7 @@ void CppCodeModelInspectorDialog::refresh()
} }
// Working Copy // Working Copy
const CppModelManagerInterface::WorkingCopy workingCopy = cmmi->workingCopy(); const WorkingCopy workingCopy = cmmi->workingCopy();
dumper.dumpWorkingCopy(workingCopy); dumper.dumpWorkingCopy(workingCopy);
m_workingCopyModel->configure(workingCopy); m_workingCopyModel->configure(workingCopy);
m_workingCopyView->resizeColumns(WorkingCopyModel::ColumnCount); m_workingCopyView->resizeColumns(WorkingCopyModel::ColumnCount);
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <cpptools/cpptoolseditorsupport.h> #include <cpptools/cpptoolseditorsupport.h>
#include <cpptools/cpptoolsplugin.h> #include <cpptools/cpptoolsplugin.h>
#include <cpptools/cpptoolsreuse.h> #include <cpptools/cpptoolsreuse.h>
#include <cpptools/cppworkingcopy.h>
#include <cpptools/symbolfinder.h> #include <cpptools/symbolfinder.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
......
...@@ -38,14 +38,15 @@ ...@@ -38,14 +38,15 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <cpptools/cppmodelmanagerinterface.h> #include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptoolsreuse.h> #include <cpptools/cpptoolsreuse.h>
#include <extensionsystem/pluginmanager.h> #include <cpptools/cppworkingcopy.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <texteditor/basetextdocument.h> #include <texteditor/basetextdocument.h>
#include <utils/algorithm.h>
#include <extensionsystem/pluginmanager.h>
#include <cplusplus/CppDocument.h> #include <cplusplus/CppDocument.h>
#include <cplusplus/TranslationUnit.h> #include <cplusplus/TranslationUnit.h>
#include <utils/algorithm.h>
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
......
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
int dumpFileNameWhileParsing; int dumpFileNameWhileParsing;
int revision; int revision;
ProjectPart::HeaderPaths headerPaths; ProjectPart::HeaderPaths headerPaths;
CppModelManagerInterface::WorkingCopy workingCopy; WorkingCopy workingCopy;
QStringList sourceFiles; QStringList sourceFiles;
}; };
......
...@@ -39,9 +39,6 @@ namespace CppTools { ...@@ -39,9 +39,6 @@ namespace CppTools {
namespace Internal { namespace Internal {
class BuiltinIndexingSupport: public CppIndexingSupport { class BuiltinIndexingSupport: public CppIndexingSupport {
public:
typedef CppModelManagerInterface::WorkingCopy WorkingCopy;
public: public:
BuiltinIndexingSupport(); BuiltinIndexingSupport();
~BuiltinIndexingSupport(); ~BuiltinIndexingSupport();
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "cppcodemodelinspectordumper.h" #include "cppcodemodelinspectordumper.h"
#include "cppworkingcopy.h"
#include <app/app_version.h> #include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <cpptools/cppprojectfile.h> #include <cpptools/cppprojectfile.h>
...@@ -578,7 +580,7 @@ void Dumper::dumpSnapshot(const CPlusPlus::Snapshot &snapshot, const QString &ti ...@@ -578,7 +580,7 @@ void Dumper::dumpSnapshot(const CPlusPlus::Snapshot &snapshot, const QString &ti
} }
} }
void Dumper::dumpWorkingCopy(const CppModelManagerInterface::WorkingCopy &workingCopy) void Dumper::dumpWorkingCopy(const WorkingCopy &workingCopy)
{ {
m_out << "Working Copy contains " << workingCopy.size() << " entries{{{1\n"; m_out << "Working Copy contains " << workingCopy.size() << " entries{{{1\n";
......
...@@ -73,7 +73,7 @@ public: ...@@ -73,7 +73,7 @@ public:
void dumpSnapshot(const CPlusPlus::Snapshot &snapshot, void dumpSnapshot(const CPlusPlus::Snapshot &snapshot,
const QString &title, const QString &title,
bool isGlobalSnapshot = false); bool isGlobalSnapshot = false);
void dumpWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy); void dumpWorkingCopy(const CppTools::WorkingCopy &workingCopy);
void dumpMergedEntities(const ProjectPart::HeaderPaths &mergedHeaderPaths, void dumpMergedEntities(const ProjectPart::HeaderPaths &mergedHeaderPaths,
const QByteArray &mergedMacros); const QByteArray &mergedMacros);
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "cppcompletionassistprovider.h" #include "cppcompletionassistprovider.h"
#include "cppmodelmanagerinterface.h" #include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <cplusplus/Icons.h> #include <cplusplus/Icons.h>
#include <cplusplus/TypeOfExpression.h> #include <cplusplus/TypeOfExpression.h>
...@@ -177,7 +178,7 @@ public: ...@@ -177,7 +178,7 @@ public:
bool isObjCEnabled, bool isObjCEnabled,
int position, int position,
TextEditor::AssistReason reason, TextEditor::AssistReason reason,
const CppModelManagerInterface::WorkingCopy &workingCopy) const WorkingCopy &workingCopy)
: TextEditor::DefaultAssistInterface(textDocument, position, editor->document()->filePath(), : TextEditor::DefaultAssistInterface(textDocument, position, editor->document()->filePath(),
reason) reason)
, m_editor(editor) , m_editor(editor)
...@@ -212,7 +213,7 @@ private: ...@@ -212,7 +213,7 @@ private:
TextEditor::BaseTextEditor *m_editor; TextEditor::BaseTextEditor *m_editor;
mutable bool m_isObjCEnabled; mutable bool m_isObjCEnabled;
mutable bool m_gotCppSpecifics; mutable bool m_gotCppSpecifics;
CppModelManagerInterface::WorkingCopy m_workingCopy; WorkingCopy m_workingCopy;
mutable CPlusPlus::Snapshot m_snapshot; mutable CPlusPlus::Snapshot m_snapshot;
mutable ProjectPart::HeaderPaths m_headerPaths; mutable ProjectPart::HeaderPaths m_headerPaths;
}; };
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "cpptoolsconstants.h" #include "cpptoolsconstants.h"
#include "cppmodelmanagerinterface.h" #include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
...@@ -54,7 +55,7 @@ using namespace CppTools; ...@@ -54,7 +55,7 @@ using namespace CppTools;
using namespace CPlusPlus; using namespace CPlusPlus;
static QByteArray getSource(const QString &fileName, static QByteArray getSource(const QString &fileName,
const CppModelManagerInterface::WorkingCopy &workingCopy) const WorkingCopy &workingCopy)
{ {
if (workingCopy.contains(fileName)) { if (workingCopy.contains(fileName)) {
return workingCopy.source(fileName); return workingCopy.source(fileName);
...@@ -167,14 +168,14 @@ namespace { ...@@ -167,14 +168,14 @@ namespace {
class ProcessFile: public std::unary_function<QString, QList<Usage> > class ProcessFile: public std::unary_function<QString, QList<Usage> >
{ {
const CppModelManagerInterface::WorkingCopy workingCopy; const WorkingCopy workingCopy;
const Snapshot snapshot; const Snapshot snapshot;
Document::Ptr symbolDocument; Document::Ptr symbolDocument;
Symbol *symbol; Symbol *symbol;
QFutureInterface<Usage> *future; QFutureInterface<Usage> *future;
public: public:
ProcessFile(const CppModelManagerInterface::WorkingCopy &workingCopy, ProcessFile(const WorkingCopy &workingCopy,
const Snapshot snapshot, const Snapshot snapshot,
Document::Ptr symbolDocument, Document::Ptr symbolDocument,
Symbol *symbol, Symbol *symbol,
...@@ -268,7 +269,7 @@ QList<int> CppFindReferences::references(Symbol *symbol, const LookupContext &co ...@@ -268,7 +269,7 @@ QList<int> CppFindReferences::references(Symbol *symbol, const LookupContext &co
} }
static void find_helper(QFutureInterface<Usage> &future, static void find_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy, const WorkingCopy workingCopy,
const LookupContext context, const LookupContext context,
CppFindReferences *findRefs, CppFindReferences *findRefs,
Symbol *symbol) Symbol *symbol)
...@@ -367,7 +368,7 @@ void CppFindReferences::findAll_helper(Core::SearchResult *search, CPlusPlus::Sy ...@@ -367,7 +368,7 @@ void CppFindReferences::findAll_helper(Core::SearchResult *search, CPlusPlus::Sy
this, SLOT(openEditor(Core::SearchResultItem))); this, SLOT(openEditor(Core::SearchResultItem)));
Core::SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus); Core::SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy(); const WorkingCopy workingCopy = m_modelManager->workingCopy();
QFuture<Usage> result; QFuture<Usage> result;
result = QtConcurrent::run(&find_helper, workingCopy, context, this, symbol); result = QtConcurrent::run(&find_helper, workingCopy, context, this, symbol);
createWatcher(result, search); createWatcher(result, search);
...@@ -531,13 +532,13 @@ namespace { ...@@ -531,13 +532,13 @@ namespace {
class FindMacroUsesInFile: public std::unary_function<QString, QList<Usage> > class FindMacroUsesInFile: public std::unary_function<QString, QList<Usage> >
{ {
const CppModelManagerInterface::WorkingCopy workingCopy; const WorkingCopy workingCopy;
const Snapshot snapshot; const Snapshot snapshot;
const Macro &macro; const Macro &macro;
QFutureInterface<Usage> *future; QFutureInterface<Usage> *future;
public: public:
FindMacroUsesInFile(const CppModelManagerInterface::WorkingCopy &workingCopy, FindMacroUsesInFile(const WorkingCopy &workingCopy,
const Snapshot snapshot, const Snapshot snapshot,
const Macro &macro, const Macro &macro,
QFutureInterface<Usage> *future) QFutureInterface<Usage> *future)
...@@ -611,7 +612,7 @@ restart_search: ...@@ -611,7 +612,7 @@ restart_search:
} // end of anonymous namespace } // end of anonymous namespace
static void findMacroUses_helper(QFutureInterface<Usage> &future, static void findMacroUses_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy, const WorkingCopy workingCopy,
const Snapshot snapshot, const Snapshot snapshot,
CppFindReferences *findRefs, CppFindReferences *findRefs,
const Macro macro) const Macro macro)
...@@ -663,7 +664,7 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace ...@@ -663,7 +664,7 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool))); connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
const Snapshot snapshot = m_modelManager->snapshot(); const Snapshot snapshot = m_modelManager->snapshot();
const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy(); const WorkingCopy workingCopy = m_modelManager->workingCopy();
// add the macro definition itself // add the macro definition itself
{ {
......
...@@ -479,7 +479,7 @@ void CppModelManager::replaceSnapshot(const CPlusPlus::Snapshot &newSnapshot) ...@@ -479,7 +479,7 @@ void CppModelManager::replaceSnapshot(const CPlusPlus::Snapshot &newSnapshot)
m_snapshot = newSnapshot; m_snapshot = newSnapshot;
} }
CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList() WorkingCopy CppModelManager::buildWorkingCopyList()
{ {
WorkingCopy workingCopy; WorkingCopy workingCopy;
...@@ -502,7 +502,7 @@ CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList() ...@@ -502,7 +502,7 @@ CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList()
return workingCopy; return workingCopy;
} }
CppModelManager::WorkingCopy CppModelManager::workingCopy() const WorkingCopy CppModelManager::workingCopy() const
{ {
return const_cast<CppModelManager *>(this)->buildWorkingCopyList(); return const_cast<CppModelManager *>(this)->buildWorkingCopyList();
} }
......
...@@ -672,7 +672,7 @@ void CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles() ...@@ -672,7 +672,7 @@ void CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles()
// Check working copy. // Check working copy.
// An AbstractEditorSupport object should have been added for the ui_* file. // An AbstractEditorSupport object should have been added for the ui_* file.
CppModelManagerInterface *mm = CppModelManagerInterface::instance(); CppModelManagerInterface *mm = CppModelManagerInterface::instance();
CppModelManagerInterface::WorkingCopy workingCopy = mm->workingCopy(); WorkingCopy workingCopy = mm->workingCopy();
QCOMPARE(workingCopy.size(), 2); // mm->configurationFileName() and "ui_*.h" QCOMPARE(workingCopy.size(), 2); // mm->configurationFileName() and "ui_*.h"
......
...@@ -58,6 +58,7 @@ class CppCompletionAssistProvider; ...@@ -58,6 +58,7 @@ class CppCompletionAssistProvider;
class CppEditorSupport; class CppEditorSupport;
class CppHighlightingSupport; class CppHighlightingSupport;
class CppIndexingSupport; class CppIndexingSupport;
class WorkingCopy;
class CPPTOOLS_EXPORT ProjectPart class CPPTOOLS_EXPORT ProjectPart
{ {
...@@ -200,41 +201,6 @@ public: ...@@ -200,41 +201,6 @@ public:
QByteArray m_defines; QByteArray m_defines;
}; };
/// The working-copy stores all files that are stored on disk in their current state.
///
/// So, currently the working copy holds:
/// - unsaved content of editors
/// - uic-ed UI files (through \c AbstractEditorSupport)
/// - the preprocessor configuration
///
/// Contents are keyed on filename, and hold the revision in the editor and the editor's
/// contents encoded as UTF-8.
class CPPTOOLS_EXPORT WorkingCopy
{
public:
void insert(const QString &fileName, const QByteArray &source, unsigned revision = 0)
{ _elements.insert(fileName, qMakePair(source, revision)); }
bool contains(const QString &fileName) const
{ return _elements.contains(fileName); }
QByteArray source(const QString &fileName) const
{ return _elements.value(fileName).first; }
QPair<QByteArray, unsigned> get(const QString &fileName) const
{ return _elements.value(fileName); }
QHashIterator<QString, QPair<QByteArray, unsigned> > iterator() const
{ return QHashIterator<QString, QPair<QByteArray, unsigned> >(_elements); }
int size() const
{ return _elements.size(); }
private:
typedef QHash<QString, QPair<QByteArray, unsigned> > Table;
Table _elements;
};
public: public:
static const QString configurationFileName(); static const QString configurationFileName();
static const QString editorConfigurationFileName(); static const QString editorConfigurationFileName();
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include "cppqtstyleindenter.h" #include "cppqtstyleindenter.h"
#include "cppcodeformatter.h" #include "cppcodeformatter.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cppworkingcopy.h"
#include <projectexplorer/editorconfiguration.h> #include <projectexplorer/editorconfiguration.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -77,7 +79,7 @@ public: ...@@ -77,7 +79,7 @@ public:
Snapshot m_snapshot; Snapshot m_snapshot;
CppModelManagerInterface *m_modelManager; CppModelManagerInterface *m_modelManager;
CppModelManagerInterface::WorkingCopy m_workingCopy; WorkingCopy m_workingCopy;
}; };
......
...@@ -46,7 +46,7 @@ SnapshotUpdater::SnapshotUpdater(const QString &fileInEditor) ...@@ -46,7 +46,7 @@ SnapshotUpdater::SnapshotUpdater(const QString &fileInEditor)
{ {
} }
void SnapshotUpdater::update(CppModelManager::WorkingCopy workingCopy) void SnapshotUpdater::update(WorkingCopy workingCopy)
{ {
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
......
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
QString fileInEditor() const QString fileInEditor() const
{ return m_fileInEditor; } { return m_fileInEditor; }
void update(CppModelManagerInterface::WorkingCopy workingCopy); void update(WorkingCopy workingCopy);
void releaseSnapshot(); void releaseSnapshot();
CPlusPlus::Document::Ptr document() const; CPlusPlus::Document::Ptr document() const;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* correctly. * correctly.
* *
* \sa CPlusPlus::Document * \sa CPlusPlus::Document
* \sa CppTools::CppModelManagerInterface::WorkingCopy * \sa CppTools::WorkingCopy
*/ */
using namespace CPlusPlus; using namespace CPlusPlus;
...@@ -69,7 +69,7 @@ inline Message messageNoFileContents(Document::Ptr &document, const QString &fil ...@@ -69,7 +69,7 @@ inline Message messageNoFileContents(Document::Ptr &document, const QString &fil
return Message(Message::Warning, document->fileName(), line, /*column =*/ 0, text); return Message(Message::Warning, document->fileName(), line, /*column =*/ 0, text);
} }
inline const Macro revision(const CppModelManagerInterface::WorkingCopy &workingCopy, inline const Macro revision(const WorkingCopy &workingCopy,
const Macro &macro) const Macro &macro)
{ {
Macro newMacro(macro); Macro newMacro(macro);
...@@ -96,7 +96,7 @@ CppSourceProcessor::~CppSourceProcessor() ...@@ -96,7 +96,7 @@ CppSourceProcessor::~CppSourceProcessor()
void CppSourceProcessor::setRevision(unsigned revision) void CppSourceProcessor::setRevision(unsigned revision)
{ m_revision = revision; } { m_revision = revision; }
void CppSourceProcessor::setWorkingCopy(const CppModelManagerInterface::WorkingCopy &workingCopy) void CppSourceProcessor::setWorkingCopy(const WorkingCopy &workingCopy)
{ m_workingCopy = workingCopy; } { m_workingCopy = workingCopy; }
void CppSourceProcessor::setHeaderPaths(const ProjectPart::HeaderPaths &headerPaths) void CppSourceProcessor::setHeaderPaths(const ProjectPart::HeaderPaths &headerPaths)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define CPPSOURCEPROCESSOR_H #define CPPSOURCEPROCESSOR_H
#include "cppmodelmanagerinterface.h" #include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <cplusplus/PreprocessorEnvironment.h> #include <cplusplus/PreprocessorEnvironment.h>
#include <cplusplus/pp-engine.h> #include <cplusplus/pp-engine.h>
...@@ -39,7 +40,7 @@ public: ...@@ -39,7 +40,7 @@ public:
{ m_dumpFileNameWhileParsing = onoff; }