diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-05-06 16:25:01 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2019-05-14 12:58:21 +0000 |
commit | 06d415d83fc4b80730286686a8e5243ca0b03a20 (patch) | |
tree | 6e515166b39e7461d25752e886d717c1e0680e3c /tests/auto/core | |
parent | 07c631aa4c1ac5199b4919087e43815a00154867 (diff) | |
download | qtivi-06d415d83fc4b80730286686a8e5243ca0b03a20.tar.gz |
Introduce a internal QtRemoteObject helper module
This module provides helper functions when using QtRemoteObjects and
starts using it in the autogenerator templates and the handwritten
servers. The helper provides the following:
* generic error handling
* conversion from QIviPendingReply to a pending call on the source side
* conversion to QIviPendingReply on the replica side
Change-Id: Ic9030c89b8153626340cc786d97ecdae416e699d
Fixes: AUTOSUITE-929
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'tests/auto/core')
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echoservice.cpp b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echoservice.cpp index c3edac1..3e81ded 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echoservice.cpp +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echoservice.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "echoservice.h" +#include <QtIviRemoteObjectsHelper> #include <QTimer> EchoService::EchoService() @@ -75,7 +76,7 @@ QVariant EchoService::voidSlot2(int param) QVariant EchoService::timer(int interval) { static quint64 counter = 0; - EchoPendingResult pendingResult(counter++, false); + QIviRemoteObjectPendingResult pendingResult(counter++, false); QTimer::singleShot(interval, this, [this, pendingResult](){ emit pendingResultAvailable(pendingResult.id(), true, QVariant()); }); diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echozonedservice.cpp b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echozonedservice.cpp index 8476f35..40ad3c0 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echozonedservice.cpp +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/echozonedservice.cpp @@ -28,6 +28,7 @@ #include "echozonedservice.h" +#include <QtIviRemoteObjectsHelper> #include <QTimer> #define SET_VALUE(m_VALUE, VALUE, CHANGED_SIGNAL) \ @@ -236,7 +237,7 @@ QVariant EchoZonedService::getCombo(const QString &zone) QVariant EchoZonedService::timer(int interval, const QString &zone) { static quint64 counter = 0; - EchoZonedPendingResult pendingResult(counter++, false); + QIviRemoteObjectPendingResult pendingResult(counter++, false); QTimer::singleShot(interval, this, [this, pendingResult, zone](){ emit pendingResultAvailable(pendingResult.id(), true, zone); }); diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/server_qtro_test.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/server_qtro_test.pro index ba49e98..85a933f 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/server_qtro_test.pro +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/server_qtro_test/server_qtro_test.pro @@ -1,7 +1,7 @@ TARGET = tst_org-example-echo-qtro QMAKE_PROJECT_NAME = $$TARGET QT -= gui -QT += testlib ivicore +QT += testlib ivicore iviremoteobjects_helper_private LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_frontend) DESTDIR = .. |