diff options
author | Dominik Holland <dominik.holland@qt.io> | 2021-03-19 17:11:09 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2021-03-26 11:03:03 +0100 |
commit | 7d38268b4a06d0d598b14de7bc4d9fcc58988614 (patch) | |
tree | 4712e96eead2e28c818d0adfc2a687630f5fcfce | |
parent | 5e554226d00839011f6d131f75955d939f01a0b4 (diff) |
Fix failing autotests
Fix the CMakeLists.txt of servicemanagertest to also link the static_plugins.
Fix the qiviqmlconversion_helper to not convert strings to char arrays.
Adapt servicemanager autotest to ignore some features which doesn't work
yet with cmake.
Change-Id: I5b0ff928003858a304a8dc97978a33abf685883d
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r-- | src/ivicore/qiviqmlconversion_helper.cpp | 2 | ||||
-rw-r--r-- | tests/auto/core/servicemanagertest/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/core/servicemanagertest/tst_servicemanagertest.cpp | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/ivicore/qiviqmlconversion_helper.cpp b/src/ivicore/qiviqmlconversion_helper.cpp index 4ad719f..82914c4 100644 --- a/src/ivicore/qiviqmlconversion_helper.cpp +++ b/src/ivicore/qiviqmlconversion_helper.cpp @@ -102,7 +102,7 @@ QVariant qtivi_convertFromJSON(const QVariant &value) // This is needed as it could also store a QStringList or a Hash if (val.canConvert(QMetaType::fromType<QVariantMap>())) val.convert(QMetaType::fromType<QVariantMap>()); - if (val.canConvert(QMetaType::fromType<QVariantList>())) + if (val.metaType() != QMetaType::fromType<QString>() && val.canConvert(QMetaType::fromType<QVariantList>())) val.convert(QMetaType::fromType<QVariantList>()); if (val.metaType() == QMetaType::fromType<QVariantMap>()) { diff --git a/tests/auto/core/servicemanagertest/CMakeLists.txt b/tests/auto/core/servicemanagertest/CMakeLists.txt index b4dc93f..90bb8e2 100644 --- a/tests/auto/core/servicemanagertest/CMakeLists.txt +++ b/tests/auto/core/servicemanagertest/CMakeLists.txt @@ -12,6 +12,8 @@ qt_add_test(tst_servicemanagertest SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" PUBLIC_LIBRARIES # Remove: Lqtivi + simple_plugin_static # special case + wrongmetadata_plugin_static # special case Qt::IviCore Qt::IviCorePrivate ) diff --git a/tests/auto/core/servicemanagertest/tst_servicemanagertest.cpp b/tests/auto/core/servicemanagertest/tst_servicemanagertest.cpp index 5c0ba96..1eb2afd 100644 --- a/tests/auto/core/servicemanagertest/tst_servicemanagertest.cpp +++ b/tests/auto/core/servicemanagertest/tst_servicemanagertest.cpp @@ -127,7 +127,8 @@ void ServiceManagerTest::ignoreDynamicPluginWarnings() QTest::ignoreMessage(QtWarningMsg, QRegularExpression("PluginManager - Malformed metaData in '.*'. MetaData must contain a list of interfaces")); # endif - QTest::ignoreMessage(QtInfoMsg, QRegularExpression("Found the same plugin in two configurations. Using the '.*' configuration: .*")); + // FIXME Disabled for cmake porting + // QTest::ignoreMessage(QtInfoMsg, QRegularExpression("Found the same plugin in two configurations. Using the '.*' configuration: .*")); #endif } |