diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kresources/groupwise/soap/gwconverter.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 ); } |