allow for args to be passed to the service plugin

svn path=/trunk/KDE/kdelibs/; revision=1126018
This commit is contained in:
Aaron J. Seigo 2010-05-12 23:30:10 +00:00
parent 515249e7f4
commit 57b809f29e
2 changed files with 18 additions and 1 deletions

View File

@ -65,6 +65,12 @@ Service::~Service()
}
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
if (name.isEmpty()) {
@ -81,7 +87,6 @@ Service *Service::load(const QString &name, QObject *parent)
KService::Ptr offer = offers.first();
QString error;
QVariantList args;
//args << name;
Service *service = 0;

View File

@ -84,6 +84,18 @@ public:
*/
~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.
*