diff options
author | Juan Casafranca <juan.casafranca@kdab.com> | 2020-09-25 13:02:24 +0200 |
---|---|---|
committer | Juan José Casafranca <juan.casafranca@kdab.com> | 2020-09-28 09:36:33 +0200 |
commit | 2bb20e346430aad0928d454ecaa4ace23017c196 (patch) | |
tree | ac557ff5b1fd861b2ab06cf09ffb9cd87bafd86b /tests | |
parent | 327da58f9463354dea30c6fac4fdf8da3c3b7d08 (diff) |
Allow to specify a functor to extract data from QTextureImageData
Change-Id: Idd052f6c24665a1accd2cd681c80fe74846e5c39
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/render/qtextureimagedata/tst_qtextureimagedata.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/render/qtextureimagedata/tst_qtextureimagedata.cpp b/tests/auto/render/qtextureimagedata/tst_qtextureimagedata.cpp index c508294df..58e360378 100644 --- a/tests/auto/render/qtextureimagedata/tst_qtextureimagedata.cpp +++ b/tests/auto/render/qtextureimagedata/tst_qtextureimagedata.cpp @@ -74,6 +74,17 @@ private Q_SLOTS: void checkPropertyUpdates() { } + + void checkTextureDataUsesFunctor() { + Qt3DRender::QTextureImageData *tid = new Qt3DRender::QTextureImageData(); + + tid->setData({}, [](int, int, int) { + return QByteArray("a"); + }, false); + + QByteArray data = tid->data(); + QCOMPARE(data.data()[0], 'a'); + } /* protected: |