Talk:IDE Debug Helpers

From Qt Wiki
Revision as of 01:11, 12 May 2017 by Rakslice (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

For people that have trouble with the QList expansion, please update the current QList part in qt5.natvis with:

   <Type Name="QList<*>">
       <AlternativeType Name="QStringList"></AlternativeType>
       <AlternativeType Name="QQueue<*>"></AlternativeType>
       <DisplayString>{{ size = {d->end - d->begin} }}</DisplayString>
       <Expand>
           <Item Name="[referenced]">d->ref.atomic._q_value</Item>
           <IndexListItems Condition="QTypeInfo<$T1>::isLarge || QTypeInfo<$T1>::isStatic">
               <Size>d->end - d->begin</Size>
               <ValueNode>*reinterpret_cast<$T1*>(reinterpret_cast<Node*>(d->array + d->begin + $i)->v)</ValueNode>
           </IndexListItems>
           <IndexListItems Condition="!(QTypeInfo<$T1>::isLarge || QTypeInfo<$T1>::isStatic)">
               <Size>d->end - d->begin</Size>
           	<ValueNode>*reinterpret_cast<$T1*>(d->array + d->begin + $i)</ValueNode>
           </IndexListItems>
       </Expand>
   </Type>

This fixes some Node* expansion issues when you have a struct that is exactly sizeof(void*) (which somehow end up being in a Node instead of being directly in the QList)

Someone might want to apply this as a patch to the next version of the qt5.natvis file.

--- Can someone who understands what is supposed to go in the autoexp.dat file please fix the formatting of this page? Rakslice (talk) 01:11, 12 May 2017 (UTC)