[Telepathy-commits] [telepathy-qt4/master] ReadinessHelper: Fixed bug when using QSet::intersect.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Thu Feb 19 06:37:55 PST 2009


QSet::intersect modifies the set, so make a copy of it before using intersect.
---
 TelepathyQt4/Client/readiness-helper.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/Client/readiness-helper.cpp b/TelepathyQt4/Client/readiness-helper.cpp
index 02c6acd..bd25689 100644
--- a/TelepathyQt4/Client/readiness-helper.cpp
+++ b/TelepathyQt4/Client/readiness-helper.cpp
@@ -180,7 +180,8 @@ void ReadinessHelper::Private::iterateIntrospection()
     while (i != introspectables.constEnd()) {
         uint feature = i.key();
         Introspectable introspectable = i.value();
-        if (!introspectable.dependsOnFeatures.intersect(missingFeatures).isEmpty()) {
+        QSet<uint> dependsOnFeatures = introspectable.dependsOnFeatures;
+        if (!dependsOnFeatures.intersect(missingFeatures).isEmpty()) {
             missingFeatures += feature;
         }
         ++i;
-- 
1.5.6.5




More information about the telepathy-commits mailing list