control the exposed API better

svn path=/trunk/KDE/kdebase/runtime/; revision=1160008
This commit is contained in:
Aaron J. Seigo 2010-08-06 19:42:08 +00:00
parent 0c929d525d
commit 2bdd15bc2d
2 changed files with 4 additions and 1 deletions

View File

@ -228,7 +228,7 @@ QScriptValue JavaScriptDataEngine::serviceCtor(QScriptContext *context, QScriptE
JavaScriptService *service = new JavaScriptService(serviceName, iFace); JavaScriptService *service = new JavaScriptService(serviceName, iFace);
if (service->wasFound()) { if (service->wasFound()) {
QScriptValue v = engine->newQObject(service, QScriptEngine::QtOwnership); QScriptValue v = engine->newQObject(service, QScriptEngine::QtOwnership, QScriptEngine::ExcludeSuperClassContents);
service->setScriptValue(v); service->setScriptValue(v);
return v; return v;
} }

View File

@ -35,6 +35,9 @@ class JavaScriptDataEngine;
class JavaScriptService : public Plasma::Service class JavaScriptService : public Plasma::Service
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString destination READ destination WRITE setDestination)
Q_PROPERTY(QStringList operationNames READ operationNames)
Q_PROPERTY(QString name READ name)
public: public:
JavaScriptService(const QString &serviceName, JavaScriptDataEngine *engine); JavaScriptService(const QString &serviceName, JavaScriptDataEngine *engine);