Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Talk:IDE Debug Helpers: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Suggested fix for qt5.natvis for QList expansion)
 
No edit summary
Line 21: Line 21:


Someone might want to apply this as a patch to the next version of the qt5.natvis file.
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?
[[User:Rakslice|Rakslice]] ([[User talk:Rakslice|talk]]) 01:11, 12 May 2017 (UTC)

Revision as of 01:11, 12 May 2017

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)