Actually call registerOperationScheme(). Also document a macro.

CCMAIL:panel-devel@kde.org
Can someone backport this to the 4.1 branch, please?  Otherwise no-one can write services in 4.1.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833339
This commit is contained in:
Alex Merry 2008-07-16 17:04:40 +00:00
parent aa2a6f536d
commit 56968db224
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,7 @@ Service::Service(QObject *parent)
: QObject(parent),
d(new ServicePrivate(this))
{
registerOperationsScheme();
}
Service::Service(QObject *parent, const QVariantList &args)
@ -45,6 +46,7 @@ Service::Service(QObject *parent, const QVariantList &args)
d(new ServicePrivate(this))
{
Q_UNUSED(args);
registerOperationsScheme();
}
Service::~Service()

View File

@ -26,6 +26,7 @@
#include <KDE/KConfigGroup>
#include <plasma/plasma_export.h>
class QIODevice;
namespace Plasma
@ -183,6 +184,9 @@ private:
} // namespace Plasma
/**
* Register a service when it is contained in a loadable module
*/
#define K_EXPORT_PLASMA_SERVICE(libname, classname) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(factory("plasma_service_" #libname))