OSDN Git Service

Fix crash when spliting GLSL editor
authorLeandro Melo <leandro.melo@nokia.com>
Tue, 2 Aug 2011 10:26:00 +0000 (12:26 +0200)
committerLeandro T. C. Melo <leandro.melo@nokia.com>
Tue, 2 Aug 2011 11:07:36 +0000 (13:07 +0200)
commit3bf883997f1cc4e0564795c75b77cac5b451cbb3
tree0e4a7f1c32dfa41696ca9afc3675e418bb30ade3
parentebb238c88580d6841763187810b6af588f785757
Fix crash when spliting GLSL editor

Not a good idea to keep the editor stored since when removing
a split, for example, the editor will go away and the highlighter
is not aware of it anyhow since it actually belongs to the document.

Although it's not necessary for the fix this patch add another
constructor to SyntaxHighlighter which takes the BaseTextDocument.
This is convenient.

Task-number: QTCREATORBUG-5695
Change-Id: Ic91837b7d91ebd3a44c16e2fd589d7f6c5c0c002
Reviewed-on: http://codereview.qt.nokia.com/2508
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/plugins/glsleditor/glsleditor.cpp
src/plugins/glsleditor/glsleditor.h
src/plugins/glsleditor/glslhighlighter.cpp
src/plugins/glsleditor/glslhighlighter.h
src/plugins/texteditor/syntaxhighlighter.cpp
src/plugins/texteditor/syntaxhighlighter.h