forked from qt-creator/qt-creator
ProjectExplorer: Fix test crash
actionBar can be smaller than statusBar during auto-testing, which results in a negative value being used in qBound(), which triggers an assert if min is bigger than max. Change-Id: I40044cc1d6ded3c7b5e55a9bf93f88a52341237f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
committed by
Christian Kandeler
parent
d0e24654f6
commit
7d573cfa0b
@@ -895,7 +895,7 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
|
|||||||
// Height to be aligned with side bar button
|
// Height to be aligned with side bar button
|
||||||
int alignedWithActionHeight = 210;
|
int alignedWithActionHeight = 210;
|
||||||
if (actionBar->isVisible())
|
if (actionBar->isVisible())
|
||||||
alignedWithActionHeight = actionBar->height() - statusBar->height();
|
alignedWithActionHeight = qMax(0, actionBar->height() - statusBar->height());
|
||||||
int bottomMargin = 9;
|
int bottomMargin = 9;
|
||||||
int heightWithoutKitArea = 0;
|
int heightWithoutKitArea = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user