diff options
Diffstat (limited to 'kresources/groupwise/soap/gwconverter.cpp')
-rw-r--r-- | kresources/groupwise/soap/gwconverter.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kresources/groupwise/soap/gwconverter.cpp b/kresources/groupwise/soap/gwconverter.cpp index f51f16b77..5ca7c332f 100644 --- a/kresources/groupwise/soap/gwconverter.cpp +++ b/kresources/groupwise/soap/gwconverter.cpp @@ -43,14 +43,14 @@ std::string* GWConverter::qStringToString( const TQString &string ) return str; } -TQString GWConverter::stringToQString( const std::string &str ) +TQString GWConverter::stringToTQString( const std::string &str ) { return TQString::fromUtf8( str.c_str() ); } -TQString GWConverter::stringToQString( std::string *str ) +TQString GWConverter::stringToTQString( std::string *str ) { - if ( !str ) return TQString::null; + if ( !str ) return TQString(); return TQString::fromUtf8( str->c_str() ); } @@ -65,10 +65,10 @@ char* GWConverter::qStringToChar( const TQString &string ) return charStr; } -TQDate GWConverter::charToQDate( const char *str ) +TQDate GWConverter::charToTQDate( const char *str ) { - if ( !str ) return TQDate(); // FIXME: Qt::ISODate is probably no good here because it expects yyyy-MM-dd not yyyyMMdd - return TQDate::fromString( TQString::fromUtf8( str ), Qt::ISODate ); + if ( !str ) return TQDate(); // FIXME: TQt::ISODate is probably no good here because it expects yyyy-MM-dd not yyyyMMdd + return TQDate::fromString( TQString::fromUtf8( str ), TQt::ISODate ); } char *GWConverter::qDateTimeToChar( const TQDateTime &dt, @@ -92,9 +92,9 @@ std::string* GWConverter::qDateTimeToString( const TQDateTime &dt ) return qStringToString( dt.toString( "yyyyMMddThhmmZ" ) ); } -TQDateTime GWConverter::stringToQDateTime( const std::string* str ) +TQDateTime GWConverter::stringToTQDateTime( const std::string* str ) { - TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str->c_str() ), Qt::ISODate ); + TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str->c_str() ), TQt::ISODate ); return dt; } @@ -108,27 +108,27 @@ std::string* GWConverter::qDateToString( const TQDate &date ) return qStringToString( date.toString( "yyyyMMdd" ) ); } -TQDate GWConverter::stringToQDate( std::string* str ) +TQDate GWConverter::stringToTQDate( std::string* str ) { //NB this ISODate may become unnecessary, if GW stops sending in yyyy-mm-dd format again - return TQDate::fromString( TQString::tqfromLatin1( str->c_str() ), Qt::ISODate ); + return TQDate::fromString( TQString::tqfromLatin1( str->c_str() ), TQt::ISODate ); } -TQDateTime GWConverter::charToQDateTime( const char *str ) +TQDateTime GWConverter::charToTQDateTime( const char *str ) { if ( !str ) return TQDateTime(); -// kdDebug() << "charToQDateTime(): " << str << endl; - // as above re Qt::ISODate - TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str ), Qt::ISODate ); +// kdDebug() << "charToTQDateTime(): " << str << endl; + // as above re TQt::ISODate + TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str ), TQt::ISODate ); // kdDebug() << " " << dt.toString() << endl; return dt; } -TQDateTime GWConverter::charToQDateTime( const char *str, +TQDateTime GWConverter::charToTQDateTime( const char *str, const TQString &timezone ) { if ( !str ) return TQDateTime(); - TQDateTime utc = charToQDateTime( str ); + TQDateTime utc = charToTQDateTime( str ); return KPimPrefs::utcToLocalTime( utc, timezone ); } |