-rw-r--r-- | qmake/tools/qucom.cpp | 136 |
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 | |||
@@ -298,4 +298,3 @@ bool QUType_int::canConvertFrom( QUObject *o, QUType *t ) | |||
298 | { | 298 | { |
299 | if ( isEqual( t, &static_QUType_double ) || | 299 | if ( isEqual( t, &static_QUType_double ) ) |
300 | isEqual( t, &static_QUType_float ) ) | ||
301 | return TRUE; | 300 | return TRUE; |
@@ -307,4 +306,3 @@ bool QUType_int::canConvertTo( QUObject * /*o*/, QUType *t ) | |||
307 | { | 306 | { |
308 | return isEqual( t, &static_QUType_double ) || | 307 | return isEqual( t, &static_QUType_double ); |
309 | isEqual( t, &static_QUType_float ); | ||
310 | } | 308 | } |
@@ -315,4 +313,2 @@ bool QUType_int::convertFrom( QUObject *o, QUType *t ) | |||
315 | o->payload.i = (long)o->payload.d; | 313 | o->payload.i = (long)o->payload.d; |
316 | else if ( isEqual( t, &static_QUType_float ) ) | ||
317 | o->payload.i = (long)o->payload.f; | ||
318 | else | 314 | else |
@@ -329,5 +325,2 @@ bool QUType_int::convertTo( QUObject *o, QUType *t ) | |||
329 | o->type = &static_QUType_double; | 325 | o->type = &static_QUType_double; |
330 | } else if ( isEqual( t, &static_QUType_float ) ) { | ||
331 | o->payload.f = (float)o->payload.i; | ||
332 | o->type = &static_QUType_float; | ||
333 | } else | 326 | } else |
@@ -347,44 +340,2 @@ int QUType_int::serializeFrom( QUObject *, QUBuffer * ) | |||
347 | 340 | ||
348 | // {5938712A-C496-11D5-8CB2-00C0F03BC0F3} | ||
349 | const QUuid TID_QUType_uint( 0x5938712a, 0xc496, 0x11d5, 0x8c, 0xb2, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3); | ||
350 | QUType_uint static_QUType_uint; | ||
351 | const QUuid *QUType_uint::uuid() const { return &TID_QUType_uint; } | ||
352 | const char *QUType_uint::desc() const { return "uint"; } | ||
353 | |||
354 | void QUType_uint::set( QUObject *o, uint v ) | ||
355 | { | ||
356 | o->payload.ui = v; | ||
357 | o->type = this; | ||
358 | } | ||
359 | |||
360 | bool QUType_uint::canConvertFrom( QUObject *o, QUType *t ) | ||
361 | { | ||
362 | return t->canConvertTo( o, this ); | ||
363 | } | ||
364 | |||
365 | bool QUType_uint::canConvertTo( QUObject * /*o*/, QUType * /*t*/ ) | ||
366 | { | ||
367 | return FALSE; | ||
368 | } | ||
369 | |||
370 | bool QUType_uint::convertFrom( QUObject *o, QUType *t ) | ||
371 | { | ||
372 | return t->convertTo( o, this ); | ||
373 | } | ||
374 | |||
375 | bool QUType_uint::convertTo( QUObject * /*o*/, QUType * /*t*/ ) | ||
376 | { | ||
377 | return FALSE; | ||
378 | } | ||
379 | |||
380 | int QUType_uint::serializeTo( QUObject *, QUBuffer * ) | ||
381 | { | ||
382 | return 0; | ||
383 | } | ||
384 | |||
385 | int QUType_uint::serializeFrom( QUObject *, QUBuffer * ) | ||
386 | { | ||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} | 341 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} |
@@ -403,4 +354,3 @@ bool QUType_double::canConvertFrom( QUObject *o, QUType *t ) | |||
403 | { | 354 | { |
404 | if ( isEqual( t, &static_QUType_int ) || | 355 | if ( isEqual( t, &static_QUType_int ) ) |
405 | isEqual( t, &static_QUType_float) ) | ||
406 | return TRUE; | 356 | return TRUE; |
@@ -412,4 +362,3 @@ bool QUType_double::canConvertTo( QUObject * /*o*/, QUType *t ) | |||
412 | { | 362 | { |
413 | return isEqual( t, &static_QUType_int ) || | 363 | return isEqual( t, &static_QUType_int ); |
414 | isEqual( t, &static_QUType_float ); | ||
415 | } | 364 | } |
@@ -420,5 +369,3 @@ bool QUType_double::convertFrom( QUObject *o, QUType *t ) | |||
420 | o->payload.d = (double)o->payload.i; | 369 | o->payload.d = (double)o->payload.i; |
421 | else if ( isEqual( t, &static_QUType_float ) ) | 370 | else |
422 | o->payload.d = (double)o->payload.f; | ||
423 | else | ||
424 | return t->convertTo( o, this ); | 371 | return t->convertTo( o, this ); |
@@ -452,66 +399,2 @@ int QUType_double::serializeFrom( QUObject *, QUBuffer * ) | |||
452 | 399 | ||
453 | |||
454 | // {544C5175-6993-4486-B04D-CEC4D21BF4B9 } | ||
455 | const QUuid TID_QUType_float( 0x544c5175, 0x6993, 0x4486, 0xb0, 0x4d, 0xce, 0xc4, 0xd2, 0x1b, 0xf4, 0xb9 ); | ||
456 | QUType_float static_QUType_float; | ||
457 | const QUuid *QUType_float::uuid() const { return &TID_QUType_float; } | ||
458 | const char *QUType_float::desc() const {return "float"; } | ||
459 | |||
460 | void QUType_float::set( QUObject *o, float v ) | ||
461 | { | ||
462 | o->payload.f = v; | ||
463 | o->type = this; | ||
464 | } | ||
465 | |||
466 | bool QUType_float::canConvertFrom( QUObject *o, QUType *t ) | ||
467 | { | ||
468 | if ( isEqual( t, &static_QUType_int ) || | ||
469 | isEqual( t, &static_QUType_double ) ) | ||
470 | return TRUE; | ||
471 | |||
472 | return t->canConvertTo( o, this ); | ||
473 | } | ||
474 | |||
475 | bool QUType_float::canConvertTo( QUObject * /*o*/, QUType *t ) | ||
476 | { | ||
477 | return isEqual( t, &static_QUType_int ) || | ||
478 | isEqual( t, &static_QUType_double ); | ||
479 | } | ||
480 | |||
481 | bool QUType_float::convertFrom( QUObject *o, QUType *t ) | ||
482 | { | ||
483 | if ( isEqual( t, &static_QUType_int ) ) | ||
484 | o->payload.f = (float)o->payload.i; | ||
485 | else if ( isEqual( t, &static_QUType_double ) ) | ||
486 | o->payload.f = (float)o->payload.d; | ||
487 | else | ||
488 | return t->convertTo( o, this ); | ||
489 | |||
490 | o->type = this; | ||
491 | return TRUE; | ||
492 | } | ||
493 | |||
494 | bool QUType_float::convertTo( QUObject *o, QUType *t ) | ||
495 | { | ||
496 | if ( isEqual( t, &static_QUType_int ) ) { | ||
497 | o->payload.i = (int) o->payload.f; | ||
498 | o->type = &static_QUType_int; | ||
499 | } else if ( isEqual( t, &static_QUType_double ) ) { | ||
500 | o->payload.d = (double) o->payload.f; | ||
501 | o->type = &static_QUType_double; | ||
502 | } else | ||
503 | return FALSE; | ||
504 | return TRUE; | ||
505 | } | ||
506 | |||
507 | int QUType_float::serializeTo( QUObject *, QUBuffer * ) | ||
508 | { | ||
509 | return 0; | ||
510 | } | ||
511 | |||
512 | int QUType_float::serializeFrom( QUObject *, QUBuffer * ) | ||
513 | { | ||
514 | return 0; | ||
515 | } | ||
516 | |||
517 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} | 400 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} |
@@ -595,3 +478,2 @@ bool QUType_QString::canConvertFrom( QUObject *o, QUType *t ) | |||
595 | isEqual( t, &static_QUType_double ) || | 478 | isEqual( t, &static_QUType_double ) || |
596 | isEqual( t, &static_QUType_float ) || | ||
597 | isEqual( t, &static_QUType_int ) ) | 479 | isEqual( t, &static_QUType_int ) ) |
@@ -606,4 +488,3 @@ bool QUType_QString::canConvertTo( QUObject * /*o*/, QUType *t ) | |||
606 | isEqual( t, &static_QUType_int ) || | 488 | isEqual( t, &static_QUType_int ) || |
607 | isEqual( t, &static_QUType_double ) || | 489 | isEqual( t, &static_QUType_double ); |
608 | isEqual( t, &static_QUType_float ); | ||
609 | } | 490 | } |
@@ -617,4 +498,2 @@ bool QUType_QString::convertFrom( QUObject *o, QUType *t ) | |||
617 | str = new QString( QString::number( o->payload.d ) ); | 498 | str = new QString( QString::number( o->payload.d ) ); |
618 | else if ( isEqual( t, &static_QUType_float ) ) | ||
619 | str = new QString( QString::number( o->payload.f ) ); | ||
620 | else if ( isEqual( t, &static_QUType_int ) ) | 499 | else if ( isEqual( t, &static_QUType_int ) ) |
@@ -643,5 +522,2 @@ bool QUType_QString::convertTo( QUObject *o, QUType *t ) | |||
643 | o->type = &static_QUType_double; | 522 | o->type = &static_QUType_double; |
644 | } else if ( isEqual( t, &static_QUType_float ) ) { | ||
645 | o->payload.d = str->toFloat(); | ||
646 | o->type = &static_QUType_float; | ||
647 | } else { | 523 | } else { |