diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-11 01:00:36 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-11 01:00:36 +0200 |
commit | 5d92f1793aa8438ea974cc2232d2aa3b1b2b2472 (patch) | |
tree | dbb78cdbbf7e03f07d616ab76eb0466c74f7767e /tests/auto/corelib/plugin | |
parent | 5ae2cbce2c4d5f319f1ddf1895d0f43f1c6ceafe (diff) | |
parent | 405e297756240b5f14e44b5fbd6a88091d2eddeb (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I1df9adea124326ef7c7802839eb93efc4302b287
Diffstat (limited to 'tests/auto/corelib/plugin')
3 files changed, 26 insertions, 1 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h index 04ce042e24..ac349c2f75 100644 --- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h +++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h @@ -35,7 +35,7 @@ class ThePlugin : public QObject, public PluginInterface { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface" FILE "../empty.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface" FILE "../utf8_data.json") Q_INTERFACES(PluginInterface) public: diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index f852a82ed3..4316ea14ea 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -213,6 +213,14 @@ void tst_QPluginLoader::errorString() { QPluginLoader loader( sys_qualifiedLibraryName("theplugin")); //a plugin + + // Check metadata + const QJsonObject metaData = loader.metaData(); + QCOMPARE(metaData.value("IID").toString(), QStringLiteral("org.qt-project.Qt.autotests.plugininterface")); + const QJsonObject kpluginObject = metaData.value("MetaData").toObject().value("KPlugin").toObject(); + QCOMPARE(kpluginObject.value("Name[mr]").toString(), QString::fromUtf8("चौकट भूमिती")); + + // Load QCOMPARE(loader.load(), true); QCOMPARE(loader.errorString(), unknown); diff --git a/tests/auto/corelib/plugin/qpluginloader/utf8_data.json b/tests/auto/corelib/plugin/qpluginloader/utf8_data.json new file mode 100644 index 0000000000..7763b65178 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/utf8_data.json @@ -0,0 +1,17 @@ +{ + "KPlugin": { + "Name": "WindowGeometry", + "Name[mr]": "चौकट भूमिती", + "Name[pa]": "ਵਿੰਡੋਜੁਮੈਟਰੀ", + "Name[th]": "มิติขนาดของหน้าต่าง", + "Name[uk]": "Розміри вікна", + "Name[zh_CN]": "窗口形状", + "Name[zh_TW]": "視窗位置", + "ServiceTypes": [ + "KCModule" + ] + }, + "X-KDE-ParentComponents": [ + "windowgeometry" + ] +} |