Talk:IDE Debug Helpers

From Qt Wiki
Jump to: navigation, search

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>
           <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 Condition="!(QTypeInfo<$T1>::isLarge || QTypeInfo<$T1>::isStatic)">
               <Size>d->end - d->begin</Size>
           	<ValueNode>*reinterpret_cast<$T1*>(d->array + d->begin + $i)</ValueNode>

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.