forked from qt-creator/qt-creator
C++: Record also unresolved paths for includes
Change-Id: Id107b6c1f34f594c5a01502c156963c964235ed7 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
35a790fb63
commit
e3bc84c414
@@ -33,6 +33,7 @@
|
||||
#include "Macro.h"
|
||||
|
||||
#include <cplusplus/CPlusPlusForwardDeclarations.h>
|
||||
#include <cplusplus/PreprocessorClient.h>
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QDateTime>
|
||||
@@ -75,9 +76,6 @@ public:
|
||||
|
||||
QString fileName() const;
|
||||
|
||||
QStringList includedFiles() const;
|
||||
void addIncludeFile(const QString &fileName, unsigned line);
|
||||
|
||||
void appendMacro(const Macro ¯o);
|
||||
void addMacroUse(const Macro ¯o, unsigned offset, unsigned length,
|
||||
unsigned beginLine,
|
||||
@@ -233,22 +231,31 @@ public:
|
||||
};
|
||||
|
||||
class Include {
|
||||
QString _fileName;
|
||||
QString _resolvedFileName;
|
||||
QString _unresolvedFileName;
|
||||
unsigned _line;
|
||||
Client::IncludeType _type;
|
||||
|
||||
public:
|
||||
Include(const QString &fileName, unsigned line)
|
||||
: _fileName(fileName), _line(line)
|
||||
Include(const QString &unresolvedFileName, const QString &resolvedFileName, unsigned line,
|
||||
Client::IncludeType type)
|
||||
: _resolvedFileName(resolvedFileName)
|
||||
, _unresolvedFileName(unresolvedFileName)
|
||||
, _line(line)
|
||||
, _type(type)
|
||||
{ }
|
||||
|
||||
QString fileName() const
|
||||
{ return _fileName; }
|
||||
QString resolvedFileName() const
|
||||
{ return _resolvedFileName; }
|
||||
|
||||
QString unresolvedFileName() const
|
||||
{ return _unresolvedFileName; }
|
||||
|
||||
unsigned line() const
|
||||
{ return _line; }
|
||||
|
||||
bool resolved() const
|
||||
{ return QFileInfo(_fileName).isAbsolute(); }
|
||||
Client::IncludeType type() const
|
||||
{ return _type; }
|
||||
};
|
||||
|
||||
class MacroUse: public Block {
|
||||
@@ -302,6 +309,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
QStringList includedFiles() const;
|
||||
void addIncludeFile(const Include &include);
|
||||
|
||||
QList<Include> includes() const
|
||||
{ return _includes; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user