diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-28 01:00:34 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-28 01:00:36 +0100 |
commit | ca8ce6b199e092f81e590d2e2bc21496cf601a15 (patch) | |
tree | c57af35bc69492f931a06a67643052c8aeb100a0 /src/quick | |
parent | 0b2c04215dcdb0f209c46abe24c63deaaffc471c (diff) | |
parent | d94bb1f6795302ef6eec795dd3ad92d60bd2aa4d (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: If7b3f7902eb18d586d8b721e77f4dfedc87cfb9a
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 5 | ||||
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 3 | ||||
-rw-r--r-- | src/quick/items/qquickpincharea.cpp | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 54cda72a36..14fa07099f 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -986,10 +986,11 @@ static QV4::ReturnedValue qt_create_image_data(qreal w, qreal h, QV4::ExecutionE pixelData->setPrototypeOf(p); if (image.isNull()) { - *pixelData->d()->image = QImage(w, h, QImage::Format_ARGB32); + *pixelData->d()->image = QImage(qRound(w), qRound(h), QImage::Format_ARGB32); pixelData->d()->image->fill(0x00000000); } else { - Q_ASSERT(image.width()== qRound(w * image.devicePixelRatioF()) && image.height() == qRound(h * image.devicePixelRatioF())); + // After qtbase 88e56d0932a3615231adf40d5ae033e742d72c33, the image size can be off by one. + Q_ASSERT(qAbs(image.width() - qRound(w * image.devicePixelRatioF())) <= 1 && qAbs(image.height() - qRound(h * image.devicePixelRatioF())) <= 1); *pixelData->d()->image = image.format() == QImage::Format_ARGB32 ? image : image.convertToFormat(QImage::Format_ARGB32); } diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index c7f641cf1f..c91a5ef92b 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -1897,6 +1897,9 @@ void QQuickFlickable::cancelFlick() void QQuickFlickablePrivate::data_append(QQmlListProperty<QObject> *prop, QObject *o) { + if (!prop || !prop->data) + return; + if (QQuickItem *i = qmlobject_cast<QQuickItem *>(o)) { i->setParentItem(static_cast<QQuickFlickablePrivate*>(prop->data)->contentItem); } else if (QQuickPointerHandler *pointerHandler = qmlobject_cast<QQuickPointerHandler *>(o)) { diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp index f963bdf74f..0692a1da42 100644 --- a/src/quick/items/qquickpincharea.cpp +++ b/src/quick/items/qquickpincharea.cpp @@ -194,7 +194,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate() */ /*! - \qmlsignal QtQuick::PinchArea::pinchStarted() + \qmlsignal QtQuick::PinchArea::pinchStarted(PinchEvent pinch) This signal is emitted when the pinch area detects that a pinch gesture has started: two touch points (fingers) have been detected, and they have moved @@ -213,7 +213,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate() */ /*! - \qmlsignal QtQuick::PinchArea::pinchUpdated() + \qmlsignal QtQuick::PinchArea::pinchUpdated(PinchEvent pinch) This signal is emitted when the pinch area detects that a pinch gesture has changed. @@ -225,7 +225,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate() */ /*! - \qmlsignal QtQuick::PinchArea::pinchFinished() + \qmlsignal QtQuick::PinchArea::pinchFinished(PinchEvent pinch) This signal is emitted when the pinch area detects that a pinch gesture has finished. @@ -235,7 +235,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate() */ /*! - \qmlsignal QtQuick::PinchArea::smartZoom() + \qmlsignal QtQuick::PinchArea::smartZoom(PinchEvent pinch) \since 5.5 This signal is emitted when the pinch area detects the smart zoom gesture. |