Important: Please read the Qt Code of Conduct -

Qtcreator debugging helper for specialized string object breaks on expand

  • I wrote a qtcreator debugger helper for our home brewed string library.

    def qdump__mystring(d, value):
      length = int(value["slen"])
      d.check(0 <= length and length <= 100000000)
      p = value["sdata"]
      d.putCharArrayHelper(p, length, d.createType('wchar_t'), 'utf8')

    Works well,
    This works well

    Until I expand them

    I tried several things but nothing worked.

    The "mystring" declaration in c-code looks something like this,

    struct mystring
        uint slen;
        uchar *sdata;
        // ... 

    As far as I know the strings are utf8. How do I solve this issue.
    I was looking at a way to iterate over the individual characters and knit together a string.

    Thanks for your attention and efforts. Many regards.

  • Lifetime Qt Champion

    Hi @QPrashanth,

    I think it's best to ask this questions on the Qt Creator mailing list. You have higher chances to get an answer there, as the debugging helpers are a very special topic.


Log in to reply