diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-07 08:57:17 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-07 08:57:17 +0900 |
commit | 86d8895f939d8b36dbf8e5104f238b2eaed87a94 (patch) | |
tree | 7dee40dddcfb6c8ca9f01a4985e9b48375e3c29d /examples | |
parent | 78d5fa9aa0a675b74053da76811d9fb9e02aa511 (diff) | |
download | libquotient-86d8895f939d8b36dbf8e5104f238b2eaed87a94.tar.gz libquotient-86d8895f939d8b36dbf8e5104f238b2eaed87a94.zip |
qmc-example: Ensure prerequisites before running the tagging test
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qmc-example.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/qmc-example.cpp b/examples/qmc-example.cpp index 3fa74d42..b7c56cb4 100644 --- a/examples/qmc-example.cpp +++ b/examples/qmc-example.cpp @@ -124,6 +124,10 @@ void QMCTest::addAndRemoveTag() { ++semaphor; static const auto TestTag = QStringLiteral("org.qmatrixclient.test"); + // Pre-requisite + if (targetRoom->tags().contains(TestTag)) + targetRoom->removeTag(TestTag); + QObject::connect(targetRoom, &Room::tagsChanged, targetRoom, [=] { cout << "Room " << targetRoom->id().toStdString() << ", tag(s) changed:" << endl |