summaryrefslogtreecommitdiff
path: root/qmake/tools/qucom.cpp
Side-by-side diff
Diffstat (limited to 'qmake/tools/qucom.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/tools/qucom.cpp136
1 files changed, 6 insertions, 130 deletions
diff --git a/qmake/tools/qucom.cpp b/qmake/tools/qucom.cpp
index 6086a79..658da97 100644
--- a/qmake/tools/qucom.cpp
+++ b/qmake/tools/qucom.cpp
@@ -296,8 +296,7 @@ void QUType_int::set( QUObject *o, int v )
bool QUType_int::canConvertFrom( QUObject *o, QUType *t )
{
- if ( isEqual( t, &static_QUType_double ) ||
- isEqual( t, &static_QUType_float ) )
+ if ( isEqual( t, &static_QUType_double ) )
return TRUE;
return t->canConvertTo( o, this );
@@ -305,16 +304,13 @@ bool QUType_int::canConvertFrom( QUObject *o, QUType *t )
bool QUType_int::canConvertTo( QUObject * /*o*/, QUType *t )
{
- return isEqual( t, &static_QUType_double ) ||
- isEqual( t, &static_QUType_float );
+ return isEqual( t, &static_QUType_double );
}
bool QUType_int::convertFrom( QUObject *o, QUType *t )
{
if ( isEqual( t, &static_QUType_double ) )
o->payload.i = (long)o->payload.d;
- else if ( isEqual( t, &static_QUType_float ) )
- o->payload.i = (long)o->payload.f;
else
return t->convertTo( o, this );
@@ -327,9 +323,6 @@ bool QUType_int::convertTo( QUObject *o, QUType *t )
if ( isEqual( t, &static_QUType_double ) ) {
o->payload.d = (double)o->payload.i;
o->type = &static_QUType_double;
- } else if ( isEqual( t, &static_QUType_float ) ) {
- o->payload.f = (float)o->payload.i;
- o->type = &static_QUType_float;
} else
return FALSE;
return TRUE;
@@ -345,48 +338,6 @@ int QUType_int::serializeFrom( QUObject *, QUBuffer * )
return 0;
}
-// {5938712A-C496-11D5-8CB2-00C0F03BC0F3}
-const QUuid TID_QUType_uint( 0x5938712a, 0xc496, 0x11d5, 0x8c, 0xb2, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3);
-QUType_uint static_QUType_uint;
-const QUuid *QUType_uint::uuid() const { return &TID_QUType_uint; }
-const char *QUType_uint::desc() const { return "uint"; }
-
-void QUType_uint::set( QUObject *o, uint v )
-{
- o->payload.ui = v;
- o->type = this;
-}
-
-bool QUType_uint::canConvertFrom( QUObject *o, QUType *t )
-{
- return t->canConvertTo( o, this );
-}
-
-bool QUType_uint::canConvertTo( QUObject * /*o*/, QUType * /*t*/ )
-{
- return FALSE;
-}
-
-bool QUType_uint::convertFrom( QUObject *o, QUType *t )
-{
- return t->convertTo( o, this );
-}
-
-bool QUType_uint::convertTo( QUObject * /*o*/, QUType * /*t*/ )
-{
- return FALSE;
-}
-
-int QUType_uint::serializeTo( QUObject *, QUBuffer * )
-{
- return 0;
-}
-
-int QUType_uint::serializeFrom( QUObject *, QUBuffer * )
-{
- return 0;
-}
-
// {2D0974E5-0BA6-4ec2-8837-C198972CB48C}
const QUuid TID_QUType_double( 0x2d0974e5, 0xba6, 0x4ec2, 0x88, 0x37, 0xc1, 0x98, 0x97, 0x2c, 0xb4, 0x8c );
QUType_double static_QUType_double;
@@ -401,8 +352,7 @@ void QUType_double::set( QUObject *o, double v )
bool QUType_double::canConvertFrom( QUObject *o, QUType *t )
{
- if ( isEqual( t, &static_QUType_int ) ||
- isEqual( t, &static_QUType_float) )
+ if ( isEqual( t, &static_QUType_int ) )
return TRUE;
return t->canConvertTo( o, this );
@@ -410,17 +360,14 @@ bool QUType_double::canConvertFrom( QUObject *o, QUType *t )
bool QUType_double::canConvertTo( QUObject * /*o*/, QUType *t )
{
- return isEqual( t, &static_QUType_int ) ||
- isEqual( t, &static_QUType_float );
+ return isEqual( t, &static_QUType_int );
}
bool QUType_double::convertFrom( QUObject *o, QUType *t )
{
if ( isEqual( t, &static_QUType_int ) )
o->payload.d = (double)o->payload.i;
- else if ( isEqual( t, &static_QUType_float ) )
- o->payload.d = (double)o->payload.f;
- else
+ else
return t->convertTo( o, this );
o->type = this;
@@ -450,70 +397,6 @@ int QUType_double::serializeFrom( QUObject *, QUBuffer * )
return 0;
}
-
-// {544C5175-6993-4486-B04D-CEC4D21BF4B9 }
-const QUuid TID_QUType_float( 0x544c5175, 0x6993, 0x4486, 0xb0, 0x4d, 0xce, 0xc4, 0xd2, 0x1b, 0xf4, 0xb9 );
-QUType_float static_QUType_float;
-const QUuid *QUType_float::uuid() const { return &TID_QUType_float; }
-const char *QUType_float::desc() const {return "float"; }
-
-void QUType_float::set( QUObject *o, float v )
-{
- o->payload.f = v;
- o->type = this;
-}
-
-bool QUType_float::canConvertFrom( QUObject *o, QUType *t )
-{
- if ( isEqual( t, &static_QUType_int ) ||
- isEqual( t, &static_QUType_double ) )
- return TRUE;
-
- return t->canConvertTo( o, this );
-}
-
-bool QUType_float::canConvertTo( QUObject * /*o*/, QUType *t )
-{
- return isEqual( t, &static_QUType_int ) ||
- isEqual( t, &static_QUType_double );
-}
-
-bool QUType_float::convertFrom( QUObject *o, QUType *t )
-{
- if ( isEqual( t, &static_QUType_int ) )
- o->payload.f = (float)o->payload.i;
- else if ( isEqual( t, &static_QUType_double ) )
- o->payload.f = (float)o->payload.d;
- else
- return t->convertTo( o, this );
-
- o->type = this;
- return TRUE;
-}
-
-bool QUType_float::convertTo( QUObject *o, QUType *t )
-{
- if ( isEqual( t, &static_QUType_int ) ) {
- o->payload.i = (int) o->payload.f;
- o->type = &static_QUType_int;
- } else if ( isEqual( t, &static_QUType_double ) ) {
- o->payload.d = (double) o->payload.f;
- o->type = &static_QUType_double;
- } else
- return FALSE;
- return TRUE;
-}
-
-int QUType_float::serializeTo( QUObject *, QUBuffer * )
-{
- return 0;
-}
-
-int QUType_float::serializeFrom( QUObject *, QUBuffer * )
-{
- return 0;
-}
-
// {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9}
const QUuid TID_QUType_charstar( 0xefcdd1d4, 0x77a3, 0x4b8e, 0x8d, 0x46, 0xdc, 0x14, 0xb8, 0xd3, 0x93, 0xe9 );
QUType_charstar static_QUType_charstar;
@@ -593,7 +476,6 @@ bool QUType_QString::canConvertFrom( QUObject *o, QUType *t )
{
if ( isEqual( t, &static_QUType_charstar ) ||
isEqual( t, &static_QUType_double ) ||
- isEqual( t, &static_QUType_float ) ||
isEqual( t, &static_QUType_int ) )
return TRUE;
@@ -604,8 +486,7 @@ bool QUType_QString::canConvertTo( QUObject * /*o*/, QUType *t )
{
return isEqual( t, &static_QUType_charstar ) ||
isEqual( t, &static_QUType_int ) ||
- isEqual( t, &static_QUType_double ) ||
- isEqual( t, &static_QUType_float );
+ isEqual( t, &static_QUType_double );
}
bool QUType_QString::convertFrom( QUObject *o, QUType *t )
@@ -615,8 +496,6 @@ bool QUType_QString::convertFrom( QUObject *o, QUType *t )
str = new QString( o->payload.charstar.ptr );
else if ( isEqual( t, &static_QUType_double ) )
str = new QString( QString::number( o->payload.d ) );
- else if ( isEqual( t, &static_QUType_float ) )
- str = new QString( QString::number( o->payload.f ) );
else if ( isEqual( t, &static_QUType_int ) )
str = new QString( QString::number( o->payload.i ) );
else
@@ -641,9 +520,6 @@ bool QUType_QString::convertTo( QUObject *o, QUType *t )
} else if ( isEqual( t, &static_QUType_double ) ) {
o->payload.d = str->toDouble();
o->type = &static_QUType_double;
- } else if ( isEqual( t, &static_QUType_float ) ) {
- o->payload.d = str->toFloat();
- o->type = &static_QUType_float;
} else {
return FALSE;
}