diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-12 11:09:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-13 10:04:24 +0900 |
commit | 707310036113d2d0ae9da1cc7f85d0e642bf9686 (patch) | |
tree | afa9b616af366f63e0418df74b2287299d8572a3 /dcop/client/marshall.cpp | |
parent | 08eacf589a6ee0358c49f177fca34a29e0515164 (diff) | |
download | tdelibs-707310036113d2d0ae9da1cc7f85d0e642bf9686.tar.gz tdelibs-707310036113d2d0ae9da1cc7f85d0e642bf9686.zip |
Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 36c049e135b0cec7cf97b41888860186813df5f0)
Diffstat (limited to 'dcop/client/marshall.cpp')
-rw-r--r-- | dcop/client/marshall.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp index 68e3e3f57..64c10857d 100644 --- a/dcop/client/marshall.cpp +++ b/dcop/client/marshall.cpp @@ -145,34 +145,34 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) bool b; stream >> b; result = b ? "true" : "false"; - } else if ( type == TQSTRING_OBJECT_NAME_STRING ) + } else if ( type == "TQString" ) { TQString s; stream >> s; result = s.local8Bit(); - } else if ( type == TQCSTRING_OBJECT_NAME_STRING ) + } else if ( type == "TQCString" ) { stream >> result; } else if ( type == "QCStringList" ) { - return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQCSTRING_OBJECT_NAME_STRING ">" ); - } else if ( type == TQSTRINGLIST_OBJECT_NAME_STRING ) + return demarshal( stream, "TQValueList" "<" "TQCString" ">" ); + } else if ( type == "TQStringList" ) { - return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">" ); + return demarshal( stream, "TQValueList" "<" "TQString" ">" ); } else if ( type == "TQStringVariantMap" ) { - return demarshal(stream, TQMAP_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING "," TQVARIANT_OBJECT_NAME_STRING ">"); - } else if ( type == TQCOLOR_OBJECT_NAME_STRING ) + return demarshal(stream, "TQMap" "<" "TQString" "," "TQVariant" ">"); + } else if ( type == "TQColor" ) { TQColor c; stream >> c; result = TQString(c.name()).local8Bit(); - } else if ( type == TQSIZE_OBJECT_NAME_STRING ) + } else if ( type == "TQSize" ) { TQSize s; stream >> s; result.sprintf( "%dx%d", s.width(), s.height() ); - } else if ( type == TQPIXMAP_OBJECT_NAME_STRING || type == TQIMAGE_OBJECT_NAME_STRING ) + } else if ( type == "TQPixmap" || type == "TQImage" ) { TQImage i; stream >> i; @@ -181,17 +181,17 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) buf.open( IO_WriteOnly ); i.save( &buf, "XPM" ); result = buf.buffer(); - } else if ( type == TQPOINT_OBJECT_NAME_STRING ) + } else if ( type == "TQPoint" ) { TQPoint p; stream >> p; result.sprintf( "+%d+%d", p.x(), p.y() ); - } else if ( type == TQRECT_OBJECT_NAME_STRING ) + } else if ( type == "TQRect" ) { TQRect r; stream >> r; result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() ); - } else if ( type == TQVARIANT_OBJECT_NAME_STRING ) + } else if ( type == "TQVariant" ) { TQ_INT32 type; stream >> type; @@ -206,7 +206,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) KURL r; stream >> r; result = r.url().local8Bit(); - } else if ( type.left( 12 ) == TQVALUELIST_OBJECT_NAME_STRING "<" ) + } else if ( type.left( 12 ) == "TQValueList" "<" ) { if ( (uint)type.find( '>', 12 ) != type.length() - 1 ) return result; @@ -228,7 +228,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) if ( i < count - 1 ) result += '\n'; } - } else if ( type.left( 6 ) == TQMAP_OBJECT_NAME_STRING "<" ) + } else if ( type.left( 6 ) == "TQMap" "<" ) { int commaPos = type.find( ',', 6 ); @@ -281,11 +281,11 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type ) } TQString s = TQString::fromLocal8Bit( args[ i ] ); - if (type == TQSTRINGLIST_OBJECT_NAME_STRING) { - type = TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">"; + if (type == "TQStringList") { + type = "TQValueList" "<" "TQString" ">"; } if (type == "QCStringList") { - type = TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">"; + type = "TQValueList" "<" "TQString" ">"; } if ( type == "int" ) @@ -322,52 +322,52 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type ) arg << s.toDouble(); else if ( type == "bool" ) arg << mkBool( s ); - else if ( type == TQSTRING_OBJECT_NAME_STRING ) + else if ( type == "TQString" ) arg << s; - else if ( type == TQCSTRING_OBJECT_NAME_STRING ) + else if ( type == "TQCString" ) arg << TQCString( args[ i ] ); - else if ( type == TQCOLOR_OBJECT_NAME_STRING ) + else if ( type == "TQColor" ) arg << mkColor( s ); - else if ( type == TQPOINT_OBJECT_NAME_STRING ) + else if ( type == "TQPoint" ) arg << mkPoint( s ); - else if ( type == TQSIZE_OBJECT_NAME_STRING ) + else if ( type == "TQSize" ) arg << mkSize( s ); - else if ( type == TQRECT_OBJECT_NAME_STRING ) + else if ( type == "TQRect" ) arg << mkRect( s ); else if ( type == "KURL" ) arg << KURL( s ); - else if ( type == TQVARIANT_OBJECT_NAME_STRING ) { - int tqPointKeywordLength = strlen(TQPOINT_OBJECT_NAME_STRING); - int tqSizeKeywordLength = strlen(TQSIZE_OBJECT_NAME_STRING); - int tqRectKeywordLength = strlen(TQRECT_OBJECT_NAME_STRING); - int tqColorKeywordLength = strlen(TQCOLOR_OBJECT_NAME_STRING); + else if ( type == "TQVariant" ) { + int tqPointKeywordLength = strlen("TQPoint"); + int tqSizeKeywordLength = strlen("TQSize"); + int tqRectKeywordLength = strlen("TQRect"); + int tqColorKeywordLength = strlen("TQColor"); if ( s == "true" || s == "false" ) { arg << TQVariant( mkBool( s ) ); } else if ( s.left( 4 ) == "int(" ) { arg << TQVariant( s.mid(4, s.length()-5).toInt() ); } - else if ( s.left( (tqPointKeywordLength+1) ) == TQPOINT_OBJECT_NAME_STRING "(" ) { + else if ( s.left( (tqPointKeywordLength+1) ) == "TQPoint" "(" ) { arg << TQVariant( mkPoint( s.mid((tqPointKeywordLength+1), s.length()-(tqPointKeywordLength+2)) ) ); } - else if ( s.left( (tqSizeKeywordLength+1) ) == TQSIZE_OBJECT_NAME_STRING "(" ) { + else if ( s.left( (tqSizeKeywordLength+1) ) == "TQSize" "(" ) { arg << TQVariant( mkSize( s.mid((tqSizeKeywordLength+1), s.length()-(tqSizeKeywordLength+2)) ) ); } - else if ( s.left( (tqRectKeywordLength+1) ) == TQRECT_OBJECT_NAME_STRING "(" ) { + else if ( s.left( (tqRectKeywordLength+1) ) == "TQRect" "(" ) { arg << TQVariant( mkRect( s.mid((tqRectKeywordLength+1), s.length()-(tqRectKeywordLength+2)) ) ); } - else if ( s.left( (tqColorKeywordLength+1) ) == TQCOLOR_OBJECT_NAME_STRING "(" ) { + else if ( s.left( (tqColorKeywordLength+1) ) == "TQColor" "(" ) { arg << TQVariant( mkColor( s.mid((tqColorKeywordLength+1), s.length()-(tqColorKeywordLength+2)) ) ); } else { arg << TQVariant( s ); } - } else if ( type.startsWith(TQVALUELIST_OBJECT_NAME_STRING "<") || type == "KURL::List" ) { + } else if ( type.startsWith("TQValueList" "<") || type == "KURL::List" ) { if ( type == "KURL::List" ) { type = "KURL"; } else { - int tqValueListKeywordLength = strlen(TQVALUELIST_OBJECT_NAME_STRING); + int tqValueListKeywordLength = strlen("TQValueList"); type = type.mid((tqValueListKeywordLength+1), type.length() - (tqValueListKeywordLength+2)); } TQStringList list; |