Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Qtcreator debugging helper for specialized string object breaks on expand

    Tools
    2
    2
    395
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q
      QPrashanth last edited by

      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')
        d.putType("mystring*")
      

      Works well,
      This works well

      Until I expand them
      expanded

      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.

      aha_1980 1 Reply Last reply Reply Quote 0
      • aha_1980
        aha_1980 Lifetime Qt Champion @QPrashanth last edited by

        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.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post