forked from qt-creator/qt-creator
CppEditor: Remove WorkingCopy::get(QString) overload
... and fix fallout. Change-Id: I8fe67616f8f327428b1c166ae69ec34c2924ee9f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -87,7 +87,7 @@ void FastPreprocessor::macroAdded(const Macro ¯o)
|
||||
|
||||
static const Macro revision(const Snapshot &s, const Macro &m)
|
||||
{
|
||||
if (Document::Ptr d = s.document(m.fileName())) {
|
||||
if (Document::Ptr d = s.document(m.filePath())) {
|
||||
Macro newMacro(m);
|
||||
newMacro.setFileRevision(d->revision());
|
||||
return newMacro;
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include <cplusplus/CPlusPlusForwardDeclarations.h>
|
||||
|
||||
#include <utils/filepath.h>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
#include <QString>
|
||||
@@ -69,6 +71,9 @@ public:
|
||||
const QString &fileName() const
|
||||
{ return _fileName; }
|
||||
|
||||
Utils::FilePath filePath() const
|
||||
{ return Utils::FilePath::fromString(_fileName); }
|
||||
|
||||
void setFileName(const QString &fileName)
|
||||
{ _fileName = fileName; }
|
||||
|
||||
|
||||
@@ -2014,7 +2014,7 @@ void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk)
|
||||
|
||||
// the macro is a feature constraint(e.g. QT_NO_XXX)
|
||||
if (checkUndefined && macroName.startsWith("QT_NO_")) {
|
||||
if (macro->fileName() == configurationFileName().pathView()) {
|
||||
if (macro->filePath() == configurationFileName()) {
|
||||
// and it' defined in a pro file (e.g. DEFINES += QT_NO_QOBJECT)
|
||||
|
||||
value = false; // take the branch
|
||||
|
||||
Reference in New Issue
Block a user