summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-10 18:02:56 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-09-14 01:12:18 -0700
commita7fa677fc2db7ec02ab12580b8839d98be6e47bd (patch)
treec2cd6501af25e1c0c263b2e5710933c439a3d77c /tests
parentae36509d5c23f3cfe4229da2c94dc04d20201a1e (diff)
QPlugin/QFactoryLoader: remove Qt 5 plugin remnants
Qt 6.x does not need to be able to read the old Qt 5-based binary JSON metadata. The QT_WARNING_DISABLE_DEPRECATED was needed in 5.15 while we used the then-deprecated functions to decode. Pick-to: 6.2 Change-Id: I2de1b4dfacd443148279fffd16a39ee074da3ef4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index 97ec9664ec..8b221dfc7a 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -137,43 +137,6 @@ void tst_QPlugin::scanInvalidPlugin_data()
QTest::addColumn<bool>("loads");
QTest::addColumn<QString>("errMsg");
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- // Binary JSON metadata
- QByteArray prefix = "QTMETADATA ";
-
- {
- QJsonObject obj;
- obj.insert("IID", "org.qt-project.tst_qplugin");
- obj.insert("className", "tst");
- obj.insert("version", int(QT_VERSION));
-#ifdef QT_NO_DEBUG
- obj.insert("debug", false);
-#else
- obj.insert("debug", true);
-#endif
- obj.insert("MetaData", QJsonObject());
- QTest::newRow("json-control") << (prefix + QJsonDocument(obj).toBinaryData()) << true << "";
- }
-
- QTest::newRow("json-zeroes") << prefix << false << " ";
-
- prefix += "qbjs";
- QTest::newRow("bad-json-version0") << prefix << false << " ";
- QTest::newRow("bad-json-version2") << (prefix + QByteArray("\2\0\0\0", 4)) << false << " ";
-
- // valid qbjs version 1
- prefix += QByteArray("\1\0\0\0");
-
- // too large for the file (100 MB)
- QTest::newRow("bad-json-size-large1") << (prefix + QByteArray("\0\0\x40\x06")) << false << " ";
-
- // too large for binary JSON (512 MB)
- QTest::newRow("bad-json-size-large2") << (prefix + QByteArray("\0\0\0\x20")) << false << " ";
-
- // could overflow
- QTest::newRow("bad-json-size-large3") << (prefix + "\xff\xff\xff\x7f") << false << " ";
-#endif
-
// CBOR metadata
QByteArray cprefix = "QTMETADATA !1234";
cprefix[12] = 0; // current version