[Solved] Visual Studio debug helpers - Qt5 and QString



  • I cannot inspect QString since I'm using Qt5. I'm using Visual Studio 2008.

    I tried this approach: "Wiki":http://qt-project.org/wiki/IDE-debug-helpers, but I still cannot see the text of the QString.

    !http://dl.dropbox.com/u/2346027/qstring.PNG(QString)!

    In the autoexp.dat I commented the old QString and QByteArray definitions and inserted the new ones instead:

    @
    [Visualizer]
    ....
    QStringData{
    preview ([(unsigned short*)$e.d + 2 + $e.offset,su])
    stringview ([(unsigned short*)$e.d + 2 + $e.offset,sub])
    }
    QString{
    preview ([$e.d])
    }

    ;QString|*::QString{
    ; preview ([$e.d->data,su])
    ; stringview ([$e.d->data,sub])
    ; children
    ; (
    ; #(
    ; d: $c.d,
    ; [size]: $c.d->size,
    ; [referenced]: $c.d->ref._q_value
    ; )
    ; )
    ;}

    QByteArrayData{
    preview ([(unsigned char*)$e.d + 4 + $e.offset,s])
    stringview ([(unsigned char*)$e.d + 4 + $e.offset,sb])
    }

    QByteArray{
    preview ([$e.d])
    }

    ;QByteArray|*::QByteArray{
    ; preview ([$e.d->data,s])
    ; stringview ([$e.d->data,sb])
    ; children
    ; (
    ; #(
    ; d: $c.d,
    ; [size]: $c.d->size,
    ; [referenced]: $c.d->ref._q_value
    ; )
    ; )
    ;}
    ...
    @

    Does this also need to be changed? Or what else am I doing wrong?

    @
    [AutoExpand]
    ...
    QByteArray=<d->data,s> size=<d->size,u>
    ...
    @

    Thank you!



  • Maybe someone can move this to the Tools forum?



  • How about if you try with these:

    @
    QString|::QString{
    preview ([(unsigned short
    )$e.d + $e.d->offset/2,su])
    stringview ([(unsigned short*)$e.d + $e.d->offset/2,sub])
    }

    QByteArray|::QByteArray{
    preview ([(char
    )$e.d + $e.d->offset,s])
    stringview ([(char*)$e.d + $e.d->offset,sb])
    }
    @



  • Thank you, this is working!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.