Kross
kjsscript.cpp
Go to the documentation of this file.
71 const QString message = QString("%1%2: %3").arg( type ).arg((lineno >= 0) ? QString(" line %1").arg(lineno) : "").arg(value ? value->toString(exec).qstring() : "NULL");
118 krossdebug( QString("KjsScript::addFunctions sender name=%1 className=%2").arg(sender->objectName()).arg(sender->metaObject()->className()) );
132 krosswarning( QString("Failed to publish the QObject name=\"%1\" objectName=\"%2\"").arg(name).arg(object ? object->objectName() : "NULL") );
140 KJSEmbed::QObjectBinding* objImp = KJSEmbed::extractBindingImp<KJSEmbed::QObjectBinding>(exec, obj);
236 QList< QPair<KJS::JSObject*, QPointer<QObject> > >::Iterator it( d->m_publishedObjects.begin() );
237 QList< QPair<KJS::JSObject*, QPointer<QObject> > >::Iterator end( d->m_publishedObjects.end() );
243 KJSEmbed::QObjectBinding *imp = KJSEmbed::extractBindingImp<KJSEmbed::QObjectBinding>(exec, kjsobj);
259 krossdebug(QString("KjsScript::finalize published object=%1").arg( kjsobj->className().ascii() ));
284 KJS::UString c = codec ? KJS::UString(codec->toUnicode(code)) : KJS::UString(code.data(), code.size());
326 krossdebug( QString("KjsScript::execute connect function=%1 with signal=%2").arg(name.data()).arg(signature) );
330 KJSEmbed::SlotProxy* receiver = new KJSEmbed::SlotProxy(kjsglobal, exec->dynamicInterpreter(), object, signature.toLatin1());
333 krossdebug( QString("KjsScript::execute connected function=%1 with object=%2 signal=%3").arg(name.data()).arg(object->objectName()).arg(signature) );
336 krosswarning( QString("KjsScript::execute failed to connect object=%1 signal=%2").arg(object->objectName()).arg(signature) );
379 //if( hadError() ) return QVariant(); // check if we had a prev error and abort if that's the case
387 krossdebug(QString("KjsScript::callFunction(\"%1\") Prev error: %2").arg(name).arg(error.errorMessage()));
427 krossdebug(QString("KjsScript::callFunction(\"%1\") Call failed: %2").arg(name).arg(error.errorMessage()));
440 KJS::UString c = codec ? KJS::UString(codec->toUnicode(code)) : KJS::UString(code.data(), code.size());
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:43
virtual QVariant callFunction(const QString &name, const QVariantList &args=QVariantList())
Call a function in the script.
Definition: kjsscript.cpp:377
QHash< QString, Options > objectOptions() const
Definition: childreninterface.h:118
KjsScript(Kross::Interpreter *interpreter, Kross::Action *action)
Constructor.
Definition: kjsscript.cpp:162
virtual QVariant evaluate(const QByteArray &code)
Evaluate some scripting code.
Definition: kjsscript.cpp:437
const QString errorMessage() const
Definition: errorinterface.h:53
QHash< QString, QObject * > objects() const
Definition: childreninterface.h:104
Interface for managing Object collections.
Definition: childreninterface.h:38
QObject * object(const QString &name) const
Definition: childreninterface.h:97
auto connect signals with scripting functions.
Definition: childreninterface.h:47
void setError(const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
Set the error message.
Definition: errorinterface.h:69
static ErrorInterface extractError(const KJS::Completion &completion, KJS::ExecState *exec)
Extract an errormessage from a KJS::Completion object.
Definition: kjsscript.cpp:49
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
const KShortcut & end()
const KShortcut & completion()
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.