diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-11-28 18:05:18 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-11-30 11:18:56 +0000 |
commit | dae30e962e2db8e4cfb8ecbee75feebdce8a3e7f (patch) | |
tree | 8a9304ba54740a09f9b61c3ff2d48e15b6be5978 /src/plugins | |
parent | a05604a1ad38158b88193f7ba575b4258ef3b75e (diff) |
Fully qualify references
This helps with building an "amalgamation" build of Qbs where all source
files are concatenated. Refereneces to these symbols are otherwise ambiguous.
Change-Id: If8cb43b7822fc02df4957a9b5f6b132eae749d7a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/scanner/cpp/Lexer.cpp | 4 | ||||
-rw-r--r-- | src/plugins/scanner/cpp/cppscanner.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/scanner/cpp/Lexer.cpp b/src/plugins/scanner/cpp/Lexer.cpp index 769c3176a..4e06f93b4 100644 --- a/src/plugins/scanner/cpp/Lexer.cpp +++ b/src/plugins/scanner/cpp/Lexer.cpp @@ -60,7 +60,7 @@ #include "Lexer.h" #include <cctype> -using namespace CPlusPlus; +namespace CPlusPlus { Lexer::Lexer(const char *firstChar, const char *lastChar) : _state(State_Default), @@ -668,4 +668,4 @@ void Lexer::scan_helper(Token *tok) } // switch } - +} diff --git a/src/plugins/scanner/cpp/cppscanner.cpp b/src/plugins/scanner/cpp/cppscanner.cpp index ab8454ac9..a0f91c3a0 100644 --- a/src/plugins/scanner/cpp/cppscanner.cpp +++ b/src/plugins/scanner/cpp/cppscanner.cpp @@ -129,7 +129,8 @@ public: } }; -static void scanCppFile(void *opaq, Lexer &yylex, bool scanForFileTags, bool scanForDependencies) +static void scanCppFile(void *opaq, CPlusPlus::Lexer &yylex, bool scanForFileTags, + bool scanForDependencies) { const QLatin1Literal includeLiteral("include"); const QLatin1Literal importLiteral("import"); @@ -235,7 +236,7 @@ static Opaq *openScanner(const unsigned short *filePath, Opaq::FileType fileType return 0; opaque->fileContent = reinterpret_cast<char *>(vmap); - Lexer lex(opaque->fileContent, opaque->fileContent + mapl); + CPlusPlus::Lexer lex(opaque->fileContent, opaque->fileContent + mapl); scanCppFile(opaque.data(), lex, flags & ScanForFileTagsFlag, flags & ScanForDependenciesFlag); return opaque.take(); } |