D15625: Sublime: Fix crash caused when all tool view items are small

René J.V. Bertin noreply at phabricator.kde.org
Mon Sep 24 13:47:45 BST 2018

rjvbb added a comment.

  Interestingly, I'm getting the same issue on Linux (with the same QtCurve style though a slightly different font selection).
  Only here it's maximumHeight that is concerned, not the width.
  How ad-hoc is the threshold under which an item is considered small, and how much sense does it make to distinguish small vs. not-small when all items have exacty the same size (that includes the single-item case)?
  >   What are the values of rect.width(), buttonSpacing and _items.size() in this calculation?
  >   `const int maximumWidth = (rect.width() - buttonSpacing * (_items.size() - 1)) / _items.size();`
  Ah, that.
    rect.height= 0 buttonSpacing= 1 _items.size()= 2
  so, rect.width() == buttonSpace * (_items.size()-1), something that can happen for more than a few combinations of the variables involved.
  It would be more interesting to know why items (and `rect`) could have 0 width or height, but even that doesn't strike me as illegal in a UI.

  R32 KDevelop


To: amhndu, #kdevelop, kossebau, rjvbb
Cc: kossebau, rjvbb, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180924/d1eb0ed8/attachment-0001.html>

More information about the KDevelop-devel mailing list