- bool legacy = false;
- if(name == "org.kde.StatusNotifierWatcher") {
- if(newOwner.isEmpty()) {
- //unregistered
- //qDebug() << "Connection to the StatusNotifierWatcher lost";
- legacy = true;
- } else if(oldOwner.isEmpty()) {
- //registered
- legacy = false;
- }
- } else if(name.startsWith(QLatin1String("org.kde.StatusNotifierHost-"))) {
- if(newOwner.isEmpty() && (!_statusNotifierWatcher ||
- !_statusNotifierWatcher->property("IsStatusNotifierHostRegistered").toBool())) {
- //qDebug() << "Connection to the last StatusNotifierHost lost";
- legacy = true;
- } else if(oldOwner.isEmpty()) {
- //qDebug() << "New StatusNotifierHost";
- legacy = false;
- }
- } else {
- return;
- }
-
- // qDebug() << "Service " << name << "status change, old owner:" << oldOwner << "new:" << newOwner;
-
- if(legacy == (mode() == Legacy)) {
- return;
- }
-
- if(legacy) {