Merging from old trunk:

r619879 | lunakl | 2007-01-04 18:16:16 +0100 (Thu, 04 Jan 2007) | 3 lines

More transiency checks.


svn path=/trunk/KDE/kdebase/workspace/; revision=659522
This commit is contained in:
Luboš Luňák 2007-04-30 11:33:36 +00:00
parent ce110c887f
commit 3f12214c12

View file

@ -61,6 +61,16 @@ bool performTransiencyCheck()
{
if( (*it1)->deleting )
continue;
if( (*it1)->in_group == NULL )
{
kdDebug() << "TC: " << *it1 << " in not in a group" << endl;
ret = false;
}
else if( !(*it1)->in_group->members().contains( *it1 ))
{
kdDebug() << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl;
ret = false;
}
if( !(*it1)->isTransient())
{
if( !(*it1)->mainClients().isEmpty())
@ -113,6 +123,23 @@ bool performTransiencyCheck()
}
}
}
GroupList groups = Workspace::self()->groups;
for( GroupList::ConstIterator it1 = groups.begin();
it1 != groups.end();
++it1 )
{
ClientList members = (*it1)->members();
for( ClientList::ConstIterator it2 = members.begin();
it2 != members.end();
++it2 )
{
if( (*it2)->in_group != *it1 )
{
kdDebug() << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl;
ret = false;
}
}
}
return ret;
}