aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-05 19:15:32 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-05 19:28:46 +0900
commitf207955e2e0a77b7a47b47513374ccc3e6a71c1e (patch)
tree1e93abca9b6c3df02c092a9b333799980f395276 /examples
parente8b6e90feedd4aec3e255984da8952ef716c68db (diff)
downloadlibquotient-f207955e2e0a77b7a47b47513374ccc3e6a71c1e.tar.gz
libquotient-f207955e2e0a77b7a47b47513374ccc3e6a71c1e.zip
qmc-example: Logging tweaks
Diffstat (limited to 'examples')
-rw-r--r--examples/qmc-example.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/qmc-example.cpp b/examples/qmc-example.cpp
index 13a1b7c4..3fa74d42 100644
--- a/examples/qmc-example.cpp
+++ b/examples/qmc-example.cpp
@@ -130,6 +130,7 @@ void QMCTest::addAndRemoveTag()
<< " " << targetRoom->tagNames().join(", ").toStdString() << endl;
if (targetRoom->tags().contains(TestTag))
{
+ cout << "Test tag set, removing it now" << endl;
targetRoom->removeTag(TestTag);
QMC_CHECK("Tagging test", !targetRoom->tags().contains(TestTag));
--semaphor;
@@ -137,15 +138,18 @@ void QMCTest::addAndRemoveTag()
}
});
// The reverse order because tagsChanged is emitted synchronously.
+ cout << "Adding a tag" << endl;
targetRoom->addTag(TestTag);
}
void QMCTest::sendAndRedact()
{
++semaphor;
+ cout << "Sending a message to redact" << endl;
auto* job = targetRoom->connection()->callApi<SendEventJob>(targetRoom->id(),
- RoomMessageEvent("Message to redact"));
+ RoomMessageEvent(origin % ": Message to redact"));
QObject::connect(job, &BaseJob::success, targetRoom, [job,this] {
+ cout << "Message to redact has been succesfully sent, redacting" << endl;
targetRoom->redactEvent(job->eventId(), "qmc-example");
});
QObject::connect(targetRoom, &Room::replacedEvent, targetRoom,