summaryrefslogtreecommitdiffstats
path: root/tests/resourcecommunicationtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/resourcecommunicationtest.cpp')
-rw-r--r--tests/resourcecommunicationtest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/resourcecommunicationtest.cpp b/tests/resourcecommunicationtest.cpp
index 201db53..7beafc7 100644
--- a/tests/resourcecommunicationtest.cpp
+++ b/tests/resourcecommunicationtest.cpp
@@ -51,7 +51,7 @@ private slots:
51 int errors = 0; 51 int errors = 0;
52 for (int i = 0; i < count; i++) { 52 for (int i = 0; i < count; i++) {
53 auto result = resourceAccess.sendCommand(Sink::Commands::PingCommand) 53 auto result = resourceAccess.sendCommand(Sink::Commands::PingCommand)
54 .syncThen<void>([&resourceAccess, &errors, &complete](const KAsync::Error &error) { 54 .then([&resourceAccess, &errors, &complete](const KAsync::Error &error) {
55 complete++; 55 complete++;
56 if (error) { 56 if (error) {
57 qWarning() << error.errorMessage; 57 qWarning() << error.errorMessage;
@@ -77,7 +77,7 @@ private slots:
77 int errors = 0; 77 int errors = 0;
78 for (int i = 0; i < count; i++) { 78 for (int i = 0; i < count; i++) {
79 resourceAccess.sendCommand(Sink::Commands::PingCommand) 79 resourceAccess.sendCommand(Sink::Commands::PingCommand)
80 .syncThen<void>([&resourceAccess, &errors, &complete](const KAsync::Error &error) { 80 .then([&resourceAccess, &errors, &complete](const KAsync::Error &error) {
81 complete++; 81 complete++;
82 if (error) { 82 if (error) {
83 qWarning() << error.errorMessage; 83 qWarning() << error.errorMessage;
@@ -104,7 +104,7 @@ private slots:
104 auto resourceAccess = Sink::ResourceAccessFactory::instance().getAccess(resourceIdentifier, ""); 104 auto resourceAccess = Sink::ResourceAccessFactory::instance().getAccess(resourceIdentifier, "");
105 weakRef = resourceAccess.toWeakRef(); 105 weakRef = resourceAccess.toWeakRef();
106 resourceAccess->open(); 106 resourceAccess->open();
107 resourceAccess->sendCommand(Sink::Commands::PingCommand).syncThen<void>([resourceAccess]() { qDebug() << "Ping complete"; }).exec(); 107 resourceAccess->sendCommand(Sink::Commands::PingCommand).then([resourceAccess]() { qDebug() << "Ping complete"; }).exec();
108 } 108 }
109 QVERIFY(weakRef.toStrongRef()); 109 QVERIFY(weakRef.toStrongRef());
110 QTRY_VERIFY(!weakRef.toStrongRef()); 110 QTRY_VERIFY(!weakRef.toStrongRef());