Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qtcreator debugging helper for specialized string object breaks on expand

Qtcreator debugging helper for specialized string object breaks on expand

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 544 Views
  • 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 Offline
    Q Offline
    QPrashanth
    wrote on last edited by
    #1

    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_1980A 1 Reply Last reply
    0
    • Q QPrashanth

      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_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved