diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-11-03 10:39:00 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-11-11 12:07:42 +0100 |
| commit | 17318c4805d089f10c25f8165dae7d1f908bd311 (patch) | |
| tree | 96eb1f1934ebc9df07b1164e52cf6dc335820fdc /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 9a4f2d23ecec2c7ff19f83cff28df6b97e3fda98 (diff) | |
QQuickDrag: correctly support text and image mime types
If the variant contains a string or image, try to encode the QString or
QImage, respectively, according to the specified mime type. If it's
neither, or if the mime type is not supported by known encoders, then
generate a warning.
To make the code unit-testable, move the QQuickDragAttachedPrivate into
a private header that we can include in a new test case. Verify that data
that matches the mime type results in correctly populated QMimeData, and
that mismatches produce runtime warnings.
[ChangeLog][Qt Quick][Drag] The attaching type Drag supports more mime
types in the mimeData property, which is now of type 'variantlist'
instead of 'stringlist'. Qt Quick Drag validates the type of the data
against supported mime types, and generates warnings in case of a
mismatch. If the type of the data is ArrayBuffer (i.e. a QByteArray),
then the data is accepted without any validation.
Task-number: QTBUG-71922
Change-Id: I82789086fed9c7bc399183e76ffb83b819df440f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions
