Fix potential endless loop in layout
author Peter Penz
()
committer Peter Penz
()
commit 81034de5074071d45bd4da212c80fb3dd5ea4933
tree 8a183541a0da0b822b182a83a2fd20166b13fc54
parent 5a45d5d32128ea525e0a392f96a9e8c1b914c788
Fix potential endless loop in layout

Usecase:
- No scrollbar is shown
- Window size will be decreased so that a scrollbar gets necessary

The decreased window size minus the space required for the scrollbar
results in a relayout of the items. In 99 % of all
cases a decreased window size won't result in showing more items in parallel in
comparison to a larger window size. However in the remaining 1 % this can
happen (e.g. see bug 293318 for a sample). This results in an endless loop as
now no scrollbar is required anymore, the layout changes again, the scrollbar
is required again, ...

BUG: 293318
FIXED-IN: 4.8.1
dolphin/src/kitemviews/kitemlistcontainer.cpp
dolphin/src/kitemviews/kitemlistcontainer.h
dolphin/src/kitemviews/kitemlistview.cpp
dolphin/src/kitemviews/kitemlistview.h