aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/qmc-example.cpp4
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