summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsobjectproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/jsobjectproxy.cpp')
-rw-r--r--kjsembed/jsobjectproxy.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kjsembed/jsobjectproxy.cpp b/kjsembed/jsobjectproxy.cpp
index c8b43a5d..8b7d3cb7 100644
--- a/kjsembed/jsobjectproxy.cpp
+++ b/kjsembed/jsobjectproxy.cpp
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstrlist.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
#include <private/qucomextra_p.h>
@@ -53,19 +53,19 @@ namespace KJSEmbed {
typedef Bindings::JSObjectProxyImp JSObjectProxyImp;
- JSObjectProxy::JSObjectProxy( KJSEmbedPart *part, QObject *target, QObject *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, QObject *target, QObject *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, QObject *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();
}
- QString 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
- QString prop = p.ustring().qstring();
- QMetaObject *meta = obj->metaObject();
+ TQString prop = p.ustring().qstring();
+ TQMetaObject *meta = obj->metaObject();
if ( meta->findProperty( p.ascii(), true ) != -1 ) {
- QVariant 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
- QMetaObject *meta = obj->metaObject();
+ TQMetaObject *meta = obj->metaObject();
int propIndex = meta->findProperty( p.ascii(), true );
if ( propIndex != -1 ) {
- QVariant 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;
- QObject *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 ) {
- QMetaObject * mo = obj->metaObject();
- QStrList enumList = mo->enumeratorNames( true );
+ TQMetaObject * mo = obj->metaObject();
+ TQStrList enumList = mo->enumeratorNames( true );
- for ( QStrListIterator iter( enumList ); iter.current(); ++iter ) {
+ for ( TQStrListIterator iter( enumList ); iter.current(); ++iter ) {
const QMetaEnum *me = mo->enumerator( iter.current(), true );
for ( uint i = 0 ; i < me->count ; i++ ) {
- QCString 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.
- QMetaObject * mo = obj->metaObject();
- QStrList slotList( mo->slotNames( true ) );
- for ( QStrListIterator 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 QCString &name, KJS::ExecState *exec, KJS::Object &object ) {
+ void JSObjectProxy::addSlotBinding( const TQCString &name, KJS::ExecState *exec, KJS::Object &object ) {
// Lookup and bind slot
- QMetaObject * 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 ;
- QCString jsname = name;
+ TQCString jsname = name;
jsname.detach();
- jsname.replace( QRegExp( "\\([^\\)]*\\)" ), "" );
+ jsname.replace( TQRegExp( "\\([^\\)]*\\)" ), "" );
// Find the return type, we only care if it is a pointer type
const QUMethod *m = md->method;
const char *retclass = 0;
- QCString ptr( "ptr" );
+ TQCString ptr( "ptr" );
if ( m->count && ( m->parameters->inOut == QUParameter::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
- QString s( name );
- QCString cs = QString( "%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 ) );
}