QScriptValue REcmaFont::load (QScriptContext* context, QScriptEngine* engine) { //REcmaHelper::functionStart("REcmaFont::load", context, engine); //qDebug() << "ECMAScript WRAPPER: REcmaFont::load"; //QCoreApplication::processEvents(); QScriptValue result = engine->undefinedValue(); // public function: can be called from ECMA wrapper of ECMA shell: RFont* self = getSelf("load", context); //Q_ASSERT(self!=NULL); if (self==NULL) { return REcmaHelper::throwError("self is NULL", context); } if( context->argumentCount() == 0 ){ // prepare arguments: // end of arguments // call C++ function: // return type 'bool' bool cppResult = self->load(); // return type: bool // standard Type result = QScriptValue(cppResult); } else { return REcmaHelper::throwError("Wrong number/types of arguments for RFont.load().", context); } //REcmaHelper::functionEnd("REcmaFont::load", context, engine); return result; }