1033
1033
QSet<uint> groupIdSet;
1035
groupIdSet.insert( Kopete::Group::topLevel()->groupId() );
1037
bool idsUnique = !groupIdSet.contains( Kopete::Group::temporary()->groupId() );
1038
groupIdSet.insert( Kopete::Group::temporary()->groupId() );
1035
bool idsUnique = true;
1036
bool haveTemporary = false;
1037
bool haveTopLevel = false;
1039
foreach( Kopete::Group * group, groups() )
1042
foreach( Kopete::Group * group, groups() )
1041
if ( groupIdSet.contains( group->groupId() ) )
1044
if ( groupIdSet.contains( group->groupId() ) )
1049
groupIdSet.insert( group->groupId() );
1046
groupIdSet.insert( group->groupId() );
1047
if ( group->type() == Kopete::Group::Temporary )
1048
haveTemporary = true;
1049
else if ( group->type() == Kopete::Group::TopLevel )
1050
haveTopLevel = true;
1053
if ( !haveTemporary )
1054
groupIdSet.insert(Kopete::Group::topLevel()->groupId());
1056
if ( !haveTopLevel )
1057
groupIdSet.insert(Kopete::Group::topLevel()->groupId());
1053
1059
if ( !idsUnique )
1055
1061
uint uniqueGroupId = 0;