diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-12 11:31:57 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-12 11:31:57 +0900 |
commit | 30555507108fe0b2b3f9ded9de37f38d4a1d9c50 (patch) | |
tree | 679a8ece19669a02cef46213fa85252c297a4aff /kode/kwsdl | |
parent | 0e1649599e9aea4fccb8435fbf74796e0756d282 (diff) | |
download | tdepim-30555507108fe0b2b3f9ded9de37f38d4a1d9c50.tar.gz tdepim-30555507108fe0b2b3f9ded9de37f38d4a1d9c50.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>
Diffstat (limited to 'kode/kwsdl')
-rw-r--r-- | kode/kwsdl/converter.cpp | 16 | ||||
-rw-r--r-- | kode/kwsdl/typemapper.cpp | 20 |
2 files changed, 18 insertions, 18 deletions
diff --git a/kode/kwsdl/converter.cpp b/kode/kwsdl/converter.cpp index 2117c59cb..8ec676fb9 100644 --- a/kode/kwsdl/converter.cpp +++ b/kode/kwsdl/converter.cpp @@ -37,7 +37,7 @@ static TQString escapeEnum( const TQString &str ) Converter::Converter() { - mTQObject = KODE::Class( TQOBJECT_OBJECT_NAME_STRING ); + mTQObject = KODE::Class( "TQObject" ); } void Converter::setWSDL( const WSDL &wsdl ) @@ -249,7 +249,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type ) escapedEnums.append( escapeEnum( enums[ i ] ) ); // marshal value - KODE::Function marshalValue( "marshalValue", TQSTRING_OBJECT_NAME_STRING ); + KODE::Function marshalValue( "marshalValue", "TQString" ); marshalValue.setStatic( true ); marshalValue.addArgument( "const " + typeName + "* value" ); code += "switch ( value->type() ) {"; @@ -315,7 +315,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type ) demarshalCode.unindent(); demarshalCode += "}"; - KODE::Function marshalValue( "marshalValue", TQSTRING_OBJECT_NAME_STRING ); + KODE::Function marshalValue( "marshalValue", "TQString" ); marshalValue.setStatic( true ); marshalValue.addArgument( "const " + typeName + "* value" ); marshalValue.setBody( "return Serializer::marshalValue( value->value() );" ); @@ -839,7 +839,7 @@ void Converter::createUtilClasses() of typing and is easier to maintain at the end ;) */ TypeEntry types[] = { - { TQSTRING_OBJECT_NAME_STRING, "xsd:string", "*value", "str" }, + { "TQString", "xsd:string", "*value", "str" }, { "bool", "xsd:boolean", "(*value ? \"true\" : \"false\")", "(str.lower() == \"true\" ? true : false)" }, { "float", "xsd:TODO", "TQString::number( *value )", "str.toFloat()" }, { "int", "xsd:int", "TQString::number( *value )", "str.toInt()" }, @@ -848,7 +848,7 @@ void Converter::createUtilClasses() { "char", "xsd:byte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" }, { "unsigned char", "xsd:unsignedByte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" }, { "short", "xsd:short", "TQString::number( *value )", "str.toShort()" }, - { TQBYTEARRAY_OBJECT_NAME_STRING, "xsd:base64Binary", "TQString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" }, + { "TQByteArray", "xsd:base64Binary", "TQString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" }, { "TQDateTime", "xsd:dateTime", "value->toString( TQt::ISODate )", "TQDateTime::fromString( str, TQt::ISODate )" }, { "TQDate", "xsd:date", "value->toString( TQt::ISODate )", "TQDate::fromString( str, TQt::ISODate )" } }; @@ -859,7 +859,7 @@ void Converter::createUtilClasses() TypeEntry entry = types[ i ]; - marshal = KODE::Function( "marshalValue", TQSTRING_OBJECT_NAME_STRING ); + marshal = KODE::Function( "marshalValue", "TQString" ); marshal.setStatic( true ); marshal.addArgument( "const " + entry.type + "* value" ); @@ -911,10 +911,10 @@ void Converter::createTransportClass() transport.addInclude( "kdebug.h" ); - KODE::MemberVariable url( "url", TQSTRING_OBJECT_NAME_STRING ); + KODE::MemberVariable url( "url", "TQString" ); transport.addMemberVariable( url ); - KODE::MemberVariable slotDataVar( "data", TQBYTEARRAY_OBJECT_NAME_STRING ); + KODE::MemberVariable slotDataVar( "data", "TQByteArray" ); transport.addMemberVariable( slotDataVar ); // ctor diff --git a/kode/kwsdl/typemapper.cpp b/kode/kwsdl/typemapper.cpp index 3ec0a20a3..88842ecea 100644 --- a/kode/kwsdl/typemapper.cpp +++ b/kode/kwsdl/typemapper.cpp @@ -33,21 +33,21 @@ using namespace KWSDL; TypeMapper::TypeMapper() { - mMap.insert( "any", TypeInfo( "any", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); - mMap.insert( "anyURI", TypeInfo( "anyUri", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); - mMap.insert( "base64Binary", TypeInfo( "base64Binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) ); - mMap.insert( "binary", TypeInfo( "binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) ); + mMap.insert( "any", TypeInfo( "any", "TQString", "tqstring.h" ) ); + mMap.insert( "anyURI", TypeInfo( "anyUri", "TQString", "tqstring.h" ) ); + mMap.insert( "base64Binary", TypeInfo( "base64Binary", "TQByteArray", "tqcstring.h" ) ); + mMap.insert( "binary", TypeInfo( "binary", "TQByteArray", "tqcstring.h" ) ); mMap.insert( "boolean", TypeInfo( "boolean", "bool", "" ) ); mMap.insert( "byte", TypeInfo( "byte", "char", "" ) ); mMap.insert( "date", TypeInfo( "date", "TQDate", "tqdatetime.h" ) ); mMap.insert( "dateTime", TypeInfo( "dateTime", "TQDateTime", "tqdatetime.h" ) ); mMap.insert( "decimal", TypeInfo( "decimal", "float", "" ) ); mMap.insert( "double", TypeInfo( "double", "double", "" ) ); - mMap.insert( "duration", TypeInfo( "duration", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); // TODO: add duration class + mMap.insert( "duration", TypeInfo( "duration", "TQString", "tqstring.h" ) ); // TODO: add duration class mMap.insert( "int", TypeInfo( "int", "int", "" ) ); - mMap.insert( "language", TypeInfo( "language", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); + mMap.insert( "language", TypeInfo( "language", "TQString", "tqstring.h" ) ); mMap.insert( "short", TypeInfo( "short", "short", "" ) ); - mMap.insert( "string", TypeInfo( "string", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); + mMap.insert( "string", TypeInfo( "string", "TQString", "tqstring.h" ) ); mMap.insert( "unsignedByte", TypeInfo( "unsignedByte", "unsigned char", "" ) ); mMap.insert( "unsignedInt", TypeInfo( "unsignedInt", "unsigned int", "" ) ); } @@ -170,7 +170,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Element *element TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { - if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) + if ( it.data().type == "TQByteArray" ) headers.insert( it.data().header, TQString() ); else headers.insert( it.data().header, it.data().type ); @@ -213,7 +213,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Attribute *attrib TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { - if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) + if ( it.data().type == "TQByteArray" ) headers.insert( it.data().header, TQString() ); else headers.insert( it.data().header, it.data().type ); @@ -252,7 +252,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const TQString &typeName ) cons TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { - if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) + if ( it.data().type == "TQByteArray" ) headers.insert( it.data().header, TQString() ); else headers.insert( it.data().header, it.data().type ); |