diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
commit | e63beeb5bdb82987b1e00bc35178667786fbad48 (patch) | |
tree | ab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /kjsembed/jsobjectproxy.cpp | |
parent | 67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff) | |
download | tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip |
Fix incorrect conversion
Diffstat (limited to 'kjsembed/jsobjectproxy.cpp')
-rw-r--r-- | kjsembed/jsobjectproxy.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kjsembed/jsobjectproxy.cpp b/kjsembed/jsobjectproxy.cpp index e7d1e5d0..7011e338 100644 --- a/kjsembed/jsobjectproxy.cpp +++ b/kjsembed/jsobjectproxy.cpp @@ -53,19 +53,19 @@ namespace KJSEmbed { typedef Bindings::JSObjectProxyImp JSObjectProxyImp; - JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *r, const JSSecurityPolicy *sp ) + JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TQObject *target, TQObject *r, const JSSecurityPolicy *sp ) : JSProxy( JSProxy::ObjectProxy ), jspart( part ), js( part->interpreter() ), obj( target ), root( r ) { policy = sp ? sp : JSSecurityPolicy::defaultPolicy(); } - JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *r ) + JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TQObject *target, TQObject *r ) : JSProxy( JSProxy::ObjectProxy ), jspart( part ), js( part->interpreter() ), obj( target ), root( r ) { policy = JSSecurityPolicy::defaultPolicy(); } - JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *target ) + JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TQObject *target ) : JSProxy( JSProxy::ObjectProxy ), jspart( part ), js( part->interpreter() ), obj( target ), root( target ) { policy = JSSecurityPolicy::defaultPolicy(); @@ -93,7 +93,7 @@ namespace KJSEmbed { return KJS::UString(); } - TTQString s( "%1 (%2)" ); + TQString s( "%1 (%2)" ); s = s.arg( obj ? obj->name() : "Dead Object" ); s = s.arg( obj ? obj->className() : "" ); return KJS::UString( s ); @@ -115,11 +115,11 @@ namespace KJSEmbed { kdDebug( 80001 ) << "JS getting '" << p.ascii() << endl; // Properties - TTQString prop = p.ustring().qstring(); - TTQMetaObject *meta = obj->metaObject(); + TQString prop = p.ustring().qstring(); + TQMetaObject *meta = obj->metaObject(); if ( meta->findProperty( p.ascii(), true ) != -1 ) { - TTQVariant val = obj->property( prop.ascii() ); + TQVariant val = obj->property( prop.ascii() ); kdDebug( 80001 ) << "JS getting '" << p.ascii() << "' ( " << val.typeName() << ")" << endl; return convertToValue( exec, val ); @@ -149,10 +149,10 @@ namespace KJSEmbed { } // Properties - TTQMetaObject *meta = obj->metaObject(); + TQMetaObject *meta = obj->metaObject(); int propIndex = meta->findProperty( p.ascii(), true ); if ( propIndex != -1 ) { - TTQVariant val = convertToVariant( exec, v ); + TQVariant val = convertToVariant( exec, v ); if ( meta->property(propIndex, true)->isEnumType() ) { obj->setProperty( p.ascii(), val.toUInt() ); } else if ( val.isValid() ) { @@ -199,7 +199,7 @@ namespace KJSEmbed { void JSObjectProxy::addBindingsClass( KJS::ExecState *exec, KJS::Object & /*object*/ ) { KJS::Identifier clazzid; - TTQObject *o = obj; + TQObject *o = obj; Bindings::BindingObject *bo = dynamic_cast<Bindings::BindingObject *>( o ); if ( bo ) { clazzid = KJS::Identifier( bo->jsClassName() ? bo->jsClassName() : obj->className() ); @@ -227,14 +227,14 @@ namespace KJSEmbed { } void JSObjectProxy::addBindingsEnum( KJS::ExecState *exec, KJS::Object &object ) { - TTQMetaObject * mo = obj->metaObject(); - TTQStrList enumList = mo->enumeratorNames( true ); + TQMetaObject * mo = obj->metaObject(); + TQStrList enumList = mo->enumeratorNames( true ); - for ( TTQStrListIterator iter( enumList ); iter.current(); ++iter ) { + for ( TQStrListIterator iter( enumList ); iter.current(); ++iter ) { const TQMetaEnum *me = mo->enumerator( iter.current(), true ); for ( uint i = 0 ; i < me->count ; i++ ) { - TTQCString key( ( me->items ) [ i ].key ); + TQCString key( ( me->items ) [ i ].key ); int val = ( me->items ) [ i ].value; object.put( exec, key.data(), KJS::Number( val ), KJS::ReadOnly ); } @@ -243,16 +243,16 @@ namespace KJSEmbed { void JSObjectProxy::addBindingsSlots( KJS::ExecState *exec, KJS::Object &object ) { // Publish slots with supported signatures as methods. - TTQMetaObject * mo = obj->metaObject(); - TTQStrList slotList( mo->slotNames( true ) ); - for ( TTQStrListIterator iter( slotList ); iter.current(); ++iter ) { + TQMetaObject * mo = obj->metaObject(); + TQStrList slotList( mo->slotNames( true ) ); + for ( TQStrListIterator iter( slotList ); iter.current(); ++iter ) { addSlotBinding( iter.current(), exec, object ); } } - void JSObjectProxy::addSlotBinding( const TTQCString &name, KJS::ExecState *exec, KJS::Object &object ) { + void JSObjectProxy::addSlotBinding( const TQCString &name, KJS::ExecState *exec, KJS::Object &object ) { // Lookup and bind slot - TTQMetaObject * mo = obj->metaObject(); + TQMetaObject * mo = obj->metaObject(); int slotid = mo->findSlot( name.data(), true ); if ( slotid == -1 ) return ; @@ -267,14 +267,14 @@ namespace KJSEmbed { if ( id < 0 ) return ; - TTQCString jsname = name; + TQCString jsname = name; jsname.detach(); - jsname.replace( TTQRegExp( "\\([^\\)]*\\)" ), "" ); + jsname.replace( TQRegExp( "\\([^\\)]*\\)" ), "" ); // Find the return type, we only care if it is a pointer type const TQUMethod *m = md->method; const char *retclass = 0; - TTQCString ptr( "ptr" ); + TQCString ptr( "ptr" ); if ( m->count && ( m->parameters->inOut == TQUParameter::Out ) && ( ptr == m->parameters->type->desc() ) ) { @@ -291,8 +291,8 @@ namespace KJSEmbed { object.put( exec, KJS::Identifier( jsname.data() ), KJS::Object( imp ) ); } else { // The identifier has already been used - TTQString s( name ); - TTQCString cs = TTQString( "%1%2" ).arg( jsname ).arg( s.contains( ',' ) + 1 ).ascii(); + TQString s( name ); + TQCString cs = TQString( "%1%2" ).arg( jsname ).arg( s.contains( ',' ) + 1 ).ascii(); //kdDebug(80001) << "Method " << jsname << " exists, using " << cs << " for " << s << endl; object.put( exec, KJS::Identifier( cs.data() ), KJS::Object( imp ) ); } |