diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-03-12 16:49:57 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-03-12 16:49:57 +0100 |
commit | 6433af534dee3ade44511ec3190425c03fb25ec5 (patch) | |
tree | e81017fb81f591aa1b4ef5f65296c4c0763a5b22 /src/plugins/glsleditor | |
parent | 23ec56516e02796fe22c5c84d59a309d90234908 (diff) | |
parent | d108a54aabe1043afe3d2700ffa0b5afb3869292 (diff) |
Merge remote-tracking branch 'origin/3.4'
Conflicts:
qtcreator.pri
Change-Id: Iacd9f2afb843f06d457914a3b842dfc606e3adf3
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glsleditor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index aa14a53fcf..b71b5f5a7a 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -214,13 +214,12 @@ void GlslEditorWidget::updateDocumentNow() const QByteArray preprocessedCode = contents.toLatin1(); // ### use the QtCreator C++ preprocessor. Document::Ptr doc(new Document()); - Engine engine; doc->_engine = new Engine(); Parser parser(doc->_engine, preprocessedCode.constData(), preprocessedCode.size(), variant); TranslationUnitAST *ast = parser.parse(); if (ast != 0 || extraSelections(CodeWarningsSelection).isEmpty()) { Semantic sem; - Scope *globalScope = engine.newNamespace(); + Scope *globalScope = new Namespace(); doc->_globalScope = globalScope; const GlslEditorPlugin::InitFile *file = GlslEditorPlugin::shaderInit(variant); sem.translationUnit(file->ast, globalScope, file->engine); @@ -232,7 +231,7 @@ void GlslEditorWidget::updateDocumentNow() file = GlslEditorPlugin::fragmentShaderInit(variant); sem.translationUnit(file->ast, globalScope, file->engine); } - sem.translationUnit(ast, globalScope, &engine); + sem.translationUnit(ast, globalScope, doc->_engine); CreateRanges createRanges(document(), doc); createRanges(ast); @@ -248,7 +247,7 @@ void GlslEditorWidget::updateDocumentNow() QList<QTextEdit::ExtraSelection> sels; QSet<int> errors; - foreach (const DiagnosticMessage &m, engine.diagnosticMessages()) { + foreach (const DiagnosticMessage &m, doc->_engine->diagnosticMessages()) { if (! m.line()) continue; else if (errors.contains(m.line())) |