allow for args to be passed to the service plugin
svn path=/trunk/KDE/kdelibs/; revision=1126018
This commit is contained in:
parent
515249e7f4
commit
57b809f29e
@ -65,6 +65,12 @@ Service::~Service()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Service *Service::load(const QString &name, QObject *parent)
|
Service *Service::load(const QString &name, QObject *parent)
|
||||||
|
{
|
||||||
|
QVariantList args;
|
||||||
|
return load(name, args, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
Service *Service::load(const QString &name, const QVariantList &args, QObject *parent)
|
||||||
{
|
{
|
||||||
//TODO: scripting API support
|
//TODO: scripting API support
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
@ -81,7 +87,6 @@ Service *Service::load(const QString &name, QObject *parent)
|
|||||||
|
|
||||||
KService::Ptr offer = offers.first();
|
KService::Ptr offer = offers.first();
|
||||||
QString error;
|
QString error;
|
||||||
QVariantList args;
|
|
||||||
//args << name;
|
//args << name;
|
||||||
Service *service = 0;
|
Service *service = 0;
|
||||||
|
|
||||||
|
12
service.h
12
service.h
@ -84,6 +84,18 @@ public:
|
|||||||
*/
|
*/
|
||||||
~Service();
|
~Service();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to load a given service from a plugin.
|
||||||
|
*
|
||||||
|
* @param name the plugin name of the service to load
|
||||||
|
* @param args a list of arguments to supply to the service plugin when loading it
|
||||||
|
* @param parent the parent object, if any, for the service
|
||||||
|
*
|
||||||
|
* @return a Service object, guaranteed to be not null.
|
||||||
|
* @since 4.5
|
||||||
|
*/
|
||||||
|
static Service *load(const QString &name, const QVariantList &args, QObject *parent = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to load a given service from a plugin.
|
* Used to load a given service from a plugin.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user