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:
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QBitArray>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QtDebug>
|
||||
|
||||
/*!
|
||||
@@ -108,7 +109,7 @@ private:
|
||||
|
||||
|
||||
Document::Document(const QString &fileName)
|
||||
: _fileName(fileName),
|
||||
: _fileName(QDir::cleanPath(fileName)),
|
||||
_globalNamespace(0),
|
||||
_revision(0)
|
||||
{
|
||||
@@ -173,7 +174,7 @@ QStringList Document::includedFiles() const
|
||||
|
||||
void Document::addIncludeFile(const QString &fileName, unsigned line)
|
||||
{
|
||||
_includes.append(Include(fileName, line));
|
||||
_includes.append(Include(QDir::cleanPath(fileName), line));
|
||||
}
|
||||
|
||||
void Document::appendMacro(const Macro ¯o)
|
||||
@@ -569,3 +570,8 @@ QStringList Snapshot::dependsOn(const QString &fileName) const
|
||||
|
||||
return deps;
|
||||
}
|
||||
|
||||
Document::Ptr Snapshot::value(const QString &fileName) const
|
||||
{
|
||||
return QMap<QString, Document::Ptr>::value(QDir::cleanPath(fileName));
|
||||
}
|
||||
|
||||
@@ -341,6 +341,7 @@ public:
|
||||
QStringList dependsOn(const QString &fileName) const;
|
||||
|
||||
void insert(Document::Ptr doc);
|
||||
Document::Ptr value(const QString &fileName) const;
|
||||
|
||||
using _Base::insert;
|
||||
|
||||
|
||||
@@ -121,8 +121,7 @@ void FindUsages::reportResult(unsigned tokenIndex)
|
||||
const int len = tk.f.length;
|
||||
|
||||
if (_future) {
|
||||
const QString path = QDir::toNativeSeparators(_doc->fileName());
|
||||
_future->reportResult(Usage(path, line, lineText, col, len));
|
||||
_future->reportResult(Usage(_doc->fileName(), line, lineText, col, len));
|
||||
}
|
||||
|
||||
_references.append(tokenIndex);
|
||||
|
||||
Reference in New Issue
Block a user