forked from qt-creator/qt-creator
Misc: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -82,7 +82,7 @@ enum {
|
||||
UPDATE_DOCUMENT_DEFAULT_INTERVAL = 150
|
||||
};
|
||||
|
||||
class CreateRanges: protected GLSL::Visitor
|
||||
class CreateRanges: protected Visitor
|
||||
{
|
||||
QTextDocument *textDocument;
|
||||
Document::Ptr glslDocument;
|
||||
@@ -91,12 +91,12 @@ public:
|
||||
CreateRanges(QTextDocument *textDocument, Document::Ptr glslDocument)
|
||||
: textDocument(textDocument), glslDocument(glslDocument) {}
|
||||
|
||||
void operator()(GLSL::AST *ast) { accept(ast); }
|
||||
void operator()(AST *ast) { accept(ast); }
|
||||
|
||||
protected:
|
||||
using GLSL::Visitor::visit;
|
||||
|
||||
virtual void endVisit(GLSL::CompoundStatementAST *ast)
|
||||
virtual void endVisit(CompoundStatementAST *ast)
|
||||
{
|
||||
if (ast->symbol) {
|
||||
QTextCursor tc(textDocument);
|
||||
@@ -214,7 +214,7 @@ void GlslEditorWidget::updateDocumentNow()
|
||||
|
||||
Document::Ptr doc(new Document());
|
||||
Engine engine;
|
||||
doc->_engine = new GLSL::Engine();
|
||||
doc->_engine = new Engine();
|
||||
Parser parser(doc->_engine, preprocessedCode.constData(), preprocessedCode.size(), variant);
|
||||
TranslationUnitAST *ast = parser.parse();
|
||||
if (ast != 0 || extraSelections(CodeWarningsSelection).isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user