QPluginLoader: fix failing test comparing the Qt version

We stopped storing the patch release number of Qt in the plugin metadata
in commit 7bd79b3cff (5.13), to make it
simpler to parse the validity of plugins before decoding the CBOR
payload.

Fixes: QTBUG-76855
Change-Id: I6aed4df6a12e43c3ac8efffd15adbbf83e928866
Reviewed-by: Liang Qi <liang.qi@qt.io>
bb10
Thiago Macieira 2019-07-02 20:48:40 -03:00
parent 1df2cdda6c
commit 2021b36ebd
1 changed files with 2 additions and 1 deletions

View File

@ -549,7 +549,8 @@ void tst_QPluginLoader::staticPlugins()
}
QVERIFY(found);
QCOMPARE(metaData.value("version").toInt(), QT_VERSION);
// We don't store the patch release version anymore (since 5.13)
QCOMPARE(metaData.value("version").toInt() / 0x100, QT_VERSION / 0x100);
QCOMPARE(metaData.value("IID").toString(), "SomeIID");
QCOMPARE(metaData.value("ExtraMetaData"), QJsonArray({ "StaticPlugin", "foo" }));
}