QtWidgets: remove set-but-unused variables
Found by clang 13: qlayoutengine.cpp:80:9: warning: variable 'cMax' set but not used [-Wunused-but-set-variable] Change-Id: Iea05060bc2c046928536fffd16adf54d1527e657 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
362e56b520
commit
d91b2a4479
@ -77,7 +77,6 @@ void qGeomCalc(QList<QLayoutStruct> &chain, int start, int count, int pos, int s
|
||||
{
|
||||
int cHint = 0;
|
||||
int cMin = 0;
|
||||
int cMax = 0;
|
||||
int sumStretch = 0;
|
||||
int sumSpacing = 0;
|
||||
int expandingCount = 0;
|
||||
@ -93,7 +92,6 @@ void qGeomCalc(QList<QLayoutStruct> &chain, int start, int count, int pos, int s
|
||||
data->done = false;
|
||||
cHint += data->smartSizeHint();
|
||||
cMin += data->minimumSize;
|
||||
cMax += data->maximumSize;
|
||||
sumStretch += data->stretch;
|
||||
if (!data->empty) {
|
||||
/*
|
||||
|
@ -1760,7 +1760,6 @@ void QScrollerPrivate::setContentPositionHelperDragging(const QPointF &deltaPos)
|
||||
qScrollerDebug() << "QScroller::setContentPositionHelperDragging(" << deltaPos << " [pix])";
|
||||
qScrollerDebug() << " --> overshoot:" << overshootPosition << "- old pos:" << oldPos << "- new pos:" << newPos;
|
||||
|
||||
QPointF oldClampedPos = clampToRect(oldPos, contentPosRange);
|
||||
QPointF newClampedPos = clampToRect(newPos, contentPosRange);
|
||||
|
||||
// --- handle overshooting and stop if the coordinate is going back inside the normal area
|
||||
@ -1775,9 +1774,6 @@ void QScrollerPrivate::setContentPositionHelperDragging(const QPointF &deltaPos)
|
||||
bool canOvershootX = !noOvershootX && (alwaysOvershootX || contentPosRange.width());
|
||||
bool canOvershootY = !noOvershootY && (alwaysOvershootY || contentPosRange.height());
|
||||
|
||||
qreal oldOvershootX = (canOvershootX) ? oldPos.x() - oldClampedPos.x() : 0;
|
||||
qreal oldOvershootY = (canOvershootY) ? oldPos.y() - oldClampedPos.y() : 0;
|
||||
|
||||
qreal newOvershootX = (canOvershootX) ? newPos.x() - newClampedPos.x() : 0;
|
||||
qreal newOvershootY = (canOvershootY) ? newPos.y() - newClampedPos.y() : 0;
|
||||
|
||||
@ -1788,8 +1784,6 @@ void QScrollerPrivate::setContentPositionHelperDragging(const QPointF &deltaPos)
|
||||
qScrollerDebug() << " --> canOS:" << canOvershootX << "newOS:" << newOvershootX << "maxOS:" << maxOvershootX;
|
||||
|
||||
if (sp->overshootDragResistanceFactor) {
|
||||
oldOvershootX *= sp->overshootDragResistanceFactor;
|
||||
oldOvershootY *= sp->overshootDragResistanceFactor;
|
||||
newOvershootX *= sp->overshootDragResistanceFactor;
|
||||
newOvershootY *= sp->overshootDragResistanceFactor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user