[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [sflphone-kde/contact_merging] src/lib: [ #54772 ] Limit the number of PlaceHolderContact to 1 per U
From: Emmanuel Lepage Vallee <emmanuel.lepage () savoirfairelinux ! com>
Date: 2014-09-08 20:24:44
Message-ID: E1XR5US-0007xs-L3 () scm ! kde ! org
[Download RAW message or body]
Git commit bd16bac65def934e90f6585404ac87f707df88fd by Emmanuel Lepage Vallee.
Committed on 08/09/2014 at 19:47.
Pushed by lepagevalleeemmanuel into branch 'contact_merging'.
[ #54772 ] Limit the number of PlaceHolderContact to 1 per UID
M +5 -0 src/lib/contactmodel.cpp
http://commits.kde.org/sflphone-kde/bd16bac65def934e90f6585404ac87f707df88fd
diff --git a/src/lib/contactmodel.cpp b/src/lib/contactmodel.cpp
index 1960a77..4bb1f3a 100644
--- a/src/lib/contactmodel.cpp
+++ b/src/lib/contactmodel.cpp
@@ -177,6 +177,11 @@ Contact* ContactModel::getPlaceHolder(const QByteArray& uid )
return ct;
}
+ //Do not re-create if it already exist
+ ct = m_hPlaceholders[uid];
+ if (ct)
+ return ct;
+
ContactPlaceHolder* ct2 = new ContactPlaceHolder(uid);
m_hPlaceholders[ct2->uid()] = ct2;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic