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

Tobias Hunger tobias.hunger at gmail.com
Fri Jan 9 08:17:56 CET 2015


Hi Hugo,

On Jan 9, 2015 1:03 AM, "Hugo Parente Lima" <hugo.pl at gmail.com> wrote:
>
> 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.

Isn't that parser part of your plugin? Why not extend that?

> 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?

There are several plugins outside of the Qt Creator tree.

Best Regards,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150109/946cb828/attachment.html>


More information about the Qt-creator mailing list