diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
commit | 479f5f799523bffbcc83dff581a2299c047c6fff (patch) | |
tree | 186aae707ed02aac6c7cab2fb14e97f72aca5e36 /kjsembed/slotutils.cpp | |
parent | f1dbff6145c98324ff82e34448b7483727e8ace4 (diff) | |
download | tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjsembed/slotutils.cpp')
-rw-r--r-- | kjsembed/slotutils.cpp | 270 |
1 files changed, 135 insertions, 135 deletions
diff --git a/kjsembed/slotutils.cpp b/kjsembed/slotutils.cpp index 58670e21..217d97a0 100644 --- a/kjsembed/slotutils.cpp +++ b/kjsembed/slotutils.cpp @@ -17,19 +17,19 @@ * Boston, MA 02110-1301, USA. */ -#include <qobject.h> -#include <qobjectlist.h> -#include <qdialog.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qmetaobject.h> -#include <qregexp.h> -#include <qsignal.h> -#include <qstrlist.h> -#include <qtimer.h> -#include <qvariant.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqdialog.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqmetaobject.h> +#include <tqregexp.h> +#include <tqsignal.h> +#include <tqstrlist.h> +#include <tqtimer.h> +#include <tqvariant.h> +#include <tqdatetime.h> +#include <tqstringlist.h> #include <private/qucom_p.h> #include <private/qucomextra_p.h> @@ -69,33 +69,33 @@ JSSlotUtils::~JSSlotUtils() { } -bool JSSlotUtils::connect( QObject *sender, const char *sig, QObject *recv, const char *dest ) +bool JSSlotUtils::connect( TQObject *sender, const char *sig, TQObject *recv, const char *dest ) { if ( (!sender) || (!recv) ) return false; // Source - QString si = QString("2%1").arg(sig); + TQString si = TQString("2%1").arg(sig); const char *sigc = si.ascii(); // Connect to slot if ( recv->metaObject()->findSlot(dest, true) >= 0 ) { - QString sl = QString("1%1").arg(dest); + TQString sl = TQString("1%1").arg(dest); const char *slotc = sl.ascii(); //kdDebug(80001) << "connect: "<<sender->name()<<" "<<sigc<<", slot "<<recv->name()<<" "<<slotc<< endl; - bool ok = QObject::connect( sender, sigc, recv, slotc ); + bool ok = TQObject::connect( sender, sigc, recv, slotc ); if (ok) return true; } // Connect to signal if ( recv->metaObject()->findSignal(dest, true) >= 0 ) { - QString si2 = QString("2%1").arg(dest); + TQString si2 = TQString("2%1").arg(dest); const char *sig2c = si2.ascii(); kdDebug(80001) << "connect: "<<sender->name()<<" "<<sigc<<", sig "<<recv->name()<<" "<<sig2c<< endl; - bool ok = QObject::connect( sender, sigc, recv, sig2c ); + bool ok = TQObject::connect( sender, sigc, recv, sig2c ); if (ok) return true; } @@ -104,8 +104,8 @@ bool JSSlotUtils::connect( QObject *sender, const char *sig, QObject *recv, cons } KJS::Boolean JSSlotUtils::disconnect( KJS::ExecState */*exec*/, KJS::Object &/*self*/, - QObject *sender, const char *sig, - QObject *recv, const char *dest ) + TQObject *sender, const char *sig, + TQObject *recv, const char *dest ) { if ( (!sender) || (!recv) ) return KJS::Boolean(false); @@ -113,28 +113,28 @@ KJS::Boolean JSSlotUtils::disconnect( KJS::ExecState */*exec*/, KJS::Object &/*s bool ok; // Source - QString si = QString("2%1").arg(sig); + TQString si = TQString("2%1").arg(sig); const char *sigc = si.ascii(); // Disconnect from slot if ( recv->metaObject()->findSlot(dest, true) >= 0 ) { - QString sl = QString("1%1").arg(dest); + TQString sl = TQString("1%1").arg(dest); const char *slotc = sl.ascii(); //kdDebug(80001) << "disconnect: "<<sender->name()<<" "<<sigc<<", slot "<<recv->name()<<" "<<slotc<< endl; - ok = QObject::disconnect( sender, sigc, recv, slotc ); + ok = TQObject::disconnect( sender, sigc, recv, slotc ); if (ok) return KJS::Boolean(ok); } // Disonnect to signal if ( recv->metaObject()->findSignal(dest, true) >= 0 ) { - QString si2("2"); + TQString si2("2"); si2 = si2 + dest; const char *sig2c = si2.ascii(); //kdDebug(80001)<< "disconnect: "<<sender->name()<<" "<<sigc<<", sig "<<recv->name()<<" "<<sig2c<< endl; - ok = QObject::disconnect( sender, sigc, recv, sig2c ); + ok = TQObject::disconnect( sender, sigc, recv, sig2c ); if (ok) return KJS::Boolean(ok); } @@ -144,7 +144,7 @@ KJS::Boolean JSSlotUtils::disconnect( KJS::ExecState */*exec*/, KJS::Object &/*s KJS::Value JSSlotUtils::extractValue( KJS::ExecState *exec, QUObject *uo, JSObjectProxy *parent ) { - QCString typenm( uo->type->desc() ); + TQCString typenm( uo->type->desc() ); kdDebug(80001) << "JSSlotUtils:extractValue() " << typenm << endl; if ( typenm == "null" ) @@ -157,22 +157,22 @@ KJS::Value JSSlotUtils::extractValue( KJS::ExecState *exec, QUObject *uo, JSObje return KJS::Number( static_QUType_double.get(uo) ); else if ( typenm == "charstar" ) return KJS::String( static_QUType_charstar.get(uo) ); - else if ( typenm == "QString" ) + else if ( typenm == "TQString" ) return KJS::String( static_QUType_QString.get(uo) ); - else if ( typenm == "QVariant" ) + else if ( typenm == "TQVariant" ) return convertToValue( exec, static_QUType_QVariant.get(uo) ); else if ( typenm == "ptr" ) { void *ptr = static_QUType_ptr.get(uo); - // If it's a QObject and we know the parent + // If it's a TQObject and we know the parent if ( ptr && parent ) { - QObject *qobj = (QObject *)(ptr); // Crash in kst + TQObject *qobj = (TQObject *)(ptr); // Crash in kst return parent->part()->factory()->createProxy( exec, qobj, parent); } } kdWarning(80001) << "JSSlotUtils:extractValue() Failed (" << typenm << ")" << endl; - QString msg = i18n( "Value of type (%1) is not supported." ).arg( typenm ); + TQString msg = i18n( "Value of type (%1) is not supported." ).arg( typenm ); throwError(exec, msg,KJS::TypeError); return KJS::Null(); } @@ -213,18 +213,18 @@ void JSSlotUtils::implantCString( KJS::ExecState *exec, QUObject *uo, const KJS: void JSSlotUtils::implantURL( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v,KURL *url ) { - *url = QString( v.toString(exec).qstring() ); + *url = TQString( v.toString(exec).qstring() ); static_QUType_ptr.set( uo, url ); } -void JSSlotUtils::implantColor( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QColor *color ) +void JSSlotUtils::implantColor( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQColor *color ) { bool ok; - QString s( v.toString(exec).qstring() ); + TQString s( v.toString(exec).qstring() ); if ( s.startsWith("#") ) { - QRegExp re("#([0-9a-f][0-9a-f]){3,4}"); + TQRegExp re("#([0-9a-f][0-9a-f]){3,4}"); re.setCaseSensitive( false ); if ( re.search(s) != -1 ) { @@ -233,7 +233,7 @@ void JSSlotUtils::implantColor( KJS::ExecState *exec, QUObject *uo, const KJS::V uint b = re.cap(3).toUInt(&ok, 16); if ( re.numCaptures() == 3 ) - *color = QColor(r,g,b); + *color = TQColor(r,g,b); else if ( re.numCaptures() == 4 ) { uint a = re.cap(4).toUInt(&ok, 16); uint pix = r; @@ -244,20 +244,20 @@ void JSSlotUtils::implantColor( KJS::ExecState *exec, QUObject *uo, const KJS::V pix = pix << 8; pix = pix | a; - *color = QColor( qRgba(r,g,b,a), pix ); + *color = TQColor( qRgba(r,g,b,a), pix ); } } } else { // Try for a named color - *color = QColor( s ); + *color = TQColor( s ); } static_QUType_ptr.set( uo, color ); } -void JSSlotUtils::implantPoint( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QPoint *point ) +void JSSlotUtils::implantPoint( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQPoint *point ) { KJS::Object o = v.toObject( exec ); if ( !o.isValid() ) @@ -277,11 +277,11 @@ void JSSlotUtils::implantPoint( KJS::ExecState *exec, QUObject *uo, const KJS::V else return; - *point = QPoint( x, y ); + *point = TQPoint( x, y ); static_QUType_ptr.set( uo, point ); } -void JSSlotUtils::implantSize( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QSize *size ) +void JSSlotUtils::implantSize( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQSize *size ) { KJS::Object o = v.toObject( exec ); if ( !o.isValid() ) @@ -301,11 +301,11 @@ void JSSlotUtils::implantSize( KJS::ExecState *exec, QUObject *uo, const KJS::Va else return; - *size = QSize( w, h ); + *size = TQSize( w, h ); static_QUType_ptr.set( uo, size ); } -void JSSlotUtils::implantRect( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QRect *rect ) +void JSSlotUtils::implantRect( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQRect *rect ) { KJS::Object o = v.toObject( exec ); if ( !o.isValid() ) @@ -332,39 +332,39 @@ void JSSlotUtils::implantRect( KJS::ExecState *exec, QUObject *uo, const KJS::Va else return; - *rect = QRect( x, y, w, h ); + *rect = TQRect( x, y, w, h ); static_QUType_ptr.set( uo, rect ); } -void JSSlotUtils::implantDate( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QDate *date ) +void JSSlotUtils::implantDate( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQDate *date ) { - QDateTime jsDate = convertDateToDateTime(exec, v); + TQDateTime jsDate = convertDateToDateTime(exec, v); date->setYMD( jsDate.date().year(), jsDate.date().month(), jsDate.date().day() ); static_QUType_ptr.set( uo, date ); } -void JSSlotUtils::implantStringList(KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QStringList *lst ) +void JSSlotUtils::implantStringList(KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQStringList *lst ) { *lst = convertArrayToStringList(exec,v); static_QUType_ptr.set(uo,lst); } -void JSSlotUtils::implantTime( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QTime *time ) +void JSSlotUtils::implantTime( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQTime *time ) { - QDateTime jsDate = convertDateToDateTime(exec, v); + TQDateTime jsDate = convertDateToDateTime(exec, v); time->setHMS( jsDate.time().hour(), jsDate.time().minute(), jsDate.time().second() ); static_QUType_ptr.set( uo, time ); } -void JSSlotUtils::implantDateTime( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QDateTime *datetime ) +void JSSlotUtils::implantDateTime( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQDateTime *datetime ) { - QDateTime jsDate = convertDateToDateTime(exec, v); + TQDateTime jsDate = convertDateToDateTime(exec, v); datetime->setDate( jsDate.date() ); datetime->setTime( jsDate.time() ); static_QUType_ptr.set( uo, datetime ); } -void JSSlotUtils::implantPixmap( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, QPixmap *pix ) +void JSSlotUtils::implantPixmap( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQPixmap *pix ) { *pix = convertToVariant(exec, v).toPixmap() ; static_QUType_ptr.set( uo, pix ); @@ -382,7 +382,7 @@ bool JSSlotUtils::implantQVariant( KJS::ExecState *, QUObject *uo, const KJS::Va } bool JSSlotUtils::implantValueProxy( KJS::ExecState *, QUObject *uo, - const KJS::Value &val, const QString &clazz ) + const KJS::Value &val, const TQString &clazz ) { JSValueProxy *prx = JSProxy::toValueProxy( val.imp() ); if ( !prx ) @@ -391,14 +391,14 @@ bool JSSlotUtils::implantValueProxy( KJS::ExecState *, QUObject *uo, return false; kdDebug(80001) << "We got a " << prx->typeName() << " and is valid " << prx->toVariant().isValid() << endl; - QVariant var = prx->toVariant(); + TQVariant var = prx->toVariant(); kdDebug(80001) << "We got a " << var.typeName()<< " and is valid " << var.isValid() << endl; static_QUType_QVariant.set( uo, var ); return var.isValid(); } bool JSSlotUtils::implantOpaqueProxy( KJS::ExecState *, QUObject *uo, - const KJS::Value &v, const QString &clazz ) + const KJS::Value &v, const TQString &clazz ) { JSOpaqueProxy *prx = JSProxy::toOpaqueProxy( v.imp() ); if ( !prx ) @@ -411,7 +411,7 @@ bool JSSlotUtils::implantOpaqueProxy( KJS::ExecState *, QUObject *uo, } bool JSSlotUtils::implantObjectProxy( KJS::ExecState *, QUObject *uo, - const KJS::Value &v, const QString &clazz ) + const KJS::Value &v, const TQString &clazz ) { JSObjectProxy *prx = JSProxy::toObjectProxy( v.imp() ); if ( !prx ) @@ -424,7 +424,7 @@ bool JSSlotUtils::implantObjectProxy( KJS::ExecState *, QUObject *uo, return true; } -int JSSlotUtils::findSignature( const QString &sig ) +int JSSlotUtils::findSignature( const TQString &sig ) { // No args if ( sig.contains("()") ) @@ -444,46 +444,46 @@ int JSSlotUtils::findSignature( const QString &sig ) else if ( sig.contains("(double)") ) return SignatureDouble; - else if ( sig.contains("(const QString&)") ) + else if ( sig.contains("(const TQString&)") ) return SignatureString; - else if ( sig.contains("(const QCString&)") ) + else if ( sig.contains("(const TQCString&)") ) return SignatureCString; else if ( sig.contains("(const char*)") ) return SignatureCString; else if ( sig.contains("(const KURL&)") ) return SignatureURL; - else if ( sig.contains("(const QColor&)") ) + else if ( sig.contains("(const TQColor&)") ) return SignatureColor; - else if ( sig.contains("(const QPoint&)") ) + else if ( sig.contains("(const TQPoint&)") ) return SignaturePoint; - else if ( sig.contains("(const QRect&)") ) + else if ( sig.contains("(const TQRect&)") ) return SignatureRect; - else if ( sig.contains("(const QSize&)") ) + else if ( sig.contains("(const TQSize&)") ) return SignatureSize; - else if ( sig.contains("(const QPixmap&)") ) + else if ( sig.contains("(const TQPixmap&)") ) return SignaturePixmap; - else if ( sig.contains("(const QFont&)") ) + else if ( sig.contains("(const TQFont&)") ) return SignatureFont; - else if ( sig.contains("(const QDate&)") ) + else if ( sig.contains("(const TQDate&)") ) return SignatureDate; - else if ( sig.contains("(const QTime&)") ) + else if ( sig.contains("(const TQTime&)") ) return SignatureTime; - else if ( sig.contains("(const QDateTime&)") ) + else if ( sig.contains("(const TQDateTime&)") ) return SignatureDateTime; - else if ( sig.contains("(const QImage&)") ) + else if ( sig.contains("(const TQImage&)") ) return SignatureImage; - else if ( sig.contains("(QWidget*)") ) + else if ( sig.contains("(TQWidget*)") ) return SignatureQWidget; // Two args - else if ( sig.contains("(const QDate&, const QDate&)") ) + else if ( sig.contains("(const TQDate&, const TQDate&)") ) return SignatureDateDate; - else if ( sig.contains("(const QColor&, const QString&)") ) + else if ( sig.contains("(const TQColor&, const TQString&)") ) return SignatureColorString; - else if ( sig.contains("(const QString&,const QString&,const QString&)") ) + else if ( sig.contains("(const TQString&,const TQString&,const TQString&)") ) return SignatureStringStringString; - else if ( sig.contains("(const QString&,const QString&)") ) + else if ( sig.contains("(const TQString&,const TQString&)") ) return SignatureStringString; else if ( sig.contains("(int,int)") ) return SignatureIntInt; @@ -494,57 +494,57 @@ int JSSlotUtils::findSignature( const QString &sig ) else if ( sig.contains("(int,int,int,int,bool)") ) return SignatureIntIntIntIntBool; - else if ( sig.contains("(const QString&,int)") ) + else if ( sig.contains("(const TQString&,int)") ) return SignatureStringInt; - else if ( sig.contains("(const QString&,uint)") ) + else if ( sig.contains("(const TQString&,uint)") ) return SignatureStringInt; else if ( sig.contains("(const KURL&,const KURL&)") ) return SignatureURLURL; - else if ( sig.contains("(const KURL&,const QString&)") ) + else if ( sig.contains("(const KURL&,const TQString&)") ) return SignatureURLString; - else if ( sig.contains("(const QString&,const KURL&)") ) + else if ( sig.contains("(const TQString&,const KURL&)") ) return SignatureStringURL; - else if ( sig.contains("(const QRect&,bool)") ) + else if ( sig.contains("(const TQRect&,bool)") ) return SignatureRectBool; - else if ( sig.contains("(const QString&,bool)") ) + else if ( sig.contains("(const TQString&,bool)") ) return SignatureStringBool; else if ( sig.contains("(int,bool)") ) return SignatureIntBool; else if ( sig.contains("(int,int,bool)") ) return SignatureIntIntBool; - else if ( sig.contains("(int,int,const QString&)") ) + else if ( sig.contains("(int,int,const TQString&)") ) return SignatureIntIntString; - else if ( sig.contains("(const QString&,bool,int)") ) + else if ( sig.contains("(const TQString&,bool,int)") ) return SignatureStringBoolInt; - else if ( sig.contains("(const QString&,bool,bool)") ) + else if ( sig.contains("(const TQString&,bool,bool)") ) return SignatureStringBoolBool; - else if ( sig.contains("(const QString&,int,int)") ) + else if ( sig.contains("(const TQString&,int,int)") ) return SignatureStringIntInt; - else if ( sig.contains("(int,const QColor&,bool)") ) + else if ( sig.contains("(int,const TQColor&,bool)") ) return SignatureIntColorBool; - else if ( sig.contains("(int,const QColor&)") ) + else if ( sig.contains("(int,const TQColor&)") ) return SignatureIntColor; else if ( sig.contains("(int,int,float,float)") ) return SignatureIntIntFloatFloat; - else if ( sig.contains("(const QString&,bool,bool,bool)") ) + else if ( sig.contains("(const TQString&,bool,bool,bool)") ) return SignatureStringBoolBoolBool; else if ( sig.contains("(int,int,int,int,int,int)") ) return SignatureIntIntIntIntIntInt; // Handle anything that falls through - if ( sig.contains("QString") || sig.contains("QColor") || + if ( sig.contains("TQString") || sig.contains("TQColor") || sig.contains("int") || sig.contains("bool") || sig.contains("float") || sig.contains("KURL") || - sig.contains("QVariant") || sig.contains("QSize") || - sig.contains("QRect") || sig.contains("QPixmap") || - sig.contains("QCString") || sig.contains("QPoint") || - sig.contains("double") || sig.contains("QFont") || - sig.contains("QDate") || sig.contains("QTime") || - sig.contains("QDateTime") || sig.contains("QStringList") || - sig.contains("QWidget") || sig.contains("QObject") || - sig.contains("QPen") || sig.contains("QImage") ) + sig.contains("TQVariant") || sig.contains("TQSize") || + sig.contains("TQRect") || sig.contains("TQPixmap") || + sig.contains("TQCString") || sig.contains("TQPoint") || + sig.contains("double") || sig.contains("TQFont") || + sig.contains("TQDate") || sig.contains("TQTime") || + sig.contains("TQDateTime") || sig.contains("TQStringList") || + sig.contains("TQWidget") || sig.contains("TQObject") || + sig.contains("TQPen") || sig.contains("TQImage") ) return SignatureCustom; kdWarning(80001) << "findSignature: not supported type " << sig << endl; @@ -563,34 +563,34 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K KJS::Value retValue; JSObjectProxy *proxy = proxyimp->objectProxy(); - QCString slotname( proxyimp->slotName() ); + TQCString slotname( proxyimp->slotName() ); int sigid = proxyimp->signature(); - QPtrList<uint> uintlist; + TQPtrList<uint> uintlist; uintlist.setAutoDelete(true); - QObject *obj = proxy->object(); + TQObject *obj = proxy->object(); int slotid = obj->metaObject()->findSlot( slotname, true ); if ( slotid == -1 ) { - QString msg = i18n( "Slot %1 was not found." ).arg( slotname ); + TQString msg = i18n( "Slot %1 was not found." ).arg( slotname ); return throwError(exec, msg,KJS::ReferenceError); } if ( args.size() > MAX_SUPPORTED_ARGS ) { - QString msg = i18n( "Slots with more than %1 arguments are not supported." ).arg( MAX_SUPPORTED_ARGS ); + TQString msg = i18n( "Slots with more than %1 arguments are not supported." ).arg( MAX_SUPPORTED_ARGS ); return throwError(exec, msg,KJS::ReferenceError); } // Keep args in scope for duration of the method. KURL url[MAX_SUPPORTED_ARGS]; - QColor color[MAX_SUPPORTED_ARGS]; - QPoint point[MAX_SUPPORTED_ARGS]; - QSize size[MAX_SUPPORTED_ARGS]; - QRect rect[MAX_SUPPORTED_ARGS]; - QDate date[MAX_SUPPORTED_ARGS]; - QDateTime datetime[MAX_SUPPORTED_ARGS]; - QTime time[MAX_SUPPORTED_ARGS]; - QPixmap pix[MAX_SUPPORTED_ARGS]; - QStringList slst[MAX_SUPPORTED_ARGS]; + TQColor color[MAX_SUPPORTED_ARGS]; + TQPoint point[MAX_SUPPORTED_ARGS]; + TQSize size[MAX_SUPPORTED_ARGS]; + TQRect rect[MAX_SUPPORTED_ARGS]; + TQDate date[MAX_SUPPORTED_ARGS]; + TQDateTime datetime[MAX_SUPPORTED_ARGS]; + TQTime time[MAX_SUPPORTED_ARGS]; + TQPixmap pix[MAX_SUPPORTED_ARGS]; + TQStringList slst[MAX_SUPPORTED_ARGS]; bool notsupported = true; @@ -735,17 +735,17 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K notsupported = false; int argsStart = slotname.find('('); int argsEnd = slotname.find(')'); - QString fargs = slotname.mid( argsStart+1, argsEnd-argsStart-1 ); + TQString fargs = slotname.mid( argsStart+1, argsEnd-argsStart-1 ); // Iterate over the parameters - QStringList argList = QStringList::split(',', fargs, true); + TQStringList argList = TQStringList::split(',', fargs, true); uint count = QMIN( argList.count(), MAX_SUPPORTED_ARGS ); kdDebug( 80001 ) << "======== arg count " << count << endl; for( uint idx = 0; idx < count; idx++ ) { kdDebug( 80001 ) << "======== Handling arg " << idx << endl; - QString arg = argList[idx]; + TQString arg = argList[idx]; arg = arg.replace("const", ""); arg = arg.replace("&", ""); arg = arg.simplifyWhiteSpace(); @@ -761,40 +761,40 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K implantInt( exec, uo+1+idx, args[idx] ); else if ( arg.contains("double") == 1 ) implantDouble(exec, uo+1+idx, args[idx]); - else if ( arg.contains("QStringList") == 1 ) + else if ( arg.contains("TQStringList") == 1 ) implantStringList( exec, uo+1+idx, args[idx], &slst[idx] ); - else if ( arg.contains("QString") == 1 ) + else if ( arg.contains("TQString") == 1 ) implantQString(exec, uo+1+idx, args[idx] ); - else if ( arg.contains("QCString") == 1 ) + else if ( arg.contains("TQCString") == 1 ) implantCString(exec, uo+1+idx, args[idx] ); else if ( arg.contains("bool") == 1 ) implantBool( exec, uo+1+idx, args[idx] ); else if ( arg.contains("KURL") == 1 ) implantURL( exec, uo+1+idx, args[idx], &url[idx] ); - else if ( arg.contains("QColor") == 1 ) + else if ( arg.contains("TQColor") == 1 ) implantColor( exec, uo+1+idx, args[idx], &color[idx] ); - else if ( arg.contains("QPoint") == 1 ) + else if ( arg.contains("TQPoint") == 1 ) implantPoint( exec, uo+1+idx, args[idx], &point[idx] ); - else if ( arg.contains("QSize") == 1 ) + else if ( arg.contains("TQSize") == 1 ) implantSize( exec, uo+1+idx, args[idx], &size[idx] ); - else if ( arg.contains("QRect") == 1 ) + else if ( arg.contains("TQRect") == 1 ) implantRect( exec, uo+1+idx, args[idx], &rect[idx] ); - else if ( arg.contains("QDate") == 1 ) + else if ( arg.contains("TQDate") == 1 ) implantDate( exec, uo+1+idx, args[idx], &date[idx] ); - else if ( arg.contains("QTime") == 1 ) + else if ( arg.contains("TQTime") == 1 ) implantTime( exec, uo+1+idx, args[idx], &time[idx] ); - else if ( arg.contains("QDateTime") == 1 ) + else if ( arg.contains("TQDateTime") == 1 ) implantDateTime( exec, uo+1+idx, args[idx], &datetime[idx] ); - else if ( arg.contains("QPixmap") == 1 ) + else if ( arg.contains("TQPixmap") == 1 ) implantPixmap( exec, uo+1+idx, args[idx], &pix[idx] ); else if ( arg.contains("char") == 1) implantCharStar( exec, uo+1+idx, args[idx] ); - else if ( ( arg.contains("QObject") == 1 ) || ( arg.contains("QWidget") == 1 ) ) + else if ( ( arg.contains("TQObject") == 1 ) || ( arg.contains("TQWidget") == 1 ) ) { - kdDebug( 80001 ) << "Doing a QObject" << endl; - notsupported = !implantObjectProxy( exec, uo+1+idx, args[idx], "QObject" ); + kdDebug( 80001 ) << "Doing a TQObject" << endl; + notsupported = !implantObjectProxy( exec, uo+1+idx, args[idx], "TQObject" ); } - else if ( QVariant::nameToType(arg.latin1()) != QVariant::Invalid ) { + else if ( TQVariant::nameToType(arg.latin1()) != TQVariant::Invalid ) { bool ok = implantValueProxy( exec, uo+1+idx, args[idx], arg ); if ( !ok ) { notsupported = true; @@ -805,15 +805,15 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K kdDebug( 80001 ) << "Implanted the variant " << static_QUType_QVariant.get(uo+1+idx).isValid() << endl; } } - /* else if ( ( arg.contains("QVariant") == 1 ) || - ( arg.contains("QPen") == 1 ) || (arg.contains("QFont") == 1 ) || - ( arg.contains("QBrush") == 1 )) + /* else if ( ( arg.contains("TQVariant") == 1 ) || + ( arg.contains("TQPen") == 1 ) || (arg.contains("TQFont") == 1 ) || + ( arg.contains("TQBrush") == 1 )) if(!implantQVariant(exec, uo+1+idx, args[idx] )){ notsupported = true; break; } */ else if ( arg.contains("*") == 1 ) { - QRegExp re("(\\w+)\\*"); + TQRegExp re("(\\w+)\\*"); if ( re.search(arg) >= 0 ) { bool ok = implantObjectProxy( exec, uo+1+idx, args[idx], re.cap(1) ); if ( !ok ) { @@ -844,7 +844,7 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K obj->qt_invoke( slotid, uo ); } // Handle return types - QCString ret( proxyimp->returnType() ); + TQCString ret( proxyimp->returnType() ); if ( ret.isEmpty() ) { // Basic type (void, int etc.) return extractValue( exec, uo ); @@ -854,7 +854,7 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K kdDebug(80001) << "Handling a pointer return of type " << ret << endl; if ( proxy->part()->factory()->isQObject(ret) ) { - kdDebug(80001) << "Return type is QObject " << ret << endl; + kdDebug(80001) << "Return type is TQObject " << ret << endl; return extractValue( exec, uo, proxy ); } |