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 @@
#include <cpptools/cppdoxygen.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cppworkingcopy.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/convenience.h>
......
......@@ -35,6 +35,8 @@
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <cpptools/cppworkingcopy.h>
#include <QDir>
#include <QFile>
#include <QSet>
......@@ -64,7 +66,7 @@ bool isBlacklisted(const QString &path)
}
} // 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: Reason: the UnsavedFile needs a QByteArray.
......
......@@ -37,7 +37,7 @@
namespace ClangCodeModel {
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, const QString &fileName = QString());
......
......@@ -30,8 +30,10 @@
#include "clangutils.h"
#include "cppcreatemarkers.h"
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cppworkingcopy.h>
#include <cplusplus/CppDocument.h>
#include <utils/hostosinfo.h>
#include <utils/runextensions.h>
......
......@@ -36,6 +36,7 @@
#include <cpptools/cppcodemodelinspectordumper.h>
#include <cpptools/cppmodelmanager.h>
#include <cpptools/cpptoolseditorsupport.h>
#include <cpptools/cppworkingcopy.h>
#include <projectexplorer/project.h>
#include <cplusplus/CppDocument.h>
......@@ -1050,7 +1051,7 @@ class WorkingCopyModel : public QAbstractListModel
public:
WorkingCopyModel(QObject *parent);
void configure(const CppModelManagerInterface::WorkingCopy &workingCopy);
void configure(const WorkingCopy &workingCopy);
QModelIndex indexForFile(const QString &filePath);
enum Columns { RevisionColumn, FilePathColumn, ColumnCount };
......@@ -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();
m_workingCopyList.clear();
......@@ -1431,7 +1432,7 @@ void CppCodeModelInspectorDialog::refresh()
}
// Working Copy
const CppModelManagerInterface::WorkingCopy workingCopy = cmmi->workingCopy();
const WorkingCopy workingCopy = cmmi->workingCopy();
dumper.dumpWorkingCopy(workingCopy);
m_workingCopyModel->configure(workingCopy);
m_workingCopyView->resizeColumns(WorkingCopyModel::ColumnCount);
......
......@@ -53,6 +53,7 @@
#include <cpptools/cpptoolseditorsupport.h>
#include <cpptools/cpptoolsplugin.h>
#include <cpptools/cpptoolsreuse.h>
#include <cpptools/cppworkingcopy.h>
#include <cpptools/symbolfinder.h>
#include <projectexplorer/session.h>
......
......@@ -38,14 +38,15 @@
#include <coreplugin/editormanager/editormanager.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptoolsreuse.h>
#include <extensionsystem/pluginmanager.h>
#include <cpptools/cppworkingcopy.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <texteditor/basetextdocument.h>
#include <utils/algorithm.h>
#include <extensionsystem/pluginmanager.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/TranslationUnit.h>
#include <utils/algorithm.h>
#include <QApplication>
#include <QDebug>
......
......@@ -38,7 +38,7 @@ public:
int dumpFileNameWhileParsing;
int revision;
ProjectPart::HeaderPaths headerPaths;
CppModelManagerInterface::WorkingCopy workingCopy;
WorkingCopy workingCopy;
QStringList sourceFiles;
};
......
......@@ -39,9 +39,6 @@ namespace CppTools {
namespace Internal {
class BuiltinIndexingSupport: public CppIndexingSupport {
public:
typedef CppModelManagerInterface::WorkingCopy WorkingCopy;
public:
BuiltinIndexingSupport();
~BuiltinIndexingSupport();
......
......@@ -29,6 +29,8 @@
#include "cppcodemodelinspectordumper.h"
#include "cppworkingcopy.h"
#include <app/app_version.h>
#include <coreplugin/icore.h>
#include <cpptools/cppprojectfile.h>
......@@ -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";
......
......@@ -73,7 +73,7 @@ public:
void dumpSnapshot(const CPlusPlus::Snapshot &snapshot,
const QString &title,
bool isGlobalSnapshot = false);
void dumpWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy);
void dumpWorkingCopy(const CppTools::WorkingCopy &workingCopy);
void dumpMergedEntities(const ProjectPart::HeaderPaths &mergedHeaderPaths,
const QByteArray &mergedMacros);
......
......@@ -32,6 +32,7 @@
#include "cppcompletionassistprovider.h"
#include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <cplusplus/Icons.h>
#include <cplusplus/TypeOfExpression.h>
......@@ -177,7 +178,7 @@ public:
bool isObjCEnabled,
int position,
TextEditor::AssistReason reason,
const CppModelManagerInterface::WorkingCopy &workingCopy)
const WorkingCopy &workingCopy)
: TextEditor::DefaultAssistInterface(textDocument, position, editor->document()->filePath(),
reason)
, m_editor(editor)
......@@ -212,7 +213,7 @@ private:
TextEditor::BaseTextEditor *m_editor;
mutable bool m_isObjCEnabled;
mutable bool m_gotCppSpecifics;
CppModelManagerInterface::WorkingCopy m_workingCopy;
WorkingCopy m_workingCopy;
mutable CPlusPlus::Snapshot m_snapshot;
mutable ProjectPart::HeaderPaths m_headerPaths;
};
......
......@@ -31,6 +31,7 @@
#include "cpptoolsconstants.h"
#include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
......@@ -54,7 +55,7 @@ using namespace CppTools;
using namespace CPlusPlus;
static QByteArray getSource(const QString &fileName,
const CppModelManagerInterface::WorkingCopy &workingCopy)
const WorkingCopy &workingCopy)
{
if (workingCopy.contains(fileName)) {
return workingCopy.source(fileName);
......@@ -167,14 +168,14 @@ namespace {
class ProcessFile: public std::unary_function<QString, QList<Usage> >
{
const CppModelManagerInterface::WorkingCopy workingCopy;
const WorkingCopy workingCopy;
const Snapshot snapshot;
Document::Ptr symbolDocument;
Symbol *symbol;
QFutureInterface<Usage> *future;
public:
ProcessFile(const CppModelManagerInterface::WorkingCopy &workingCopy,
ProcessFile(const WorkingCopy &workingCopy,
const Snapshot snapshot,
Document::Ptr symbolDocument,
Symbol *symbol,
......@@ -268,7 +269,7 @@ QList<int> CppFindReferences::references(Symbol *symbol, const LookupContext &co
}
static void find_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy,
const WorkingCopy workingCopy,
const LookupContext context,
CppFindReferences *findRefs,
Symbol *symbol)
......@@ -367,7 +368,7 @@ void CppFindReferences::findAll_helper(Core::SearchResult *search, CPlusPlus::Sy
this, SLOT(openEditor(Core::SearchResultItem)));
Core::SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy();
const WorkingCopy workingCopy = m_modelManager->workingCopy();
QFuture<Usage> result;
result = QtConcurrent::run(&find_helper, workingCopy, context, this, symbol);
createWatcher(result, search);
......@@ -531,13 +532,13 @@ namespace {
class FindMacroUsesInFile: public std::unary_function<QString, QList<Usage> >
{
const CppModelManagerInterface::WorkingCopy workingCopy;
const WorkingCopy workingCopy;
const Snapshot snapshot;
const Macro &macro;
QFutureInterface<Usage> *future;
public:
FindMacroUsesInFile(const CppModelManagerInterface::WorkingCopy &workingCopy,
FindMacroUsesInFile(const WorkingCopy &workingCopy,
const Snapshot snapshot,
const Macro &macro,
QFutureInterface<Usage> *future)
......@@ -611,7 +612,7 @@ restart_search:
} // end of anonymous namespace
static void findMacroUses_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy,
const WorkingCopy workingCopy,
const Snapshot snapshot,
CppFindReferences *findRefs,
const Macro macro)
......@@ -663,7 +664,7 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
const Snapshot snapshot = m_modelManager->snapshot();
const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy();
const WorkingCopy workingCopy = m_modelManager->workingCopy();
// add the macro definition itself
{
......
......@@ -479,7 +479,7 @@ void CppModelManager::replaceSnapshot(const CPlusPlus::Snapshot &newSnapshot)
m_snapshot = newSnapshot;
}
CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList()
WorkingCopy CppModelManager::buildWorkingCopyList()
{
WorkingCopy workingCopy;
......@@ -502,7 +502,7 @@ CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList()
return workingCopy;
}
CppModelManager::WorkingCopy CppModelManager::workingCopy() const
WorkingCopy CppModelManager::workingCopy() const
{
return const_cast<CppModelManager *>(this)->buildWorkingCopyList();
}
......
......@@ -672,7 +672,7 @@ void CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles()
// Check working copy.
// An AbstractEditorSupport object should have been added for the ui_* file.
CppModelManagerInterface *mm = CppModelManagerInterface::instance();
CppModelManagerInterface::WorkingCopy workingCopy = mm->workingCopy();
WorkingCopy workingCopy = mm->workingCopy();
QCOMPARE(workingCopy.size(), 2); // mm->configurationFileName() and "ui_*.h"
......
......@@ -58,6 +58,7 @@ class CppCompletionAssistProvider;
class CppEditorSupport;
class CppHighlightingSupport;
class CppIndexingSupport;
class WorkingCopy;
class CPPTOOLS_EXPORT ProjectPart
{
......@@ -200,41 +201,6 @@ public:
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:
static const QString configurationFileName();
static const QString editorConfigurationFileName();
......
......@@ -32,6 +32,8 @@
#include "cppqtstyleindenter.h"
#include "cppcodeformatter.h"
#include "cppmodelmanager.h"
#include "cppworkingcopy.h"
#include <projectexplorer/editorconfiguration.h>
#include <utils/qtcassert.h>
......@@ -77,7 +79,7 @@ public:
Snapshot m_snapshot;
CppModelManagerInterface *m_modelManager;
CppModelManagerInterface::WorkingCopy m_workingCopy;
WorkingCopy m_workingCopy;
};
......
......@@ -46,7 +46,7 @@ SnapshotUpdater::SnapshotUpdater(const QString &fileInEditor)
{
}
void SnapshotUpdater::update(CppModelManager::WorkingCopy workingCopy)
void SnapshotUpdater::update(WorkingCopy workingCopy)
{
QMutexLocker locker(&m_mutex);
......
......@@ -51,7 +51,7 @@ public:
QString fileInEditor() const
{ return m_fileInEditor; }
void update(CppModelManagerInterface::WorkingCopy workingCopy);
void update(WorkingCopy workingCopy);
void releaseSnapshot();
CPlusPlus::Document::Ptr document() const;
......
......@@ -22,7 +22,7 @@
* correctly.
*
* \sa CPlusPlus::Document
* \sa CppTools::CppModelManagerInterface::WorkingCopy
* \sa CppTools::WorkingCopy
*/
using namespace CPlusPlus;
......@@ -69,7 +69,7 @@ inline Message messageNoFileContents(Document::Ptr &document, const QString &fil
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)
{
Macro newMacro(macro);
......@@ -96,7 +96,7 @@ CppSourceProcessor::~CppSourceProcessor()
void CppSourceProcessor::setRevision(unsigned revision)
{ m_revision = revision; }
void CppSourceProcessor::setWorkingCopy(const CppModelManagerInterface::WorkingCopy &workingCopy)
void CppSourceProcessor::setWorkingCopy(const WorkingCopy &workingCopy)
{ m_workingCopy = workingCopy; }
void CppSourceProcessor::setHeaderPaths(const ProjectPart::HeaderPaths &headerPaths)
......
......@@ -2,6 +2,7 @@
#define CPPSOURCEPROCESSOR_H
#include "cppmodelmanagerinterface.h"
#include "cppworkingcopy.h"
#include <cplusplus/PreprocessorEnvironment.h>
#include <cplusplus/pp-engine.h>
......@@ -39,7 +40,7 @@ public:
{ m_dumpFileNameWhileParsing = onoff; }
void setRevision(unsigned revision);
void setWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy);
void setWorkingCopy(const CppTools::WorkingCopy &workingCopy);
void setHeaderPaths(const ProjectPart::HeaderPaths &headerPaths);
void setTodo(const QStringList &files);
......@@ -91,7 +92,7 @@ private:
CPlusPlus::Environment m_env;
CPlusPlus::Preprocessor m_preprocess;
ProjectPart::HeaderPaths m_headerPaths;
CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy;
CppTools::WorkingCopy m_workingCopy;
QSet<QString> m_included;
CPlusPlus::Document::Ptr m_currentDoc;
QSet<QString> m_todo;
......
......@@ -47,6 +47,7 @@ HEADERS += \
cpptoolsplugin.h \
cpptoolsreuse.h \
cpptoolssettings.h \
cppworkingcopy.h \
doxygengenerator.h \
functionutils.h \
includeutils.h \
......@@ -101,6 +102,7 @@ SOURCES += \
cpptoolsplugin.cpp \
cpptoolsreuse.cpp \
cpptoolssettings.cpp \
cppworkingcopy.cpp \
doxygengenerator.cpp \
functionutils.cpp \
includeutils.cpp \
......
......@@ -68,6 +68,7 @@ QtcPlugin {
"cpptoolsplugin.cpp", "cpptoolsplugin.h",
"cpptoolsreuse.cpp", "cpptoolsreuse.h",
"cpptoolssettings.cpp", "cpptoolssettings.h",
"cppworkingcopy.cpp", "cppworkingcopy.h",
"doxygengenerator.cpp", "doxygengenerator.h",
"functionutils.cpp", "functionutils.h",
"includeutils.cpp", "includeutils.h",
......
......@@ -35,6 +35,7 @@
#include "cpplocalsymbols.h"
#include <coreplugin/editormanager/editormanager.h>
#include <cpptools/cppworkingcopy.h>
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
......@@ -282,7 +283,7 @@ void CppEditorSupport::updateDocument()
}
static void parse(QFutureInterface<void> &future, QSharedPointer<SnapshotUpdater> updater,
CppModelManagerInterface::WorkingCopy workingCopy)
WorkingCopy workingCopy)
{
future.setProgressRange(0, 1);
if (future.isCanceled()) {
......
/****************************************************************************
**
** 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 "cppworkingcopy.h"
/*!
\class CppTools::WorkingCopy
\brief The working copy holds among others the unsaved content of editors.
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.
*/
namespace CppTools {
WorkingCopy::WorkingCopy()
{
}
} // namespace CppTools
/****************************************************************************
**
** 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 CPPWORKINGCOPY_H
#define CPPWORKINGCOPY_H
#include "cpptools_global.h"
#include <QHash>
#include <QString>
#include <QPair>
namespace CppTools {
class CPPTOOLS_EXPORT WorkingCopy
{
public:
WorkingCopy();
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;
};
} // namespace CppTools
#endif // CPPWORKINGCOPY_H
......@@ -29,6 +29,8 @@
#include "modelmanagertesthelper.h"
#include "cppworkingcopy.h"
#include <QtTest>
#include <cassert>
......
......@@ -68,6 +68,7 @@
#include <cplusplus/findcdbbreakpoint.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cppworkingcopy.h>
#include <QDir>
#include <QMessageBox>
......@@ -2796,18 +2797,18 @@ class BreakpointCorrectionContext
{
public:
explicit BreakpointCorrectionContext(const CPlusPlus::Snapshot &s,
const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy) :
const CppTools::WorkingCopy &workingCopy) :
m_snapshot(s), m_workingCopy(workingCopy) {}
unsigned fixLineNumber(const QString &fileName, unsigned lineNumber) const;
private:
const CPlusPlus::Snapshot m_snapshot;
CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy;
CppTools::WorkingCopy m_workingCopy;
};
static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName,
const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy,
const CppTools::WorkingCopy &workingCopy,
const CPlusPlus::Snapshot &snapshot)
{
QByteArray src;
......
......@@ -36,6 +36,7 @@
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppworkingcopy.h>
#include <cpptools/insertionpointlocator.h>
#include <cpptools/symbolfinder.h>
#include <cplusplus/Overview.h>
......@@ -498,7 +499,7 @@ static inline QString uiClassName(QString formObjectName)
}
static Document::Ptr getParsedDocument(const QString &fileName,
CppTools::CppModelManagerInterface::WorkingCopy &workingCopy,
CppTools::WorkingCopy &workingCopy,
Snapshot &snapshot)
{
QByteArray src;
......@@ -553,7 +554,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
newDocTable.insert(it.value());
}
} else {
const CppTools::CppModelManagerInterface::WorkingCopy workingCopy =
const CppTools::WorkingCopy workingCopy =
CppTools::CppModelManagerInterface::instance()->workingCopy();
QHashIterator<QString, QPair<QByteArray, unsigned> > it = workingCopy.iterator();
while (it.hasNext()) {
......@@ -631,7 +632,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
}
} else {
// add function declaration to cl
CppTools::CppModelManagerInterface::WorkingCopy workingCopy =
CppTools::WorkingCopy workingCopy =
CppTools::CppModelManagerInterface::instance()->workingCopy();
const QString fileName = doc->fileName();
getParsedDocument(fileName, workingCopy, docTable);
......
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