From 6c12a416b7b7cd806ea37f8cc65a85ba4dd403b8 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Fri, 18 Dec 2020 13:55:09 +0100 Subject: Adjust to bindable QQuickItem properties This prepares for QQuickItem's properties becoming bindable, changing the type of QQuickItemPrivate::{x, y, width, height}. It adds explicit casts/types where implicit conversion or type deduction would fail after the conversion. Change-Id: I9e25b45d1c7de162c3e72e8ec337b198bfd29c57 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickroundbutton.cpp | 2 +- src/quicktemplates2/qquicksplitview.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quicktemplates2/qquickroundbutton.cpp b/src/quicktemplates2/qquickroundbutton.cpp index 06230673..05eb53b0 100644 --- a/src/quicktemplates2/qquickroundbutton.cpp +++ b/src/quicktemplates2/qquickroundbutton.cpp @@ -76,7 +76,7 @@ void QQuickRoundButtonPrivate::setRadius(qreal newRadius) Q_Q(QQuickRoundButton); const qreal oldRadius = radius; if (newRadius < 0) - radius = qMax(0, qMin(width, height) / 2); + radius = qMax(0, qMin(width, height) / 2); else radius = newRadius; diff --git a/src/quicktemplates2/qquicksplitview.cpp b/src/quicktemplates2/qquicksplitview.cpp index a9c92eaf..bc5e10d2 100644 --- a/src/quicktemplates2/qquicksplitview.cpp +++ b/src/quicktemplates2/qquicksplitview.cpp @@ -338,8 +338,8 @@ void QQuickSplitViewPrivate::layoutResizeSplitItems(qreal &usedWidth, qreal &use if (isBeingResized) { // Don't let the mouse go past either edge of the SplitView. const qreal clampedMousePos = horizontal - ? qBound(qreal(0.0), m_mousePos.x(), width) - : qBound(qreal(0.0), m_mousePos.y(), height); + ? qBound(qreal(0.0), m_mousePos.x(), qreal(width)) + : qBound(qreal(0.0), m_mousePos.y(), qreal(height)); // We also need to ensure that the item's edge doesn't go too far // out and hence give the item more space than is available. -- cgit v1.2.3