/*! Returns a list with the names of all this class's slots. If \a super is TRUE, inherited slots are included. \sa numSlots() */ QStrList QMetaObject::slotNames( bool super ) const { QStrList l( FALSE ); int n = numSlots( super ); for( int i = 0; i < n; ++i ) l.append( slot( i, super)->name ); return l; }
bool GlobalObject::initStandardClasses(JSContext *cx) { /* Native objects get their reserved slots from birth. */ JS_ASSERT(numSlots() >= JSSLOT_FREE(getClass())); JSAtomState &state = cx->runtime->atomState; /* Define a top-level property 'undefined' with the undefined value. */ if (!defineProperty(cx, state.typeAtoms[JSTYPE_VOID], UndefinedValue(), JS_PropertyStub, JS_StrictPropertyStub, JSPROP_PERMANENT | JSPROP_READONLY)) { return false; } if (!initFunctionAndObjectClasses(cx)) return false; /* Initialize the rest of the standard objects and functions. */ return js_InitArrayClass(cx, this) && js_InitBooleanClass(cx, this) && js_InitExceptionClasses(cx, this) && js_InitMathClass(cx, this) && js_InitNumberClass(cx, this) && js_InitJSONClass(cx, this) && js_InitRegExpClass(cx, this) && js_InitStringClass(cx, this) && js_InitTypedArrayClasses(cx, this) && #if JS_HAS_XML_SUPPORT js_InitXMLClasses(cx, this) && #endif #if JS_HAS_GENERATORS js_InitIteratorClasses(cx, this) && #endif js_InitDateClass(cx, this) && js_InitProxyClass(cx, this); }