From c0f3895ba71e2550e2364775e712df73973502e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 2 Mar 2013 22:27:20 +0100 Subject: [PATCH] Map NULL_UUID activity to ALL activities REVIEW: 109274 BUG: 314830 FIXED-IN: 4.10.2 --- client.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client.cpp b/client.cpp index 5fb6dcb87c..e16a1fe7e4 100644 --- a/client.cpp +++ b/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.