diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-03 11:19:14 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-03 18:25:57 +0100 |
commit | 0378332bc1a6cf3592a4bf5f7e73fe10963168ca (patch) | |
tree | 91f41b5bb89a3087ad1cb81f483639e0840cf174 /tests/auto | |
parent | 4cff6e102dc65693d4f535079c72b0f8a63e8ebf (diff) |
rhi: Use versioning in QShaderDescription serialization as well
This is the first time that we add something to QShaderDescription
after migrating to the non-JSON based serialization system. This now
involves checking the "qsb version" when deserializing.
Task-number: QTBUG-82624
Change-Id: I2bd875ef21e461559b878dccc5537cdfa43feaa2
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/rhi/qshader/tst_qshader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/gui/rhi/qshader/tst_qshader.cpp b/tests/auto/gui/rhi/qshader/tst_qshader.cpp index ab7115b74a..378d1e85e7 100644 --- a/tests/auto/gui/rhi/qshader/tst_qshader.cpp +++ b/tests/auto/gui/rhi/qshader/tst_qshader.cpp @@ -368,7 +368,7 @@ void tst_QShader::serializeShaderDesc() QBuffer buf(&data); QDataStream ds(&buf); QVERIFY(buf.open(QIODevice::ReadOnly)); - QShaderDescription desc2 = QShaderDescription::deserialize(&ds); + QShaderDescription desc2 = QShaderDescription::deserialize(&ds, QShaderPrivate::QSB_VERSION); QVERIFY(!desc2.isValid()); } } @@ -400,7 +400,7 @@ void tst_QShader::serializeShaderDesc() QBuffer buf(&data); QDataStream ds(&buf); QVERIFY(buf.open(QIODevice::ReadOnly)); - QShaderDescription desc2 = QShaderDescription::deserialize(&ds); + QShaderDescription desc2 = QShaderDescription::deserialize(&ds, QShaderPrivate::QSB_VERSION); QVERIFY(desc2.isValid()); QCOMPARE(desc, desc2); } |