summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Goldberg <george.goldberg@collabora.co.uk>2009-07-30 14:25:39 (GMT)
committerGeorge Goldberg <george.goldberg@collabora.co.uk>2009-07-30 14:25:39 (GMT)
commit1123177abf30a9d021dd9e337b8fe9f63ed13ce5 (patch)
tree6fe26a4b6424a88f77accbb5d1ed2490ca4a63d1
parentf26207c81f32e01f43473440089a4032e4e898f9 (diff)
parent1bb5d25173a7c62a276f675b460e39bce85c734d (diff)
downloadtelepathy-qt4-master.tar.gz
telepathy-qt4-master.tar.xz
Merge branch 'fix-bug-23040'HEADmaster
-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);
}