QPluginLoader: fix failing test comparing the Qt version

We stopped storing the patch release number of Qt in the plugin metadata
in commit 7bd79b3cffbbbece23867c5e111a3dd2ebcad016 (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>
This commit is contained in:
Thiago Macieira 2019-07-02 20:48:40 -03:00
parent 1df2cdda6c
commit 2021b36ebd

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" }));
}