diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-02-03 23:56:02 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-02-06 12:20:28 +0000 |
commit | 74ed591db3369b925eb3319511beadab9a61f25a (patch) | |
tree | 73f34724dd2d25bfee332b38e624e0f2831cbfa9 /src/plugins/glsleditor | |
parent | 2f1509aa58acdf8f4482a4b5acba19afcd758677 (diff) | |
download | qt-creator-74ed591db3369b925eb3319511beadab9a61f25a.tar.gz |
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>
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glslcompletionassist.cpp | 2 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditor.cpp | 8 | ||||
-rw-r--r-- | src/plugins/glsleditor/glslhighlighter.cpp | 26 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/glsleditor/glslcompletionassist.cpp b/src/plugins/glsleditor/glslcompletionassist.cpp index 9d9d6a8516..e8aef98ab4 100644 --- a/src/plugins/glsleditor/glslcompletionassist.cpp +++ b/src/plugins/glsleditor/glslcompletionassist.cpp @@ -268,7 +268,7 @@ IAssistProposal *GlslCompletionAssistProcessor::perform(const AssistInterface *i QList<GLSL::Symbol *> members; QStringList specialMembers; - QList<TextEditor::AssistProposalItem *> m_completions; + QList<AssistProposalItem *> m_completions; bool functionCall = (ch == QLatin1Char('(') && pos == m_interface->position() - 1); diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index e624bd8219..5c4fd9274b 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -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()) { diff --git a/src/plugins/glsleditor/glslhighlighter.cpp b/src/plugins/glsleditor/glslhighlighter.cpp index 113b47a9d8..cc8d5a6ec2 100644 --- a/src/plugins/glsleditor/glslhighlighter.cpp +++ b/src/plugins/glsleditor/glslhighlighter.cpp @@ -43,20 +43,20 @@ namespace Internal { GlslHighlighter::GlslHighlighter() { - static QVector<TextEditor::TextStyle> categories; + static QVector<TextStyle> categories; if (categories.isEmpty()) { - categories << TextEditor::C_NUMBER - << TextEditor::C_STRING - << TextEditor::C_TYPE - << TextEditor::C_KEYWORD - << TextEditor::C_OPERATOR - << TextEditor::C_PREPROCESSOR - << TextEditor::C_LABEL - << TextEditor::C_COMMENT - << TextEditor::C_DOXYGEN_COMMENT - << TextEditor::C_DOXYGEN_TAG - << TextEditor::C_VISUAL_WHITESPACE - << TextEditor::C_REMOVED_LINE; + categories << C_NUMBER + << C_STRING + << C_TYPE + << C_KEYWORD + << C_OPERATOR + << C_PREPROCESSOR + << C_LABEL + << C_COMMENT + << C_DOXYGEN_COMMENT + << C_DOXYGEN_TAG + << C_VISUAL_WHITESPACE + << C_REMOVED_LINE; } setTextFormatCategories(categories); } |