diff options
author | Michele Calgaro <[email protected]> | 2023-07-12 11:31:57 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-07-13 10:03:28 +0900 |
commit | c56e9aa280a5c584f6fa229432efdad836044590 (patch) | |
tree | 7583173c146ac75bc2706c985bf51f0caf02a349 /kode | |
parent | eec76c7b52e7810bf67e2fc79c69a5d4f7e876b0 (diff) | |
download | tdepim-c56e9aa280a5c584f6fa229432efdad836044590.tar.gz tdepim-c56e9aa280a5c584f6fa229432efdad836044590.zip |
Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 30555507108fe0b2b3f9ded9de37f38d4a1d9c50)
Diffstat (limited to 'kode')
-rw-r--r-- | kode/kwsdl/converter.cpp | 16 | ||||
-rw-r--r-- | kode/kwsdl/typemapper.cpp | 20 | ||||
-rw-r--r-- | kode/kxml_compiler/creator.cpp | 12 |
3 files changed, 24 insertions, 24 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 ); diff --git a/kode/kxml_compiler/creator.cpp b/kode/kxml_compiler/creator.cpp index bc330eaf9..26eb2e22a 100644 --- a/kode/kxml_compiler/creator.cpp +++ b/kode/kxml_compiler/creator.cpp @@ -95,7 +95,7 @@ void Creator::createProperty( KODE::Class &c, const TQString &type, void Creator::createElementFunctions( KODE::Class &c, Element *e ) { if ( e->hasText ) { - createProperty( c, TQSTRING_OBJECT_NAME_STRING, e->name ); + createProperty( c, "TQString", e->name ); if ( mXmlParserType == XmlParserCustomExternal ) { createTextElementParserCustom( c, e ); } @@ -150,7 +150,7 @@ void Creator::createClass( Element *element ) itA != element->attributes.end(); ++itA ) { Attribute *a = *itA; - createProperty( c, TQSTRING_OBJECT_NAME_STRING, a->name ); + createProperty( c, "TQString", a->name ); } TQValueList<Element *>::ConstIterator itE; @@ -176,7 +176,7 @@ void Creator::createClass( Element *element ) void Creator::createElementWriter( KODE::Class &c, Element *element ) { - KODE::Function writer( "writeElement", TQSTRING_OBJECT_NAME_STRING ); + KODE::Function writer( "writeElement", "TQString" ); KODE::Code code; @@ -268,7 +268,7 @@ void Creator::createElementParser( KODE::Class &c, Element *e ) void Creator::createTextElementParserCustom( KODE::Class &, Element *e ) { - KODE::Function parser( "parseElement" + upperFirst( e->name ), TQSTRING_OBJECT_NAME_STRING ); + KODE::Function parser( "parseElement" + upperFirst( e->name ), "TQString" ); KODE::Code code; @@ -637,7 +637,7 @@ void Creator::createListTypedefs() void Creator::createIndenter( KODE::File &file ) { - KODE::Function indenter( "indent", TQSTRING_OBJECT_NAME_STRING ); + KODE::Function indenter( "indent", "TQString" ); indenter.addArgument( "int n = 0" ); KODE::Code code; @@ -724,7 +724,7 @@ void Creator::createFileParserCustom( Element *element ) mParserClass.addInclude( "kdebug.h" ); mParserClass.addMemberVariable( KODE::MemberVariable( "mBuffer", - TQSTRING_OBJECT_NAME_STRING ) ); + "TQString" ) ); mParserClass.addMemberVariable( KODE::MemberVariable( "mRunning", "unsigned int" ) ); |