[Qt-creator] need of QTextBlock::setUserData or somethingelse

Hugo Parente Lima hugo.pl at gmail.com
Fri Jan 9 01:02:04 CET 2015


Hi,

I'm writing (and using on my daily job) a QtCreator plugin[1] for the Ruby
language, the syntax highlighting doesn't support hereDoc style string,
hereDoc strings are those perl style string like:

foo = <<abc
I'm a multiline string
Hello
abc

The problem is: the parser need to store more than an integer in the state,
because the string "abc" can be any string, so when parsing the line with
just "abc" it needs to know that it's inside a hereDoc string (the block
state does that) and it needs to know what's the string used to stop the
hereDoc string.

So my question is: It's safe to use QTextBlock::setUserData
or TextEditor::SyntaxHighlighter::setCurrentBlockUserData to store such
data or it was used internally or by other QtCreator plugins?

grep shows any use of "setCurrentBlockUserData" but "setUserData".

Thanks.

[1] http://hugopl.github.io/RubyCreator/

-- 
Hugo Parente Lima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150108/6810c59d/attachment.html>


More information about the Qt-creator mailing list