[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete
From:       Pali Rohár <pali.rohar () gmail ! com>
Date:       2013-06-01 20:52:32
Message-ID: 20130601205232.21982AC85D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1356747 by pali:

Add Top Level group to Kopete::ContactList::self()->groups() and show it in Add contact dialog

BUG: 220225
BUG: 185394
FIXED-IN: 4.11


 M  +7 -0      kopete/kopetewindow.cpp  
 M  +3 -0      libkopete/contactlist/xmlcontactstorage.cpp  


--- trunk/KDE/kdenetwork/kopete/kopete/kopetewindow.cpp #1356746:1356747
@@ -1399,8 +1399,15 @@
 	// Populate the groups list
 	Kopete::GroupList groups=Kopete::ContactList::self()->groups();
 	QHash<QString, Kopete::Group*> groupItems;
+
+	// Add top level group
+	groupItems.insert ( Kopete::Group::topLevel()->displayName(), Kopete::Group::topLevel() );
+	ui_groupKABC.groupCombo->addItem ( Kopete::Group::topLevel()->displayName() );
+
 	foreach ( Kopete::Group *group, groups )
 	{
+		if ( group->type() != Kopete::Group::Normal )
+			continue;
 		QString groupname = group->displayName();
 		if ( !groupname.isEmpty() )
 		{
--- trunk/KDE/kdenetwork/kopete/libkopete/contactlist/xmlcontactstorage.cpp #1356746:1356747
@@ -189,6 +189,9 @@
         element = element.nextSibling().toElement();
     }
 
+    // above parseGroup will always fail for top level group, so add it here
+    addGroup( Kopete::Group::topLevel() );
+
     // Load metaContacts
     element = list.firstChild().toElement();
     while( !element.isNull() )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic