Originally Posted by
abey
Actually, never mind my question above. It's actually working!
What wasn't working is for references (QString&). Is there any way this could be done?
Sure. The displays are all simple functions that take a pointer as an argument and then return a char* of the summary string. If you double click on the summary, you'll see something like:
// Summary String for QString *
{(char *)printQString($VAR, (int) $ID)}:s
// Summary String for QString *
{(char *)printQString($VAR, (int) $ID)}:s
To copy to clipboard, switch view to plain text mode
$VAR is the raw variable that's appearing (in this case a pointer) and $ID is some generated instance id. The rest is basically just a function call and I cast the output for good measure.
So, for a QString &, you could double click the Summary string and put something like:
// Summary String for QString &
{(char *)printQString(&$VAR, (int) $ID)}:s
// Summary String for QString &
{(char *)printQString(&$VAR, (int) $ID)}:s
To copy to clipboard, switch view to plain text mode
I'm not 100% on this one, I'll test it the next time I run across a reference, but you get the idea. When you make changes like this, it saves them in ~/Library/Application\ Support/Developer/Shared/Xcode/CustomDataViews/CustomDataViews.plist
If you find a matching print method, you can add it to the bundle itself too and share. The bundle has a CustomDataViews.plist in it's bundle package that's referred to.
Bookmarks