Commit 42a5446b authored by Nikita Baryshnikov's avatar Nikita Baryshnikov Committed by Alessandro Portale

MiniProjectTargetSelector: fix division by zero

Change-Id: I618c92366424e924d13841a36c4393057e8d9aa4
Reviewed-by: default avatarhjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent d2eb24af
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment