[Telepathy-commits] [telepathy-qt4/master] Warn when concatenating ReferencedHandles with different connection and/or handle type
Olli Salli
olli.salli at collabora.co.uk
Wed Jan 21 04:42:13 PST 2009
---
TelepathyQt4/cli-referenced-handles.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/TelepathyQt4/cli-referenced-handles.cpp b/TelepathyQt4/cli-referenced-handles.cpp
index 743d2a8..004a1cd 100644
--- a/TelepathyQt4/cli-referenced-handles.cpp
+++ b/TelepathyQt4/cli-referenced-handles.cpp
@@ -159,6 +159,11 @@ uint ReferencedHandles::takeAt(int i)
ReferencedHandles ReferencedHandles::operator+(const ReferencedHandles& another) const
{
+ if (connection() != another.connection() || handleType() != another.handleType()) {
+ warning() << "Tried to concatenate ReferencedHandles instances with different connection and/or handle type";
+ return *this;
+ }
+
return ReferencedHandles(connection(), handleType(), mPriv->handles + another.mPriv->handles);
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list