diff options
author | Marc Hüskens <marc.hueskens@aucos.de> | 2024-02-07 13:31:04 +0100 |
---|---|---|
committer | Marc Hüskens <marc.hueskens@aucos.de> | 2024-03-13 10:52:18 +0000 |
commit | 73ee1f826195d80384c1fd1eefd7bbc176542b2d (patch) | |
tree | 24e9f5233e9a02d6679260300e7eb42604399013 /tests/auto/integration/tst_integration.cpp | |
parent | 7805b56ab39a97a11f10f342b54fa040f8b0f17c (diff) |
Fix slot return values of container<pod>
Added missing call to decodeVariant before informing replicas
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Ibb83f02fc901390c4ec92de836d9663315ab112c
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'tests/auto/integration/tst_integration.cpp')
-rw-r--r-- | tests/auto/integration/tst_integration.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/auto/integration/tst_integration.cpp b/tests/auto/integration/tst_integration.cpp index ab47aad..4046b96 100644 --- a/tests/auto/integration/tst_integration.cpp +++ b/tests/auto/integration/tst_integration.cpp @@ -112,6 +112,20 @@ private: EngineReplica::EngineType type; }; +class MyClass : public MyClassSimpleSource +{ +public: + QMap<QString, MyPOD> myPodMap() override + { + return {{"Zero", MyPOD(0,0,"0")},{"One", MyPOD(1,1,"1")},{"Two", MyPOD(2,2,"2")}}; + } + QList<MyPOD> myPodList() override + { + return {MyPOD(0,0,"0"),MyPOD(1,1,"1"),MyPOD(2,2,"2")}; + } +}; + + class tst_Integration: public QObject { Q_OBJECT @@ -1369,7 +1383,7 @@ private slots: MyPOD shouldPass(1, 2.0, QStringLiteral("pass")); MyPOD shouldFail(1, 2.0, QStringLiteral("fail")); - MyClassSimpleSource m; + MyClass m; m.setMyPOD(shouldPass); host->enableRemoting(&m); const QScopedPointer<MyClassReplica> myclass_r(client->acquire<MyClassReplica>()); @@ -1377,6 +1391,18 @@ private slots: QVERIFY(myclass_r->myPOD() == m.myPOD()); QVERIFY(myclass_r->myPOD() != shouldFail); + + auto podMapReply = myclass_r->myPodMap(); + QVERIFY(podMapReply.waitForFinished(1000)); + auto podMap = podMapReply.returnValue(); + QCOMPARE(podMap.size(), 3); + QCOMPARE(podMap, m.myPodMap()); + + auto podListReply = myclass_r->myPodList(); + QVERIFY(podListReply.waitForFinished(1000)); + auto podList = podListReply.returnValue(); + QCOMPARE(podList.size(), 3); + QCOMPARE(podList, m.myPodList()); } void SchemeTest() |