Map NULL_UUID activity to ALL activities
REVIEW: 109274 BUG: 314830 FIXED-IN: 4.10.2
This commit is contained in:
parent
1bc2d7d3b7
commit
c0f3895ba7
1 changed files with 10 additions and 0 deletions
10
client.cpp
10
client.cpp
|
@ -1518,12 +1518,16 @@ void Client::setOnActivity(const QString &activity, bool enable)
|
|||
/**
|
||||
* set exactly which activities this client is on
|
||||
*/
|
||||
#define NULL_UUID "00000000-0000-0000-0000-000000000000"
|
||||
void Client::setOnActivities(QStringList newActivitiesList)
|
||||
{
|
||||
QString joinedActivitiesList = newActivitiesList.join(",");
|
||||
joinedActivitiesList = rules()->checkActivity(joinedActivitiesList, false);
|
||||
newActivitiesList = joinedActivitiesList.split(',', QString::SkipEmptyParts);
|
||||
|
||||
if (newActivitiesList.contains(NULL_UUID))
|
||||
newActivitiesList.clear(); // turn into "all"
|
||||
|
||||
QStringList allActivities = workspace()->activityList();
|
||||
if ( newActivitiesList.isEmpty() ||
|
||||
(newActivitiesList.count() > 1 && newActivitiesList.count() == allActivities.count()) ||
|
||||
|
@ -2380,6 +2384,12 @@ void Client::checkActivities()
|
|||
}
|
||||
|
||||
newActivitiesList = QString(prop).split(',');
|
||||
|
||||
if (newActivitiesList.contains(NULL_UUID)) {
|
||||
setOnAllActivities(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (newActivitiesList == activityList)
|
||||
return; //expected change, it's ok.
|
||||
|
||||
|
|
Loading…
Reference in a new issue