summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-04-11 01:00:13 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-04-11 14:59:13 +0200
commit58a42898006f221807a08557f588a2d973a7ada2 (patch)
tree62d92617eae5df5aae666ea0902159498b285b24 /src/widgets
parent033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b (diff)
parent1ec350e35fcea87c527b36cf429b595731059240 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp17
3 files changed, 15 insertions, 8 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 2ecb2c1aef..3a40452442 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -5915,10 +5915,6 @@ void QGraphicsScenePrivate::updateTouchPointsForItem(QGraphicsItem *item, QTouch
item->d_ptr->genericMapFromSceneTransform(static_cast<const QWidget *>(touchEvent->target()));
for (auto &touchPoint : touchEvent->_touchPoints) {
- // Deprecated TouchPoint::setRect clobbers ellipseDiameters, restore
- const QSizeF ellipseDiameters = touchPoint.ellipseDiameters();
- touchPoint.setRect(mapFromScene.map(touchPoint.sceneRect()).boundingRect());
- touchPoint.setEllipseDiameters(ellipseDiameters);
touchPoint.setPos(mapFromScene.map(touchPoint.scenePos()));
touchPoint.setStartPos(mapFromScene.map(touchPoint.startScenePos()));
touchPoint.setLastPos(mapFromScene.map(touchPoint.lastScenePos()));
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 029be25620..c5577e2772 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3958,7 +3958,7 @@ bool QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven
QTouchEvent::TouchPoint &touchPoint = touchEvent->_touchPoints[i];
// preserve the sub-pixel resolution
- const QPointF screenPos = touchPoint.screenRect().center();
+ const QPointF screenPos = touchPoint.screenPos();
const QPointF delta = screenPos - screenPos.toPoint();
touchPoint.d->pos = widget->mapFromGlobal(screenPos.toPoint()) + delta;
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index a854ce2cb8..fd82384c03 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -385,6 +385,16 @@ int QComboBoxPrivate::computeWidthHint() const
return tmp.width();
}
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+static constexpr QComboBox::SizeAdjustPolicy deprecatedAdjustToMinimumContentsLength()
+{
+ return QComboBox::AdjustToMinimumContentsLength;
+}
+QT_WARNING_POP
+#endif
+
QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
{
Q_Q(const QComboBox);
@@ -412,10 +422,11 @@ QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
}
}
break;
- case QComboBox::AdjustToMinimumContentsLength:
+ case deprecatedAdjustToMinimumContentsLength():
for (int i = 0; i < count && !hasIcon; ++i)
hasIcon = !q->itemIcon(i).isNull();
- default:
+ break;
+ case QComboBox::AdjustToMinimumContentsLengthWithIcon:
;
}
} else {
@@ -1742,7 +1753,7 @@ void QComboBox::setMinimumContentsLength(int characters)
d->minimumContentsLength = characters;
if (d->sizeAdjustPolicy == AdjustToContents
- || d->sizeAdjustPolicy == AdjustToMinimumContentsLength
+ || d->sizeAdjustPolicy == deprecatedAdjustToMinimumContentsLength()
|| d->sizeAdjustPolicy == AdjustToMinimumContentsLengthWithIcon) {
d->sizeHint = QSize();
d->adjustComboBoxSize();