diff options
-rw-r--r-- | mkspecs/features/sis_targets.prf | 6 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro | 1 | ||||
-rw-r--r-- | src/imports/folderlistmodel/folderlistmodel.pro | 1 | ||||
-rw-r--r-- | src/imports/gestures/gestures.pro | 1 | ||||
-rw-r--r-- | src/imports/particles/particles.pro | 1 | ||||
-rw-r--r-- | src/multimedia/video/qvideoframe.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qvideoframe/tst_qvideoframe.cpp | 128 |
7 files changed, 139 insertions, 0 deletions
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf index 37b758b..4207e0b 100644 --- a/mkspecs/features/sis_targets.prf +++ b/mkspecs/features/sis_targets.prf @@ -170,6 +170,12 @@ equals(GENERATE_SIS_TARGETS, true) { sis_target.commands = sis_target.target = sis QMAKE_EXTRA_TARGETS += sis_target + + symbian-abld { + # Create dummy store_build target to avoid errors from .mk callbacks during build + store_build_target.target = store_build + QMAKE_EXTRA_TARGETS += store_build_target + } } QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro b/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro index 122d90a..1371e57 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro +++ b/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro @@ -64,6 +64,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x20021321 load(data_caging_paths) include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index dced319..49a6baa 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -14,6 +14,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x20021320 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlfolderlistmodelplugin.dll qmldir diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro index d6dc758..265bbca 100644 --- a/src/imports/gestures/gestures.pro +++ b/src/imports/gestures/gestures.pro @@ -14,6 +14,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x2002131F include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlgesturesplugin.dll qmldir diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro index 95ec633..91c1b9f 100644 --- a/src/imports/particles/particles.pro +++ b/src/imports/particles/particles.pro @@ -18,6 +18,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x2002131E include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlparticlesplugin.dll qmldir diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp index 2d66d9e..cd38f5e 100644 --- a/src/multimedia/video/qvideoframe.cpp +++ b/src/multimedia/video/qvideoframe.cpp @@ -665,6 +665,7 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormatFromImageFormat(QImage::Format case QImage::Format_RGB16: return Format_RGB565; case QImage::Format_ARGB8565_Premultiplied: + return Format_ARGB8565_Premultiplied; case QImage::Format_RGB666: case QImage::Format_ARGB6666_Premultiplied: return Format_Invalid; diff --git a/tests/auto/qvideoframe/tst_qvideoframe.cpp b/tests/auto/qvideoframe/tst_qvideoframe.cpp index 944bb59..3176af0 100644 --- a/tests/auto/qvideoframe/tst_qvideoframe.cpp +++ b/tests/auto/qvideoframe/tst_qvideoframe.cpp @@ -79,6 +79,8 @@ private slots: void mapImage_data(); void mapImage(); void imageDetach(); + void formatConversion_data(); + void formatConversion(); }; Q_DECLARE_METATYPE(QImage::Format) @@ -658,6 +660,132 @@ void tst_QVideoFrame::imageDetach() QCOMPARE(image.pixel(4, 4), red); } +void tst_QVideoFrame::formatConversion_data() +{ + QTest::addColumn<QImage::Format>("imageFormat"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + + QTest::newRow("QImage::Format_RGB32 | QVideoFrame::Format_RGB32") + << QImage::Format_RGB32 + << QVideoFrame::Format_RGB32; + QTest::newRow("QImage::Format_ARGB32 | QVideoFrame::Format_ARGB32") + << QImage::Format_ARGB32 + << QVideoFrame::Format_ARGB32; + QTest::newRow("QImage::Format_ARGB32_Premultiplied | QVideoFrame::Format_ARGB32_Premultiplied") + << QImage::Format_ARGB32_Premultiplied + << QVideoFrame::Format_ARGB32_Premultiplied; + QTest::newRow("QImage::Format_RGB16 | QVideoFrame::Format_RGB565") + << QImage::Format_RGB16 + << QVideoFrame::Format_RGB565; + QTest::newRow("QImage::Format_ARGB8565_Premultiplied | QVideoFrame::Format_ARGB8565_Premultiplied") + << QImage::Format_ARGB8565_Premultiplied + << QVideoFrame::Format_ARGB8565_Premultiplied; + QTest::newRow("QImage::Format_RGB555 | QVideoFrame::Format_RGB555") + << QImage::Format_RGB555 + << QVideoFrame::Format_RGB555; + QTest::newRow("QImage::Format_RGB888 | QVideoFrame::Format_RGB24") + << QImage::Format_RGB888 + << QVideoFrame::Format_RGB24; + + QTest::newRow("QImage::Format_MonoLSB") + << QImage::Format_MonoLSB + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_Indexed8") + << QImage::Format_Indexed8 + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_ARGB6666_Premultiplied") + << QImage::Format_ARGB6666_Premultiplied + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_ARGB8555_Premultiplied") + << QImage::Format_ARGB8555_Premultiplied + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_RGB666") + << QImage::Format_RGB666 + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_RGB444") + << QImage::Format_RGB444 + << QVideoFrame::Format_Invalid; + QTest::newRow("QImage::Format_ARGB4444_Premultiplied") + << QImage::Format_ARGB4444_Premultiplied + << QVideoFrame::Format_Invalid; + + QTest::newRow("QVideoFrame::Format_BGRA32") + << QImage::Format_Invalid + << QVideoFrame::Format_BGRA32; + QTest::newRow("QVideoFrame::Format_BGRA32_Premultiplied") + << QImage::Format_Invalid + << QVideoFrame::Format_BGRA32_Premultiplied; + QTest::newRow("QVideoFrame::Format_BGR32") + << QImage::Format_Invalid + << QVideoFrame::Format_BGR32; + QTest::newRow("QVideoFrame::Format_BGR24") + << QImage::Format_Invalid + << QVideoFrame::Format_BGR24; + QTest::newRow("QVideoFrame::Format_BGR565") + << QImage::Format_Invalid + << QVideoFrame::Format_BGR565; + QTest::newRow("QVideoFrame::Format_BGR555") + << QImage::Format_Invalid + << QVideoFrame::Format_BGR555; + QTest::newRow("QVideoFrame::Format_BGRA5658_Premultiplied") + << QImage::Format_Invalid + << QVideoFrame::Format_BGRA5658_Premultiplied; + QTest::newRow("QVideoFrame::Format_AYUV444") + << QImage::Format_Invalid + << QVideoFrame::Format_AYUV444; + QTest::newRow("QVideoFrame::Format_AYUV444_Premultiplied") + << QImage::Format_Invalid + << QVideoFrame::Format_AYUV444_Premultiplied; + QTest::newRow("QVideoFrame::Format_YUV444") + << QImage::Format_Invalid + << QVideoFrame::Format_YUV420P; + QTest::newRow("QVideoFrame::Format_YV12") + << QImage::Format_Invalid + << QVideoFrame::Format_YV12; + QTest::newRow("QVideoFrame::Format_UYVY") + << QImage::Format_Invalid + << QVideoFrame::Format_UYVY; + QTest::newRow("QVideoFrame::Format_YUYV") + << QImage::Format_Invalid + << QVideoFrame::Format_YUYV; + QTest::newRow("QVideoFrame::Format_NV12") + << QImage::Format_Invalid + << QVideoFrame::Format_NV12; + QTest::newRow("QVideoFrame::Format_NV21") + << QImage::Format_Invalid + << QVideoFrame::Format_NV21; + QTest::newRow("QVideoFrame::Format_IMC1") + << QImage::Format_Invalid + << QVideoFrame::Format_IMC1; + QTest::newRow("QVideoFrame::Format_IMC2") + << QImage::Format_Invalid + << QVideoFrame::Format_IMC2; + QTest::newRow("QVideoFrame::Format_IMC3") + << QImage::Format_Invalid + << QVideoFrame::Format_IMC3; + QTest::newRow("QVideoFrame::Format_IMC4") + << QImage::Format_Invalid + << QVideoFrame::Format_IMC4; + QTest::newRow("QVideoFrame::Format_Y8") + << QImage::Format_Invalid + << QVideoFrame::Format_Y8; + QTest::newRow("QVideoFrame::Format_Y16") + << QImage::Format_Invalid + << QVideoFrame::Format_Y16; +} + +void tst_QVideoFrame::formatConversion() +{ + QFETCH(QImage::Format, imageFormat); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + + QCOMPARE(QVideoFrame::pixelFormatFromImageFormat(imageFormat) == pixelFormat, + imageFormat != QImage::Format_Invalid); + + QCOMPARE(QVideoFrame::imageFormatFromPixelFormat(pixelFormat) == imageFormat, + pixelFormat != QVideoFrame::Format_Invalid); +} + QTEST_MAIN(tst_QVideoFrame) #include "tst_qvideoframe.moc" |