summaryrefslogtreecommitdiffstats
path: root/kresources/groupwise/soap/gwconverter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kresources/groupwise/soap/gwconverter.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/groupwise/soap/gwconverter.cpp')
-rw-r--r--kresources/groupwise/soap/gwconverter.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kresources/groupwise/soap/gwconverter.cpp b/kresources/groupwise/soap/gwconverter.cpp
index e005974e..ba64cff9 100644
--- a/kresources/groupwise/soap/gwconverter.cpp
+++ b/kresources/groupwise/soap/gwconverter.cpp
@@ -35,7 +35,7 @@ struct soap* GWConverter::soap() const
return mSoap;
}
-std::string* GWConverter::qStringToString( const QString &string )
+std::string* GWConverter::qStringToString( const TQString &string )
{
std::string *str = soap_new_std__string( mSoap, -1 );
str->append( string.utf8() );
@@ -43,20 +43,20 @@ std::string* GWConverter::qStringToString( const QString &string )
return str;
}
-QString GWConverter::stringToQString( const std::string &str )
+TQString GWConverter::stringToQString( const std::string &str )
{
- return QString::fromUtf8( str.c_str() );
+ return TQString::fromUtf8( str.c_str() );
}
-QString GWConverter::stringToQString( std::string *str )
+TQString GWConverter::stringToQString( std::string *str )
{
- if ( !str ) return QString::null;
- return QString::fromUtf8( str->c_str() );
+ if ( !str ) return TQString::null;
+ return TQString::fromUtf8( str->c_str() );
}
-char* GWConverter::qStringToChar( const QString &string )
+char* GWConverter::qStringToChar( const TQString &string )
{
- QCString str = string.utf8();
+ TQCString str = string.utf8();
char* charStr = (char*)soap_malloc( mSoap, str.length() + 1 );
memcpy( charStr, str, str.length() );
@@ -65,80 +65,80 @@ char* GWConverter::qStringToChar( const QString &string )
return charStr;
}
-QDate GWConverter::charToQDate( const char *str )
+TQDate GWConverter::charToQDate( const char *str )
{
- if ( !str ) return QDate(); // FIXME: Qt::ISODate is probably no good here because it expects yyyy-MM-dd not yyyyMMdd
- return QDate::fromString( QString::fromUtf8( str ), Qt::ISODate );
+ 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 );
}
-char *GWConverter::qDateTimeToChar( const QDateTime &dt,
- const QString &timezone )
+char *GWConverter::qDateTimeToChar( const TQDateTime &dt,
+ const TQString &timezone )
{
return qDateTimeToChar( KPimPrefs::localTimeToUtc( dt, timezone ) );
}
-char *GWConverter::qDateTimeToChar( const QDateTime &dt )
+char *GWConverter::qDateTimeToChar( const TQDateTime &dt )
{
return qStringToChar( dt.toString( "yyyyMMddThhmmZ" ) );
}
-std::string* GWConverter::qDateTimeToString( const QDateTime &dt, const QString &timezone )
+std::string* GWConverter::qDateTimeToString( const TQDateTime &dt, const TQString &timezone )
{
return qDateTimeToString( KPimPrefs::localTimeToUtc( dt, timezone ) );
}
-std::string* GWConverter::qDateTimeToString( const QDateTime &dt )
+std::string* GWConverter::qDateTimeToString( const TQDateTime &dt )
{
return qStringToString( dt.toString( "yyyyMMddThhmmZ" ) );
}
-QDateTime GWConverter::stringToQDateTime( const std::string* str )
+TQDateTime GWConverter::stringToQDateTime( const std::string* str )
{
- QDateTime dt = QDateTime::fromString( QString::fromUtf8( str->c_str() ), Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str->c_str() ), Qt::ISODate );
return dt;
}
-char* GWConverter::qDateToChar( const QDate &date )
+char* GWConverter::qDateToChar( const TQDate &date )
{
return qStringToChar( date.toString( "yyyyMMdd" ) );
}
-std::string* GWConverter::qDateToString( const QDate &date )
+std::string* GWConverter::qDateToString( const TQDate &date )
{
return qStringToString( date.toString( "yyyyMMdd" ) );
}
-QDate GWConverter::stringToQDate( std::string* str )
+TQDate GWConverter::stringToQDate( std::string* str )
{
//NB this ISODate may become unnecessary, if GW stops sending in yyyy-mm-dd format again
- return QDate::fromString( QString::fromLatin1( str->c_str() ), Qt::ISODate );
+ return TQDate::fromString( TQString::fromLatin1( str->c_str() ), Qt::ISODate );
}
-QDateTime GWConverter::charToQDateTime( const char *str )
+TQDateTime GWConverter::charToQDateTime( const char *str )
{
- if ( !str ) return QDateTime();
+ if ( !str ) return TQDateTime();
// kdDebug() << "charToQDateTime(): " << str << endl;
// as above re Qt::ISODate
- QDateTime dt = QDateTime::fromString( QString::fromUtf8( str ), Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str ), Qt::ISODate );
// kdDebug() << " " << dt.toString() << endl;
return dt;
}
-QDateTime GWConverter::charToQDateTime( const char *str,
- const QString &timezone )
+TQDateTime GWConverter::charToQDateTime( const char *str,
+ const TQString &timezone )
{
- if ( !str ) return QDateTime();
- QDateTime utc = charToQDateTime( str );
+ if ( !str ) return TQDateTime();
+ TQDateTime utc = charToQDateTime( str );
return KPimPrefs::utcToLocalTime( utc, timezone );
}
-bool GWConverter::emailsMatch( const QString & email1, const QString & email2 )
+bool GWConverter::emailsMatch( const TQString & email1, const TQString & email2 )
{
// eg demo3.po1.dom1@dmz1.provo.novell.com == demo3@dmz1.provo.novell.com
if ( email1 == email2 )
return true;
- QString shorter, longer;
+ TQString shorter, longer;
if ( email1.length() < email2.length() )
{
shorter = email1;
@@ -150,12 +150,12 @@ bool GWConverter::emailsMatch( const QString & email1, const QString & email2 )
longer = email1;
}
- QString shortStem = shorter.section( '@', 0, 0 );
- QString longStem = longer.section( '@', 0, 0 );
- QString shortHost = shorter.section( '@', 1, 1 );
- QString longHost = longer.section( '@', 1, 1 );
+ TQString shortStem = shorter.section( '@', 0, 0 );
+ TQString longStem = longer.section( '@', 0, 0 );
+ TQString shortHost = shorter.section( '@', 1, 1 );
+ TQString longHost = longer.section( '@', 1, 1 );
- QString extension = longStem.right( longStem.length() - shortStem.length() );
+ TQString extension = longStem.right( longStem.length() - shortStem.length() );
kdDebug() << "gwconverter::emailsMatch(): " << shorter << " = " << longer << endl;
kdDebug() << "shortStem: " << shortStem << ", longStem: " << longStem << ", extension: " << extension << endl;