summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsobjectproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/jsobjectproxy.cpp')
-rw-r--r--kjsembed/jsobjectproxy.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kjsembed/jsobjectproxy.cpp b/kjsembed/jsobjectproxy.cpp
index 8b7d3cb7..e7d1e5d0 100644
--- a/kjsembed/jsobjectproxy.cpp
+++ b/kjsembed/jsobjectproxy.cpp
@@ -53,19 +53,19 @@ namespace KJSEmbed {
typedef Bindings::JSObjectProxyImp JSObjectProxyImp;
- JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TQObject *target, TQObject *r, const JSSecurityPolicy *sp )
+ JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *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, TQObject *target, TQObject *r )
+ JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *r )
: JSProxy( JSProxy::ObjectProxy ),
jspart( part ), js( part->interpreter() ), obj( target ), root( r ) {
policy = JSSecurityPolicy::defaultPolicy();
}
- JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TQObject *target )
+ JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, TTQObject *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();
}
- TQString s( "%1 (%2)" );
+ TTQString 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
- TQString prop = p.ustring().qstring();
- TQMetaObject *meta = obj->metaObject();
+ TTQString prop = p.ustring().qstring();
+ TTQMetaObject *meta = obj->metaObject();
if ( meta->findProperty( p.ascii(), true ) != -1 ) {
- TQVariant val = obj->property( prop.ascii() );
+ TTQVariant 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
- TQMetaObject *meta = obj->metaObject();
+ TTQMetaObject *meta = obj->metaObject();
int propIndex = meta->findProperty( p.ascii(), true );
if ( propIndex != -1 ) {
- TQVariant val = convertToVariant( exec, v );
+ TTQVariant 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;
- TQObject *o = obj;
+ TTQObject *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 ) {
- TQMetaObject * mo = obj->metaObject();
- TQStrList enumList = mo->enumeratorNames( true );
+ TTQMetaObject * mo = obj->metaObject();
+ TTQStrList enumList = mo->enumeratorNames( true );
- for ( TQStrListIterator iter( enumList ); iter.current(); ++iter ) {
+ for ( TTQStrListIterator iter( enumList ); iter.current(); ++iter ) {
- const QMetaEnum *me = mo->enumerator( iter.current(), true );
+ const TQMetaEnum *me = mo->enumerator( iter.current(), true );
for ( uint i = 0 ; i < me->count ; i++ ) {
- TQCString key( ( me->items ) [ i ].key );
+ TTQCString key( ( me->items ) [ i ].key );
int val = ( me->items ) [ i ].value;
object.put( exec, key.data(), KJS::Number( val ), KJS::ReadOnly );
}
@@ -243,22 +243,22 @@ namespace KJSEmbed {
void JSObjectProxy::addBindingsSlots( KJS::ExecState *exec, KJS::Object &object ) {
// Publish slots with supported signatures as methods.
- TQMetaObject * mo = obj->metaObject();
- TQStrList slotList( mo->slotNames( true ) );
- for ( TQStrListIterator iter( slotList ); iter.current(); ++iter ) {
+ TTQMetaObject * mo = obj->metaObject();
+ TTQStrList slotList( mo->slotNames( true ) );
+ for ( TTQStrListIterator iter( slotList ); iter.current(); ++iter ) {
addSlotBinding( iter.current(), exec, object );
}
}
- void JSObjectProxy::addSlotBinding( const TQCString &name, KJS::ExecState *exec, KJS::Object &object ) {
+ void JSObjectProxy::addSlotBinding( const TTQCString &name, KJS::ExecState *exec, KJS::Object &object ) {
// Lookup and bind slot
- TQMetaObject * mo = obj->metaObject();
+ TTQMetaObject * mo = obj->metaObject();
int slotid = mo->findSlot( name.data(), true );
if ( slotid == -1 )
return ;
- const QMetaData *md = mo->slot( slotid, true );
- if ( md->access != QMetaData::Public )
+ const TQMetaData *md = mo->slot( slotid, true );
+ if ( md->access != TQMetaData::Public )
return ;
// Find signature
@@ -267,16 +267,16 @@ namespace KJSEmbed {
if ( id < 0 )
return ;
- TQCString jsname = name;
+ TTQCString jsname = name;
jsname.detach();
- jsname.replace( TQRegExp( "\\([^\\)]*\\)" ), "" );
+ jsname.replace( TTQRegExp( "\\([^\\)]*\\)" ), "" );
// Find the return type, we only care if it is a pointer type
- const QUMethod *m = md->method;
+ const TQUMethod *m = md->method;
const char *retclass = 0;
- TQCString ptr( "ptr" );
+ TTQCString ptr( "ptr" );
- if ( m->count && ( m->parameters->inOut == QUParameter::Out )
+ if ( m->count && ( m->parameters->inOut == TQUParameter::Out )
&& ( ptr == m->parameters->type->desc() ) ) {
retclass = ( const char * ) m->parameters->typeExtra;
// kdDebug(80001) << "Return type is a pointer, type " << retclass << endl;
@@ -291,8 +291,8 @@ namespace KJSEmbed {
object.put( exec, KJS::Identifier( jsname.data() ), KJS::Object( imp ) );
} else {
// The identifier has already been used
- TQString s( name );
- TQCString cs = TQString( "%1%2" ).arg( jsname ).arg( s.contains( ',' ) + 1 ).ascii();
+ TTQString s( name );
+ TTQCString cs = TTQString( "%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 ) );
}