preserve the target information with NullService
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=856771
This commit is contained in:
parent
02c5028f8c
commit
6774525044
@ -52,9 +52,10 @@ public:
|
||||
class NullService : public Service
|
||||
{
|
||||
public:
|
||||
NullService(QObject *parent)
|
||||
NullService(const QString &target, QObject *parent)
|
||||
: Service(parent)
|
||||
{
|
||||
setDestination(target);
|
||||
setName("NullService");
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ Service* Service::load(const QString &name, QObject *parent)
|
||||
{
|
||||
//TODO: scripting API support
|
||||
if (name.isEmpty()) {
|
||||
return new NullService(parent);
|
||||
return new NullService(QString(), parent);
|
||||
}
|
||||
|
||||
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(name);
|
||||
@ -77,7 +77,7 @@ Service* Service::load(const QString &name, QObject *parent)
|
||||
|
||||
if (offers.isEmpty()) {
|
||||
kDebug() << "offers is empty for " << name;
|
||||
return new NullService(parent);
|
||||
return new NullService(name, parent);
|
||||
}
|
||||
|
||||
KService::Ptr offer = offers.first();
|
||||
@ -92,7 +92,7 @@ Service* Service::load(const QString &name, QObject *parent)
|
||||
|
||||
if (!service) {
|
||||
kDebug() << "Couldn't load Service \"" << name << "\"! reason given: " << error;
|
||||
return new NullService(parent);
|
||||
return new NullService(name, parent);
|
||||
}
|
||||
|
||||
return service;
|
||||
|
Loading…
x
Reference in New Issue
Block a user