aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-02 18:50:55 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-02 20:01:27 +0900
commit2b1c470d4f27311fadc21edee411c22651fa97f9 (patch)
treebc230c893b3c855ccb4242f2b958adb874c95b7a
parent16ed52736f38b7d42fadc5174472a48f6c623c8f (diff)
downloadlibquotient-2b1c470d4f27311fadc21edee411c22651fa97f9.tar.gz
libquotient-2b1c470d4f27311fadc21edee411c22651fa97f9.zip
qmc-example: Drop resetting the topic after topic-setting tests
That never really worked.
-rw-r--r--examples/qmc-example.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/qmc-example.cpp b/examples/qmc-example.cpp
index c948a39b..10ea9d35 100644
--- a/examples/qmc-example.cpp
+++ b/examples/qmc-example.cpp
@@ -376,7 +376,6 @@ void QMCTest::setTopic()
{
static const char* const stateTestName = "State setting test";
running.push_back(stateTestName);
- auto initialTopic = targetRoom->topic();
const auto newTopic = c->generateTxnId(); // Just a way to get a unique id
targetRoom->setTopic(newTopic); // Sets the state by proper means
@@ -386,7 +385,7 @@ void QMCTest::setTopic()
RoomTopicEvent(fakeTopic).contentJson());
connectUntil(targetRoom, &Room::topicChanged, this,
- [this, newTopic, fakeTopic, initialTopic] {
+ [this, newTopic] {
if (targetRoom->topic() == newTopic) {
QMC_CHECK(stateTestName, true);
return true;
@@ -402,7 +401,7 @@ void QMCTest::setTopic()
// to be emitted before Room::pendingEventAboutToMerge.
connectUntil(
targetRoom, &Room::pendingEventChanged, this,
- [this, fakeTopic, initialTopic, fakeTxnId](int pendingIdx) {
+ [this, fakeTopic, fakeTxnId](int pendingIdx) {
const auto& pendingEvents = targetRoom->pendingEvents();
Q_ASSERT(pendingIdx >= 0 && pendingIdx < int(pendingEvents.size()));
const auto& evt = pendingEvents[pendingIdx];
@@ -424,7 +423,7 @@ void QMCTest::setTopic()
running.push_back(fakeStateTestName);
connectUntil(
targetRoom, &Room::pendingEventAboutToMerge, this,
- [this, fakeTopic, initialTopic](const RoomEvent* e, int) {
+ [this, fakeTopic](const RoomEvent* e, int) {
if (e->contentJson().value("topic").toString() != fakeTopic)
return false; // Wait on for the right event