summaryrefslogtreecommitdiffstats
path: root/kjsembed/slotutils.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /kjsembed/slotutils.cpp
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'kjsembed/slotutils.cpp')
-rw-r--r--kjsembed/slotutils.cpp322
1 files changed, 161 insertions, 161 deletions
diff --git a/kjsembed/slotutils.cpp b/kjsembed/slotutils.cpp
index 217d97a0..7f429ace 100644
--- a/kjsembed/slotutils.cpp
+++ b/kjsembed/slotutils.cpp
@@ -69,33 +69,33 @@ JSSlotUtils::~JSSlotUtils()
{
}
-bool JSSlotUtils::connect( TQObject *sender, const char *sig, TQObject *recv, const char *dest )
+bool JSSlotUtils::connect( TTQObject *sender, const char *sig, TTQObject *recv, const char *dest )
{
if ( (!sender) || (!recv) )
return false;
// Source
- TQString si = TQString("2%1").arg(sig);
+ TTQString si = TTQString("2%1").arg(sig);
const char *sigc = si.ascii();
// Connect to slot
if ( recv->metaObject()->findSlot(dest, true) >= 0 ) {
- TQString sl = TQString("1%1").arg(dest);
+ TTQString sl = TTQString("1%1").arg(dest);
const char *slotc = sl.ascii();
//kdDebug(80001) << "connect: "<<sender->name()<<" "<<sigc<<", slot "<<recv->name()<<" "<<slotc<< endl;
- bool ok = TQObject::connect( sender, sigc, recv, slotc );
+ bool ok = TTQObject::connect( sender, sigc, recv, slotc );
if (ok)
return true;
}
// Connect to signal
if ( recv->metaObject()->findSignal(dest, true) >= 0 ) {
- TQString si2 = TQString("2%1").arg(dest);
+ TTQString si2 = TTQString("2%1").arg(dest);
const char *sig2c = si2.ascii();
kdDebug(80001) << "connect: "<<sender->name()<<" "<<sigc<<", sig "<<recv->name()<<" "<<sig2c<< endl;
- bool ok = TQObject::connect( sender, sigc, recv, sig2c );
+ bool ok = TTQObject::connect( sender, sigc, recv, sig2c );
if (ok)
return true;
}
@@ -104,8 +104,8 @@ bool JSSlotUtils::connect( TQObject *sender, const char *sig, TQObject *recv, co
}
KJS::Boolean JSSlotUtils::disconnect( KJS::ExecState */*exec*/, KJS::Object &/*self*/,
- TQObject *sender, const char *sig,
- TQObject *recv, const char *dest )
+ TTQObject *sender, const char *sig,
+ TTQObject *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
- TQString si = TQString("2%1").arg(sig);
+ TTQString si = TTQString("2%1").arg(sig);
const char *sigc = si.ascii();
// Disconnect from slot
if ( recv->metaObject()->findSlot(dest, true) >= 0 ) {
- TQString sl = TQString("1%1").arg(dest);
+ TTQString sl = TTQString("1%1").arg(dest);
const char *slotc = sl.ascii();
//kdDebug(80001) << "disconnect: "<<sender->name()<<" "<<sigc<<", slot "<<recv->name()<<" "<<slotc<< endl;
- ok = TQObject::disconnect( sender, sigc, recv, slotc );
+ ok = TTQObject::disconnect( sender, sigc, recv, slotc );
if (ok)
return KJS::Boolean(ok);
}
// Disonnect to signal
if ( recv->metaObject()->findSignal(dest, true) >= 0 ) {
- TQString si2("2");
+ TTQString si2("2");
si2 = si2 + dest;
const char *sig2c = si2.ascii();
//kdDebug(80001)<< "disconnect: "<<sender->name()<<" "<<sigc<<", sig "<<recv->name()<<" "<<sig2c<< endl;
- ok = TQObject::disconnect( sender, sigc, recv, sig2c );
+ ok = TTQObject::disconnect( sender, sigc, recv, sig2c );
if (ok)
return KJS::Boolean(ok);
}
@@ -142,9 +142,9 @@ KJS::Boolean JSSlotUtils::disconnect( KJS::ExecState */*exec*/, KJS::Object &/*s
return KJS::Boolean(false);
}
-KJS::Value JSSlotUtils::extractValue( KJS::ExecState *exec, QUObject *uo, JSObjectProxy *parent )
+KJS::Value JSSlotUtils::extractValue( KJS::ExecState *exec, TQUObject *uo, JSObjectProxy *parent )
{
- TQCString typenm( uo->type->desc() );
+ TTQCString typenm( uo->type->desc() );
kdDebug(80001) << "JSSlotUtils:extractValue() " << typenm << endl;
if ( typenm == "null" )
@@ -157,74 +157,74 @@ 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 == "TQString" )
- return KJS::String( static_QUType_QString.get(uo) );
- else if ( typenm == "TQVariant" )
- return convertToValue( exec, static_QUType_QVariant.get(uo) );
+ else if ( typenm == "TTQString" )
+ return KJS::String( static_QUType_TQString.get(uo) );
+ else if ( typenm == "TTQVariant" )
+ return convertToValue( exec, static_QUType_TQVariant.get(uo) );
else if ( typenm == "ptr" ) {
void *ptr = static_QUType_ptr.get(uo);
- // If it's a TQObject and we know the parent
+ // If it's a TTQObject and we know the parent
if ( ptr && parent ) {
- TQObject *qobj = (TQObject *)(ptr); // Crash in kst
+ TTQObject *qobj = (TTQObject *)(ptr); // Crash in kst
return parent->part()->factory()->createProxy( exec, qobj, parent);
}
}
kdWarning(80001) << "JSSlotUtils:extractValue() Failed (" << typenm << ")" << endl;
- TQString msg = i18n( "Value of type (%1) is not supported." ).arg( typenm );
+ TTQString msg = i18n( "Value of type (%1) is not supported." ).arg( typenm );
throwError(exec, msg,KJS::TypeError);
return KJS::Null();
}
//
-// Add a value to a QUObject.
+// Add a value to a TQUObject.
//
-void JSSlotUtils::implantInt( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantInt( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
static_QUType_int.set( uo, v.toInteger( exec ) );
}
-void JSSlotUtils::implantCharStar( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantCharStar( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
static_QUType_charstar.set( uo, v.toString( exec ).ascii() );
}
-void JSSlotUtils::implantBool( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantBool( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
static_QUType_bool.set( uo, v.toBoolean( exec ) );
}
-void JSSlotUtils::implantDouble( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantDouble( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
static_QUType_double.set( uo, v.toNumber( exec ) );
}
-void JSSlotUtils::implantQString( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantTQString( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
- static_QUType_QString.set( uo, v.toString(exec).qstring() );
+ static_QUType_TQString.set( uo, v.toString(exec).qstring() );
}
-void JSSlotUtils::implantCString( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v )
+void JSSlotUtils::implantCString( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v )
{
static_QUType_charstar.set( uo, v.toString(exec).ascii() );
}
-void JSSlotUtils::implantURL( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v,KURL *url )
+void JSSlotUtils::implantURL( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v,KURL *url )
{
- *url = TQString( v.toString(exec).qstring() );
+ *url = TTQString( v.toString(exec).qstring() );
static_QUType_ptr.set( uo, url );
}
-void JSSlotUtils::implantColor( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQColor *color )
+void JSSlotUtils::implantColor( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQColor *color )
{
bool ok;
- TQString s( v.toString(exec).qstring() );
+ TTQString s( v.toString(exec).qstring() );
if ( s.startsWith("#") ) {
- TQRegExp re("#([0-9a-f][0-9a-f]){3,4}");
+ TTQRegExp 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 = TQColor(r,g,b);
+ *color = TTQColor(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 = TQColor( qRgba(r,g,b,a), pix );
+ *color = TTQColor( qRgba(r,g,b,a), pix );
}
}
}
else {
// Try for a named color
- *color = TQColor( s );
+ *color = TTQColor( s );
}
static_QUType_ptr.set( uo, color );
}
-void JSSlotUtils::implantPoint( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQPoint *point )
+void JSSlotUtils::implantPoint( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQPoint *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 = TQPoint( x, y );
+ *point = TTQPoint( x, y );
static_QUType_ptr.set( uo, point );
}
-void JSSlotUtils::implantSize( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQSize *size )
+void JSSlotUtils::implantSize( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQSize *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 = TQSize( w, h );
+ *size = TTQSize( w, h );
static_QUType_ptr.set( uo, size );
}
-void JSSlotUtils::implantRect( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQRect *rect )
+void JSSlotUtils::implantRect( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQRect *rect )
{
KJS::Object o = v.toObject( exec );
if ( !o.isValid() )
@@ -332,57 +332,57 @@ void JSSlotUtils::implantRect( KJS::ExecState *exec, QUObject *uo, const KJS::Va
else
return;
- *rect = TQRect( x, y, w, h );
+ *rect = TTQRect( x, y, w, h );
static_QUType_ptr.set( uo, rect );
}
-void JSSlotUtils::implantDate( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQDate *date )
+void JSSlotUtils::implantDate( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQDate *date )
{
- TQDateTime jsDate = convertDateToDateTime(exec, v);
+ TTQDateTime 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, TQStringList *lst )
+void JSSlotUtils::implantStringList(KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQStringList *lst )
{
*lst = convertArrayToStringList(exec,v);
static_QUType_ptr.set(uo,lst);
}
-void JSSlotUtils::implantTime( KJS::ExecState *exec, QUObject *uo, const KJS::Value &v, TQTime *time )
+void JSSlotUtils::implantTime( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQTime *time )
{
- TQDateTime jsDate = convertDateToDateTime(exec, v);
+ TTQDateTime 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, TQDateTime *datetime )
+void JSSlotUtils::implantDateTime( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQDateTime *datetime )
{
- TQDateTime jsDate = convertDateToDateTime(exec, v);
+ TTQDateTime 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, TQPixmap *pix )
+void JSSlotUtils::implantPixmap( KJS::ExecState *exec, TQUObject *uo, const KJS::Value &v, TTQPixmap *pix )
{
*pix = convertToVariant(exec, v).toPixmap() ;
static_QUType_ptr.set( uo, pix );
}
-bool JSSlotUtils::implantQVariant( KJS::ExecState *, QUObject *uo, const KJS::Value &v)
+bool JSSlotUtils::implantTQVariant( KJS::ExecState *, TQUObject *uo, const KJS::Value &v)
{
JSValueProxy *prx = JSProxy::toValueProxy( v.imp() );
if ( !prx )
return false;
kdDebug(80001) << "We got a " << prx->typeName() << endl;
- static_QUType_QVariant.set( uo, prx->toVariant() );
+ static_QUType_TQVariant.set( uo, prx->toVariant() );
return true;
}
-bool JSSlotUtils::implantValueProxy( KJS::ExecState *, QUObject *uo,
- const KJS::Value &val, const TQString &clazz )
+bool JSSlotUtils::implantValueProxy( KJS::ExecState *, TQUObject *uo,
+ const KJS::Value &val, const TTQString &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;
- TQVariant var = prx->toVariant();
+ TTQVariant var = prx->toVariant();
kdDebug(80001) << "We got a " << var.typeName()<< " and is valid " << var.isValid() << endl;
- static_QUType_QVariant.set( uo, var );
+ static_QUType_TQVariant.set( uo, var );
return var.isValid();
}
-bool JSSlotUtils::implantOpaqueProxy( KJS::ExecState *, QUObject *uo,
- const KJS::Value &v, const TQString &clazz )
+bool JSSlotUtils::implantOpaqueProxy( KJS::ExecState *, TQUObject *uo,
+ const KJS::Value &v, const TTQString &clazz )
{
JSOpaqueProxy *prx = JSProxy::toOpaqueProxy( v.imp() );
if ( !prx )
@@ -410,8 +410,8 @@ bool JSSlotUtils::implantOpaqueProxy( KJS::ExecState *, QUObject *uo,
return true;
}
-bool JSSlotUtils::implantObjectProxy( KJS::ExecState *, QUObject *uo,
- const KJS::Value &v, const TQString &clazz )
+bool JSSlotUtils::implantObjectProxy( KJS::ExecState *, TQUObject *uo,
+ const KJS::Value &v, const TTQString &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 TQString &sig )
+int JSSlotUtils::findSignature( const TTQString &sig )
{
// No args
if ( sig.contains("()") )
@@ -444,46 +444,46 @@ int JSSlotUtils::findSignature( const TQString &sig )
else if ( sig.contains("(double)") )
return SignatureDouble;
- else if ( sig.contains("(const TQString&)") )
+ else if ( sig.contains("(const TTQString&)") )
return SignatureString;
- else if ( sig.contains("(const TQCString&)") )
+ else if ( sig.contains("(const TTQCString&)") )
return SignatureCString;
else if ( sig.contains("(const char*)") )
return SignatureCString;
else if ( sig.contains("(const KURL&)") )
return SignatureURL;
- else if ( sig.contains("(const TQColor&)") )
+ else if ( sig.contains("(const TTQColor&)") )
return SignatureColor;
- else if ( sig.contains("(const TQPoint&)") )
+ else if ( sig.contains("(const TTQPoint&)") )
return SignaturePoint;
- else if ( sig.contains("(const TQRect&)") )
+ else if ( sig.contains("(const TTQRect&)") )
return SignatureRect;
- else if ( sig.contains("(const TQSize&)") )
+ else if ( sig.contains("(const TTQSize&)") )
return SignatureSize;
- else if ( sig.contains("(const TQPixmap&)") )
+ else if ( sig.contains("(const TTQPixmap&)") )
return SignaturePixmap;
- else if ( sig.contains("(const TQFont&)") )
+ else if ( sig.contains("(const TTQFont&)") )
return SignatureFont;
- else if ( sig.contains("(const TQDate&)") )
+ else if ( sig.contains("(const TTQDate&)") )
return SignatureDate;
- else if ( sig.contains("(const TQTime&)") )
+ else if ( sig.contains("(const TTQTime&)") )
return SignatureTime;
- else if ( sig.contains("(const TQDateTime&)") )
+ else if ( sig.contains("(const TTQDateTime&)") )
return SignatureDateTime;
- else if ( sig.contains("(const TQImage&)") )
+ else if ( sig.contains("(const TTQImage&)") )
return SignatureImage;
- else if ( sig.contains("(TQWidget*)") )
- return SignatureQWidget;
+ else if ( sig.contains("(TTQWidget*)") )
+ return SignatureTQWidget;
// Two args
- else if ( sig.contains("(const TQDate&, const TQDate&)") )
+ else if ( sig.contains("(const TTQDate&, const TTQDate&)") )
return SignatureDateDate;
- else if ( sig.contains("(const TQColor&, const TQString&)") )
+ else if ( sig.contains("(const TTQColor&, const TTQString&)") )
return SignatureColorString;
- else if ( sig.contains("(const TQString&,const TQString&,const TQString&)") )
+ else if ( sig.contains("(const TTQString&,const TTQString&,const TTQString&)") )
return SignatureStringStringString;
- else if ( sig.contains("(const TQString&,const TQString&)") )
+ else if ( sig.contains("(const TTQString&,const TTQString&)") )
return SignatureStringString;
else if ( sig.contains("(int,int)") )
return SignatureIntInt;
@@ -494,57 +494,57 @@ int JSSlotUtils::findSignature( const TQString &sig )
else if ( sig.contains("(int,int,int,int,bool)") )
return SignatureIntIntIntIntBool;
- else if ( sig.contains("(const TQString&,int)") )
+ else if ( sig.contains("(const TTQString&,int)") )
return SignatureStringInt;
- else if ( sig.contains("(const TQString&,uint)") )
+ else if ( sig.contains("(const TTQString&,uint)") )
return SignatureStringInt;
else if ( sig.contains("(const KURL&,const KURL&)") )
return SignatureURLURL;
- else if ( sig.contains("(const KURL&,const TQString&)") )
+ else if ( sig.contains("(const KURL&,const TTQString&)") )
return SignatureURLString;
- else if ( sig.contains("(const TQString&,const KURL&)") )
+ else if ( sig.contains("(const TTQString&,const KURL&)") )
return SignatureStringURL;
- else if ( sig.contains("(const TQRect&,bool)") )
+ else if ( sig.contains("(const TTQRect&,bool)") )
return SignatureRectBool;
- else if ( sig.contains("(const TQString&,bool)") )
+ else if ( sig.contains("(const TTQString&,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 TQString&)") )
+ else if ( sig.contains("(int,int,const TTQString&)") )
return SignatureIntIntString;
- else if ( sig.contains("(const TQString&,bool,int)") )
+ else if ( sig.contains("(const TTQString&,bool,int)") )
return SignatureStringBoolInt;
- else if ( sig.contains("(const TQString&,bool,bool)") )
+ else if ( sig.contains("(const TTQString&,bool,bool)") )
return SignatureStringBoolBool;
- else if ( sig.contains("(const TQString&,int,int)") )
+ else if ( sig.contains("(const TTQString&,int,int)") )
return SignatureStringIntInt;
- else if ( sig.contains("(int,const TQColor&,bool)") )
+ else if ( sig.contains("(int,const TTQColor&,bool)") )
return SignatureIntColorBool;
- else if ( sig.contains("(int,const TQColor&)") )
+ else if ( sig.contains("(int,const TTQColor&)") )
return SignatureIntColor;
else if ( sig.contains("(int,int,float,float)") )
return SignatureIntIntFloatFloat;
- else if ( sig.contains("(const TQString&,bool,bool,bool)") )
+ else if ( sig.contains("(const TTQString&,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("TQString") || sig.contains("TQColor") ||
+ if ( sig.contains("TTQString") || sig.contains("TTQColor") ||
sig.contains("int") || sig.contains("bool") ||
sig.contains("float") || sig.contains("KURL") ||
- 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") )
+ sig.contains("TTQVariant") || sig.contains("TTQSize") ||
+ sig.contains("TTQRect") || sig.contains("TTQPixmap") ||
+ sig.contains("TTQCString") || sig.contains("TTQPoint") ||
+ sig.contains("double") || sig.contains("TTQFont") ||
+ sig.contains("TTQDate") || sig.contains("TTQTime") ||
+ sig.contains("TTQDateTime") || sig.contains("TTQStringList") ||
+ sig.contains("TTQWidget") || sig.contains("TTQObject") ||
+ sig.contains("TTQPen") || sig.contains("TTQImage") )
return SignatureCustom;
kdWarning(80001) << "findSignature: not supported type " << sig << endl;
@@ -556,41 +556,41 @@ int JSSlotUtils::findSignature( const TQString &sig )
KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const KJS::List &args,
JSObjectProxyImp *proxyimp )
{
- QUObject uo[ MAX_SUPPORTED_ARGS ] = { QUObject(), QUObject(), QUObject(),
- QUObject(), QUObject(), QUObject(),
- QUObject(), QUObject(), QUObject(),
- QUObject(), QUObject(), QUObject() };
+ TQUObject uo[ MAX_SUPPORTED_ARGS ] = { TQUObject(), TQUObject(), TQUObject(),
+ TQUObject(), TQUObject(), TQUObject(),
+ TQUObject(), TQUObject(), TQUObject(),
+ TQUObject(), TQUObject(), TQUObject() };
KJS::Value retValue;
JSObjectProxy *proxy = proxyimp->objectProxy();
- TQCString slotname( proxyimp->slotName() );
+ TTQCString slotname( proxyimp->slotName() );
int sigid = proxyimp->signature();
- TQPtrList<uint> uintlist;
+ TTQPtrList<uint> uintlist;
uintlist.setAutoDelete(true);
- TQObject *obj = proxy->object();
+ TTQObject *obj = proxy->object();
int slotid = obj->metaObject()->findSlot( slotname, true );
if ( slotid == -1 )
{
- TQString msg = i18n( "Slot %1 was not found." ).arg( slotname );
+ TTQString msg = i18n( "Slot %1 was not found." ).arg( slotname );
return throwError(exec, msg,KJS::ReferenceError);
}
if ( args.size() > MAX_SUPPORTED_ARGS )
{
- TQString msg = i18n( "Slots with more than %1 arguments are not supported." ).arg( MAX_SUPPORTED_ARGS );
+ TTQString 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];
- 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];
+ TTQColor color[MAX_SUPPORTED_ARGS];
+ TTQPoint point[MAX_SUPPORTED_ARGS];
+ TTQSize size[MAX_SUPPORTED_ARGS];
+ TTQRect rect[MAX_SUPPORTED_ARGS];
+ TTQDate date[MAX_SUPPORTED_ARGS];
+ TTQDateTime datetime[MAX_SUPPORTED_ARGS];
+ TTQTime time[MAX_SUPPORTED_ARGS];
+ TTQPixmap pix[MAX_SUPPORTED_ARGS];
+ TTQStringList slst[MAX_SUPPORTED_ARGS];
bool notsupported = true;
@@ -604,7 +604,7 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
implantBool( exec, uo+1, args[0] );
break;
case SignatureString:
- implantQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+1, args[0] );
break;
case SignatureCString:
implantCString( exec, uo+1, args[0] );
@@ -640,7 +640,7 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
implantInt( exec, uo+2, args[1] );
break;
case SignatureStringInt:
- implantQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+1, args[0] );
implantInt( exec, uo+2, args[1] );
break;
case SignatureRectBool:
@@ -648,11 +648,11 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
implantBool( exec, uo+2, args[1] );
break;
case SignatureStringString:
- implantQString( exec, uo+1, args[0] );
- implantQString( exec, uo+2, args[1] );
+ implantTQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+2, args[1] );
break;
case SignatureStringBool:
- implantQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+1, args[0] );
implantBool( exec, uo+2, args[1] );
break;
case SignatureIntColor:
@@ -665,10 +665,10 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
break;
case SignatureURLString:
implantURL( exec, uo+1, args[0], &url[0] );
- implantQString( exec, uo+2, args[1] );
+ implantTQString( exec, uo+2, args[1] );
break;
case SignatureStringURL:
- implantQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+1, args[0] );
implantURL( exec, uo+2, args[1], &url[0] );
break;
@@ -686,16 +686,16 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
case SignatureStringStringString:
if ( args.size() != 3 )
return KJS::Null();
- implantQString( exec, uo+1, args[0] );
- implantQString( exec, uo+2, args[1] );
- implantQString( exec, uo+3, args[2] );
+ implantTQString( exec, uo+1, args[0] );
+ implantTQString( exec, uo+2, args[1] );
+ implantTQString( exec, uo+3, args[2] );
break;
case SignatureIntIntString:
if ( args.size() != 3 )
return KJS::Null();
implantInt( exec, uo+1, args[0] );
implantInt( exec, uo+2, args[1] );
- implantQString( exec, uo+3, args[2] );
+ implantTQString( exec, uo+3, args[2] );
break;
case SignatureIntIntIntInt:
if ( args.size() != 4 )
@@ -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(')');
- TQString fargs = slotname.mid( argsStart+1, argsEnd-argsStart-1 );
+ TTQString fargs = slotname.mid( argsStart+1, argsEnd-argsStart-1 );
// Iterate over the parameters
- TQStringList argList = TQStringList::split(',', fargs, true);
- uint count = QMIN( argList.count(), MAX_SUPPORTED_ARGS );
+ TTQStringList argList = TTQStringList::split(',', fargs, true);
+ uint count = TQMIN( argList.count(), MAX_SUPPORTED_ARGS );
kdDebug( 80001 ) << "======== arg count " << count << endl;
for( uint idx = 0; idx < count; idx++ ) {
kdDebug( 80001 ) << "======== Handling arg " << idx << endl;
- TQString arg = argList[idx];
+ TTQString 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("TQStringList") == 1 )
+ else if ( arg.contains("TTQStringList") == 1 )
implantStringList( exec, uo+1+idx, args[idx], &slst[idx] );
- else if ( arg.contains("TQString") == 1 )
- implantQString(exec, uo+1+idx, args[idx] );
- else if ( arg.contains("TQCString") == 1 )
+ else if ( arg.contains("TTQString") == 1 )
+ implantTQString(exec, uo+1+idx, args[idx] );
+ else if ( arg.contains("TTQCString") == 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("TQColor") == 1 )
+ else if ( arg.contains("TTQColor") == 1 )
implantColor( exec, uo+1+idx, args[idx], &color[idx] );
- else if ( arg.contains("TQPoint") == 1 )
+ else if ( arg.contains("TTQPoint") == 1 )
implantPoint( exec, uo+1+idx, args[idx], &point[idx] );
- else if ( arg.contains("TQSize") == 1 )
+ else if ( arg.contains("TTQSize") == 1 )
implantSize( exec, uo+1+idx, args[idx], &size[idx] );
- else if ( arg.contains("TQRect") == 1 )
+ else if ( arg.contains("TTQRect") == 1 )
implantRect( exec, uo+1+idx, args[idx], &rect[idx] );
- else if ( arg.contains("TQDate") == 1 )
+ else if ( arg.contains("TTQDate") == 1 )
implantDate( exec, uo+1+idx, args[idx], &date[idx] );
- else if ( arg.contains("TQTime") == 1 )
+ else if ( arg.contains("TTQTime") == 1 )
implantTime( exec, uo+1+idx, args[idx], &time[idx] );
- else if ( arg.contains("TQDateTime") == 1 )
+ else if ( arg.contains("TTQDateTime") == 1 )
implantDateTime( exec, uo+1+idx, args[idx], &datetime[idx] );
- else if ( arg.contains("TQPixmap") == 1 )
+ else if ( arg.contains("TTQPixmap") == 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("TQObject") == 1 ) || ( arg.contains("TQWidget") == 1 ) )
+ else if ( ( arg.contains("TTQObject") == 1 ) || ( arg.contains("TTQWidget") == 1 ) )
{
- kdDebug( 80001 ) << "Doing a TQObject" << endl;
- notsupported = !implantObjectProxy( exec, uo+1+idx, args[idx], "TQObject" );
+ kdDebug( 80001 ) << "Doing a TTQObject" << endl;
+ notsupported = !implantObjectProxy( exec, uo+1+idx, args[idx], "TTQObject" );
}
- else if ( TQVariant::nameToType(arg.latin1()) != TQVariant::Invalid ) {
+ else if ( TTQVariant::nameToType(arg.latin1()) != TTQVariant::Invalid ) {
bool ok = implantValueProxy( exec, uo+1+idx, args[idx], arg );
if ( !ok ) {
notsupported = true;
@@ -802,18 +802,18 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
}
else
{
- kdDebug( 80001 ) << "Implanted the variant " << static_QUType_QVariant.get(uo+1+idx).isValid() << endl;
+ kdDebug( 80001 ) << "Implanted the variant " << static_QUType_TQVariant.get(uo+1+idx).isValid() << endl;
}
}
- /* 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] )){
+ /* else if ( ( arg.contains("TTQVariant") == 1 ) ||
+ ( arg.contains("TTQPen") == 1 ) || (arg.contains("TTQFont") == 1 ) ||
+ ( arg.contains("TTQBrush") == 1 ))
+ if(!implantTQVariant(exec, uo+1+idx, args[idx] )){
notsupported = true;
break;
} */
else if ( arg.contains("*") == 1 ) {
- TQRegExp re("(\\w+)\\*");
+ TTQRegExp 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
- TQCString ret( proxyimp->returnType() );
+ TTQCString ret( proxyimp->returnType() );
if ( ret.isEmpty() ) {
// Basic type (void, int etc.)
return extractValue( exec, uo );
@@ -853,8 +853,8 @@ KJS::Value JSSlotUtils::invokeSlot( KJS::ExecState *exec, KJS::Object &, const K
// Object type
kdDebug(80001) << "Handling a pointer return of type " << ret << endl;
- if ( proxy->part()->factory()->isQObject(ret) ) {
- kdDebug(80001) << "Return type is TQObject " << ret << endl;
+ if ( proxy->part()->factory()->isTQObject(ret) ) {
+ kdDebug(80001) << "Return type is TTQObject " << ret << endl;
return extractValue( exec, uo, proxy );
}