<table><tr><td style="">amhndu edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-ic2c23fv6bxmq7l/">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15625">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">In IdealLayout</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Fixed two causes identified for the regression introduced in D15450:<br />
- In IdealLayout, buttonSpacing not being considered while checking if a<br />
button should be shrinked. Changed this to properly account for spacing.<br />
- minimumSize in Ideal Layout calls doVerticalLayout with a height of zero,<br />
the property is always 0. Re-implemented (also previously commented as buggy)<br />
by accumulating the also newly added `minimumSize` in the IdealToolButton</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">because of buttonSpacing not being considered while</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">along with<br />
setting the size policy to Preferred for correctness.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">checking if the buttons should be shrinked</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- Boilerplate to avoid this crash in the future</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">D15450 causes division by zero</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">if the calculation still missed something</span>,<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">this commit removes the assumption and checks before dividing.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">or possibly due to some exotic theme settings.<br />
</span><br />
<br />
BUG: 39<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">8790</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">9025</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>segfault-fix</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15625">https://phabricator.kde.org/D15625</a></div></div><br /><div><strong>To: </strong>amhndu, KDevelop, kossebau, rjvbb<br /><strong>Cc: </strong>kossebau, rjvbb, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>