More transiency checks.
svn path=/trunk/KDE/kdebase/workspace/; revision=619879
This commit is contained in:
parent
1a0637b627
commit
f8d7a5ec25
1 changed files with 27 additions and 0 deletions
27
group.cpp
27
group.cpp
|
@ -60,6 +60,16 @@ bool performTransiencyCheck()
|
||||||
{
|
{
|
||||||
if( (*it1)->deleting )
|
if( (*it1)->deleting )
|
||||||
continue;
|
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)->isTransient())
|
||||||
{
|
{
|
||||||
if( !(*it1)->mainClients().isEmpty())
|
if( !(*it1)->mainClients().isEmpty())
|
||||||
|
@ -112,6 +122,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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue