summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TelepathyQt4/connection-manager-internal.h3
-rw-r--r--TelepathyQt4/connection-manager.cpp2
-rw-r--r--tests/pinocchio/cm-basics.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/TelepathyQt4/connection-manager-internal.h b/TelepathyQt4/connection-manager-internal.h
index b9d77df..a919c36 100644
--- a/TelepathyQt4/connection-manager-internal.h
+++ b/TelepathyQt4/connection-manager-internal.h
@@ -27,6 +27,7 @@
#include <QDBusConnection>
#include <QLatin1String>
#include <QQueue>
+#include <QSet>
#include <QString>
namespace Tp
@@ -85,7 +86,7 @@ private:
void parseResult(const QStringList &names);
QQueue<QLatin1String> mMethodsQueue;
- QStringList mResult;
+ QSet<QString> mResult;
QDBusConnection mBus;
};
diff --git a/TelepathyQt4/connection-manager.cpp b/TelepathyQt4/connection-manager.cpp
index 7876f92..3cec376 100644
--- a/TelepathyQt4/connection-manager.cpp
+++ b/TelepathyQt4/connection-manager.cpp
@@ -297,7 +297,7 @@ void ConnectionManager::Private::PendingNames::continueProcessing()
}
else {
debug() << "Success: list" << mResult;
- setResult(mResult);
+ setResult(mResult.toList());
setFinished();
}
}
diff --git a/tests/pinocchio/cm-basics.cpp b/tests/pinocchio/cm-basics.cpp
index 0c70be4..fc9d447 100644
--- a/tests/pinocchio/cm-basics.cpp
+++ b/tests/pinocchio/cm-basics.cpp
@@ -51,6 +51,8 @@ void TestCmBasics::onListNames(Tp::PendingOperation *operation)
{
Tp::PendingStringList *p = static_cast<Tp::PendingStringList*>(operation);
QCOMPARE(p->result().contains("pinocchio"), QBool(true));
+ // Check for bug 23040: Running Connection Managers appear twice in ConnectionManager::listNames().
+ QCOMPARE(p->result().count("pinocchio"), 1);
mLoop->exit(0);
}