forked from qt-creator/qt-creator
Merge commit 'origin/1.3'
Conflicts: src/plugins/debugger/debuggermanager.h src/plugins/qmleditor/qmleditorplugin.cpp src/plugins/qt4projectmanager/qt4runconfiguration.cpp
This commit is contained in:
@@ -110,7 +110,6 @@ static void find_helper(QFutureInterface<Usage> &future,
|
||||
Q_ASSERT(symbolId != 0);
|
||||
|
||||
const QString sourceFile = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
|
||||
|
||||
QStringList files(sourceFile);
|
||||
|
||||
if (symbol->isClass() || symbol->isForwardClassDeclaration()) {
|
||||
@@ -126,9 +125,7 @@ static void find_helper(QFutureInterface<Usage> &future,
|
||||
} else {
|
||||
files += snapshot.dependsOn(sourceFile);
|
||||
}
|
||||
|
||||
files.removeDuplicates();
|
||||
|
||||
//qDebug() << "done in:" << tm.elapsed() << "number of files to parse:" << files.size();
|
||||
|
||||
future.setProgressRange(0, files.size());
|
||||
@@ -232,7 +229,6 @@ void CppFindReferences::findAll_helper(Symbol *symbol)
|
||||
const QMap<QString, QString> wl = _modelManager->workingCopy();
|
||||
|
||||
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
|
||||
|
||||
QFuture<Usage> result = QtConcurrent::run(&find_helper, wl, snapshot, symbol);
|
||||
m_watcher.setFuture(result);
|
||||
|
||||
|
||||
@@ -379,8 +379,8 @@ QString CppPreprocessor::tryIncludeFile(QString &fileName, IncludeType type)
|
||||
}
|
||||
}
|
||||
|
||||
foreach (const QString &includePath, m_includePaths) {
|
||||
QString path = includePath;
|
||||
for (int i = m_includePaths.size() - 1; i != -1; --i) {
|
||||
QString path = m_includePaths.at(i);
|
||||
path += QLatin1Char('/');
|
||||
path += fileName;
|
||||
path = QDir::cleanPath(path);
|
||||
@@ -532,7 +532,7 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type,
|
||||
return;
|
||||
|
||||
QString contents = tryIncludeFile(fileName, type);
|
||||
|
||||
fileName = QDir::cleanPath(fileName);
|
||||
if (m_currentDoc) {
|
||||
m_currentDoc->addIncludeFile(fileName, line);
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
#include <QtCore/QtConcurrentRun>
|
||||
@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
// Objects
|
||||
m_modelManager = new CppModelManager(this);
|
||||
Core::VCSManager *vcsManager = core->vcsManager();
|
||||
connect(vcsManager, SIGNAL(repositoryChanged(QString)),
|
||||
m_modelManager, SLOT(updateModifiedSourceFiles()));
|
||||
connect(vcsManager, SIGNAL(filesChanged(QStringList)),
|
||||
m_modelManager, SLOT(updateModifiedSourceFiles()));
|
||||
addAutoReleasedObject(m_modelManager);
|
||||
|
||||
m_completion = new CppCodeCompletion(m_modelManager);
|
||||
|
||||
Reference in New Issue
Block a user