forked from qt-creator/qt-creator
MiniProjectTargetSelector: fix division by zero
Change-Id: I618c92366424e924d13841a36c4393057e8d9aa4 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Alessandro Portale
parent
d2eb24af1d
commit
42a5446b6c
@@ -816,9 +816,9 @@ QVector<int> MiniProjectTargetSelector::listWidgetWidths(int minSize, int maxSiz
|
||||
|
||||
int delta;
|
||||
if (tooSmall)
|
||||
delta = qMin(next - first, widthToDistribute / i);
|
||||
delta = qMin(next - first, widthToDistribute / qMax(i, 1));
|
||||
else
|
||||
delta = qMin(first - next, widthToDistribute / i);
|
||||
delta = qMin(first - next, widthToDistribute / qMax(i, 1));
|
||||
|
||||
if (delta == 0)
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user