remove unused function and name the config function properly so it works

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=922868
This commit is contained in:
Chani Armitage 2009-02-07 17:51:13 +00:00
parent 2547125e32
commit 480e5f4fb7
2 changed files with 3 additions and 26 deletions

View File

@ -196,30 +196,7 @@ void SimpleJavaScriptApplet::reportError()
kDebug() << m_engine->uncaughtExceptionBacktrace(); kDebug() << m_engine->uncaughtExceptionBacktrace();
} }
void SimpleJavaScriptApplet::showConfigurationInterface() void SimpleJavaScriptApplet::configChanged()
{
kDebug() << "Script: showConfigurationInterface";
// Here we'll load a ui file...
QScriptValue global = m_engine->globalObject();
QScriptValue fun = m_self.property("showConfigurationInterface");
if (!fun.isFunction()) {
kDebug() << "Script: ShowConfiguratioInterface is not a function, " << fun.toString();
return;
}
QScriptContext *ctx = m_engine->pushContext();
ctx->setActivationObject(m_self);
fun.call(m_self);
m_engine->popContext();
if (m_engine->hasUncaughtException()) {
reportError();
}
}
void SimpleJavaScriptApplet::configAccepted()
{ {
QScriptValue fun = m_self.property("configAccepted"); QScriptValue fun = m_self.property("configAccepted");
if (!fun.isFunction()) { if (!fun.isFunction()) {
@ -229,6 +206,7 @@ void SimpleJavaScriptApplet::configAccepted()
QScriptContext *ctx = m_engine->pushContext(); QScriptContext *ctx = m_engine->pushContext();
ctx->setActivationObject(m_self); ctx->setActivationObject(m_self);
//kDebug() << "calling plasmoid";
fun.call(m_self); fun.call(m_self);
m_engine->popContext(); m_engine->popContext();

View File

@ -51,8 +51,7 @@ public:
public slots: public slots:
void dataUpdated( const QString &name, const Plasma::DataEngine::Data &data ); void dataUpdated( const QString &name, const Plasma::DataEngine::Data &data );
void showConfigurationInterface(); void configChanged();
void configAccepted();
void executeAction(const QString &name); void executeAction(const QString &name);
private: private: