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_imp.cpp | |
parent | 67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff) | |
download | tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip |
Fix incorrect conversion
Diffstat (limited to 'kjsembed/jsobjectproxy_imp.cpp')
-rw-r--r-- | kjsembed/jsobjectproxy_imp.cpp | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/kjsembed/jsobjectproxy_imp.cpp b/kjsembed/jsobjectproxy_imp.cpp index 5e11e2c3..5d025bf3 100644 --- a/kjsembed/jsobjectproxy_imp.cpp +++ b/kjsembed/jsobjectproxy_imp.cpp @@ -129,19 +129,19 @@ JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, int mid, JSObjectProxy } JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, - int mid, const TTQCString &name, JSObjectProxy *parent ) + int mid, const TQCString &name, JSObjectProxy *parent ) : JSProxyImp(exec), id(mid), slotname(name), proxy(parent), obj(parent->obj) { } JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, - int mid, int sid, const TTQCString &name, JSObjectProxy *parent ) + int mid, int sid, const TQCString &name, JSObjectProxy *parent ) : JSProxyImp(exec), id(mid), sigid(sid), slotname(name), proxy(parent), obj(parent->obj) { } JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, - int mid, const char *ret, int sid, const TTQCString &name, + int mid, const char *ret, int sid, const TQCString &name, JSObjectProxy *parent ) : JSProxyImp(exec), id(mid), rettype(ret), sigid(sid), slotname(name), proxy(parent), obj(parent->obj) { @@ -154,14 +154,14 @@ JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, KJS::Value JSObjectProxyImp::children( KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { KJS::List items; - const TTQObjectList *kids = obj->children(); + const TQObjectList *kids = obj->children(); if ( kids ) { - TTQObjectList l( *kids ); + TQObjectList l( *kids ); for ( uint i = 0 ; i < l.count() ; i++ ) { - TTQObject *child = l.at( i ); - TTQCString nm = ( child ? child->name() : "<null>" ); - items.append( KJS::String( TTQString(nm) ) ); + TQObject *child = l.at( i ); + TQCString nm = ( child ? child->name() : "<null>" ); + items.append( KJS::String( TQString(nm) ) ); } } @@ -171,15 +171,15 @@ KJS::Value JSObjectProxyImp::children( KJS::ExecState *exec, KJS::Object &, cons KJS::Value JSObjectProxyImp::properties( KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { KJS::List items; - TTQMetaObject *mo = obj->metaObject(); - TTQStrList propList( mo->propertyNames( true ) ); + TQMetaObject *mo = obj->metaObject(); + TQStrList propList( mo->propertyNames( true ) ); - for ( TTQStrListIterator iter(propList); iter.current(); ++iter ) { + for ( TQStrListIterator iter(propList); iter.current(); ++iter ) { - TTQCString name = iter.current(); + TQCString name = iter.current(); int propid = mo->findProperty( name.data(), true ); if ( propid != -1 ) { - items.append( KJS::String( TTQString(name) ) ); + items.append( KJS::String( TQString(name) ) ); } } @@ -215,7 +215,7 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons switch( id ) { case MethodParent: { - TTQObject *po = obj->parent(); + TQObject *po = obj->parent(); if ( po && proxy->securityPolicy()->isObjectAllowed( proxy, po ) ) return proxy->part()->factory()->createProxy( exec, po, proxy ); @@ -224,7 +224,7 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons break; case MethodChildCount: { - const TTQObjectList *kids = obj->children(); + const TQObjectList *kids = obj->children(); return kids ? KJS::Number( kids->count() ) : KJS::Number(0); } break; @@ -295,13 +295,13 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons KJS::Value JSObjectProxyImp::signalz( KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { KJS::List items; - TTQMetaObject *mo = obj->metaObject(); - TTQStrList signalList( mo->signalNames( true ) ); + TQMetaObject *mo = obj->metaObject(); + TQStrList signalList( mo->signalNames( true ) ); - for ( TTQStrListIterator iter(signalList); iter.current(); ++iter ) { + for ( TQStrListIterator iter(signalList); iter.current(); ++iter ) { - TTQCString name = iter.current(); - TTQString nm( name ); + TQCString name = iter.current(); + TQString nm( name ); int signalid = mo->findSignal( name.data(), true ); if ( (signalid != -1) && (mo->signal( signalid, true )->access == TQMetaData::Public) ) @@ -314,13 +314,13 @@ KJS::Value JSObjectProxyImp::signalz( KJS::ExecState *exec, KJS::Object &, const KJS::Value JSObjectProxyImp::slotz( KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { KJS::List items; - TTQMetaObject *mo = obj->metaObject(); - TTQStrList slotList( mo->slotNames( true ) ); + TQMetaObject *mo = obj->metaObject(); + TQStrList slotList( mo->slotNames( true ) ); - for ( TTQStrListIterator iter(slotList); iter.current(); ++iter ) { + for ( TQStrListIterator iter(slotList); iter.current(); ++iter ) { - TTQCString name = iter.current(); - TTQString nm( name ); + TQCString name = iter.current(); + TQString nm( name ); int slotid = mo->findSlot( name.data(), true ); if ( (slotid != -1) && (mo->slot( slotid, true )->access == TQMetaData::Public) ) @@ -341,12 +341,12 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec, // Source object and signal JSObjectProxy *sendproxy = JSProxy::toObjectProxy( args[0].imp() ); - TTQObject *sender = sendproxy ? sendproxy->object() : 0; - TTQString sig = args[1].toString(exec).qstring(); + TQObject *sender = sendproxy ? sendproxy->object() : 0; + TQString sig = args[1].toString(exec).qstring(); kdDebug( 80001 ) << "connecting C++ signal" << sig << endl; // Receiver and slot/signal KJS::Object recvObj; - TTQString dest; + TQString dest; if ( args.size() == 3 ) { recvObj = self.toObject(exec); dest = args[2].toString(exec).qstring(); @@ -359,7 +359,7 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec, // Try to connect to C++ slot JSObjectProxy *recvproxy = JSProxy::toObjectProxy( recvObj.imp() ); if ( recvproxy ) { - TTQObject *recv = recvproxy ? recvproxy->object() : 0; + TQObject *recv = recvproxy ? recvproxy->object() : 0; bool ok = JSSlotUtils::connect( sender, sig.ascii(), recv, dest.ascii() ); if ( ok ) return KJS::Boolean(true); @@ -368,8 +368,8 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec, return connect( sender, sig.ascii(), recvObj, dest ); } -KJS::Boolean JSObjectProxyImp::connect( TTQObject *sender, const char *sig, - const KJS::Object &recv, const TTQString &dest ) +KJS::Boolean JSObjectProxyImp::connect( TQObject *sender, const char *sig, + const KJS::Object &recv, const TQString &dest ) { kdDebug(80001) << "Trying signature '" << sig << "'." << endl; // Try to connect to JS method @@ -409,28 +409,28 @@ KJS::Boolean JSObjectProxyImp::connect( TTQObject *sender, const char *sig, ok = JSSlotUtils::connect( sender, sig, slotp, "slot_double(double)" ); break; case JSSlotUtils::SignatureString: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_string(const TTQString&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_string(const TQString&)" ); break; case JSSlotUtils::SignatureCString: ok = JSSlotUtils::connect( sender, sig, slotp, "slot_charstar(const char*)" ); break; case JSSlotUtils::SignatureColor: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_color(const TTQColor&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_color(const TQColor&)" ); break; case JSSlotUtils::SignatureFont: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_font(const TTQFont&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_font(const TQFont&)" ); break; case JSSlotUtils::SignaturePoint: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_point(const TTQPoint&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_point(const TQPoint&)" ); break; case JSSlotUtils::SignatureRect: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_rect(const TTQRect&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_rect(const TQRect&)" ); break; case JSSlotUtils::SignatureSize: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_size(const TTQSize&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_size(const TQSize&)" ); break; case JSSlotUtils::SignaturePixmap: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_pixmap(const TTQPixmap&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_pixmap(const TQPixmap&)" ); break; case JSSlotUtils::SignatureURL: ok = JSSlotUtils::connect( sender, sig, slotp, "slot_url(const KURL&)" ); @@ -446,29 +446,29 @@ KJS::Boolean JSObjectProxyImp::connect( TTQObject *sender, const char *sig, break; case JSSlotUtils::SignatureDate: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_date(const TTQDate&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_date(const TQDate&)" ); break; case JSSlotUtils::SignatureTime: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_time(const TTQTime&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_time(const TQTime&)" ); break; case JSSlotUtils::SignatureDateTime: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datetime(const TTQDateTime&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datetime(const TQDateTime&)" ); break; case JSSlotUtils::SignatureImage: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_image(const TTQImage&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_image(const TQImage&)" ); break; case JSSlotUtils::SignatureTQWidget: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_widget(TTQWidget*)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_widget(TQWidget*)" ); break; case JSSlotUtils::SignatureDateDate: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datedate(const TTQDate&, const TTQDate& )" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datedate(const TQDate&, const TQDate& )" ); break; case JSSlotUtils::SignatureColorString: - ok = JSSlotUtils::connect( sender, sig, slotp, "slot_colorstring(const TTQColor&, const TTQString&)" ); + ok = JSSlotUtils::connect( sender, sig, slotp, "slot_colorstring(const TQColor&, const TQString&)" ); break; case JSSlotUtils::SignatureCustom: { - TTQString mangledSig = sig; + TQString mangledSig = sig; mangledSig.remove(' ') .remove("const") .remove('&') @@ -501,12 +501,12 @@ KJS::Boolean JSObjectProxyImp::disconnect( KJS::ExecState *exec, KJS::Object &se // Source object and signal JSObjectProxy *sendproxy = JSProxy::toObjectProxy( args[0].imp() ); - TTQObject *sender = sendproxy ? sendproxy->object() : 0; - TTQString sig = args[1].toString(exec).qstring(); + TQObject *sender = sendproxy ? sendproxy->object() : 0; + TQString sig = args[1].toString(exec).qstring(); // Receiver and slot/signal - TTQObject *recv=0; - TTQString dest; + TQObject *recv=0; + TQString dest; if ( args.size() == 3 ) { JSObjectProxy *recvproxy = JSProxy::toObjectProxy( self.imp() ); recv = recvproxy ? recvproxy->object() : 0; @@ -530,7 +530,7 @@ KJS::Value JSObjectProxyImp::getParentNode( KJS::ExecState *exec, KJS::Object &, if ( args.size()) return KJS::Null(); - TTQObject *parent = obj->parent(); + TQObject *parent = obj->parent(); if ( parent && proxy->securityPolicy()->isObjectAllowed( proxy, parent ) ) return proxy->part()->factory()->createProxy( exec, parent, proxy ); @@ -542,12 +542,12 @@ KJS::Value JSObjectProxyImp::getElementById( KJS::ExecState *exec, KJS::Object & if ( !args.size() ) return KJS::Null(); - const TTQObjectList *kids = obj->children(); + const TQObjectList *kids = obj->children(); if ( !kids ) return KJS::Null(); - TTQObjectList l( *kids ); - TTQObject *child = 0; + TQObjectList l( *kids ); + TQObject *child = 0; if ( args[0].isA( KJS::NumberType ) ) { uint i = args[0].toUInt32( exec ); @@ -558,7 +558,7 @@ KJS::Value JSObjectProxyImp::getElementById( KJS::ExecState *exec, KJS::Object & child = l.at( i ); } else { - TTQString s = args[0].toString( exec ).qstring(); + TQString s = args[0].toString( exec ).qstring(); child = obj->child( s.ascii() ); } @@ -580,8 +580,8 @@ KJS::Value JSObjectProxyImp::hasAttribute( KJS::ExecState *exec, KJS::Object &, if ( !args.size() ) return KJS::Null(); - TTQMetaObject *meta = obj->metaObject(); - TTQString s = args[0].toString(exec).qstring(); + TQMetaObject *meta = obj->metaObject(); + TQString s = args[0].toString(exec).qstring(); if ( meta->findProperty( s.ascii(), true ) != -1 ) return KJS::Boolean(true); else @@ -592,20 +592,20 @@ KJS::Value JSObjectProxyImp::getAttribute( KJS::ExecState *exec, KJS::Object &, { if ( !args.size() ) { - TTQString msg = i18n( "No property was defined." ); + TQString msg = i18n( "No property was defined." ); return throwError(exec, msg); } - TTQMetaObject *meta = obj->metaObject(); - TTQString s = args[0].toString(exec).qstring(); + TQMetaObject *meta = obj->metaObject(); + TQString s = args[0].toString(exec).qstring(); kdDebug(80001) << "Get property " << s << " from " << obj->name() << endl; if ( meta->findProperty( s.ascii(), true ) == -1 ) { - TTQString msg = i18n( "Property '%1' could not be found." ).arg( s ); + TQString msg = i18n( "Property '%1' could not be found." ).arg( s ); return throwError(exec, msg,KJS::ReferenceError); } - TTQVariant val = obj->property( s.ascii() ); + TQVariant val = obj->property( s.ascii() ); return convertToValue( exec, val ); } @@ -614,16 +614,16 @@ KJS::Value JSObjectProxyImp::setAttribute( KJS::ExecState *exec, KJS::Object &, if ( args.size() != 2 ) return KJS::Boolean(false); - TTQMetaObject *meta = obj->metaObject(); - TTQString s = args[0].toString(exec).qstring(); + TQMetaObject *meta = obj->metaObject(); + TQString s = args[0].toString(exec).qstring(); if ( meta->findProperty( s.ascii(), true ) == -1 ) { - TTQString msg = i18n( "Property '%1' could not be found." ).arg( s ); + TQString msg = i18n( "Property '%1' could not be found." ).arg( s ); return throwError(exec, msg,KJS::GeneralError); } kdDebug(80001) << "Set property " << s << " from " << obj->name() << endl; - TTQVariant val = convertToVariant( exec, args[1] ); + TQVariant val = convertToVariant( exec, args[1] ); bool ok = obj->setProperty( s.ascii(), val ); return KJS::Boolean(ok); |