summaryrefslogtreecommitdiffstats
path: root/kresources/groupwise/kioslave
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/kioslave
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/kioslave')
-rw-r--r--kresources/groupwise/kioslave/groupwise.cpp120
-rw-r--r--kresources/groupwise/kioslave/groupwise.h16
2 files changed, 68 insertions, 68 deletions
diff --git a/kresources/groupwise/kioslave/groupwise.cpp b/kresources/groupwise/kioslave/groupwise.cpp
index 60e768e2e..44178fe61 100644
--- a/kresources/groupwise/kioslave/groupwise.cpp
+++ b/kresources/groupwise/kioslave/groupwise.cpp
@@ -21,7 +21,7 @@
#include "groupwiseserver.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <libkdepim/kabcresourcecached.h>
@@ -84,8 +84,8 @@ int kdemain( int argc, char **argv )
return 0;
}
-Groupwise::Groupwise( const QCString &protocol, const QCString &pool,
- const QCString &app )
+Groupwise::Groupwise( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app )
: SlaveBase( protocol, pool, app )
{
}
@@ -103,7 +103,7 @@ void Groupwise::get( const KURL &url )
mimeType( "text/plain" );
- QString path = url.path();
+ TQString path = url.path();
debugMessage( "Path: " + path );
if ( path.contains( "/freebusy" ) ) {
@@ -116,26 +116,26 @@ void Groupwise::get( const KURL &url )
else
getAddressbook( url );
} else {
- QString error = i18n("Unknown path. Known paths are '/freebusy/', "
- "'/calendar/' and '/addressbook/'.") + QString(" path was %1" ).arg( url.url() );
+ TQString error = i18n("Unknown path. Known paths are '/freebusy/', "
+ "'/calendar/' and '/addressbook/'.") + TQString(" path was %1" ).arg( url.url() );
errorMessage( error );
}
kdDebug(7000) << "Groupwise::get() done" << endl;
}
-QString Groupwise::soapUrl( const KURL &url )
+TQString Groupwise::soapUrl( const KURL &url )
{
// FIXME: Get SSL from parameter
bool useSsl = url.protocol() == "groupwises";
- QString u;
+ TQString u;
if ( useSsl ) u = "https";
else u = "http";
u += "://" + url.host() + ":";
if ( url.port() )
- u += QString::number( url.port() );
+ u += TQString::number( url.port() );
else {
u += "7191";
}
@@ -148,7 +148,7 @@ QString Groupwise::soapUrl( const KURL &url )
url.path().startsWith("/calendar/") ||
url.path().startsWith("/addressbook/" ) ) )
{
- QString soapPath = QString("/") + QStringList::split('/', url.path())[0];
+ TQString soapPath = TQString("/") + TQStringList::split('/', url.path())[0];
u += soapPath;
}
else
@@ -159,24 +159,24 @@ QString Groupwise::soapUrl( const KURL &url )
void Groupwise::getFreeBusy( const KURL &url )
{
- QString file = url.filename();
+ TQString file = url.filename();
if ( file.right( 4 ) != ".ifb" ) {
- QString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
+ TQString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
errorMessage( error );
} else {
- QString email = file.left( file.length() - 4 );
+ TQString email = file.left( file.length() - 4 );
debugMessage( "Email: " + email );
// Sanitise local Nuernberg email addresses
kdDebug() << "Email before sanitizing: " << email << endl;
- email = email.replace(QRegExp("\\.EMEA5-1\\.EMEA5" ), "" );
- email = email.replace(QRegExp("\\.Suse.INTERNET" ), "" );
+ email = email.replace(TQRegExp("\\.EMEA5-1\\.EMEA5" ), "" );
+ email = email.replace(TQRegExp("\\.Suse.INTERNET" ), "" );
kdDebug() << "Email after sanitizing: " << email << endl;
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
@@ -190,8 +190,8 @@ void Groupwise::getFreeBusy( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
// FIXME: Read range from configuration or URL parameters.
- QDate start = QDate::currentDate().addDays( -3 );
- QDate end = QDate::currentDate().addDays( 60 );
+ TQDate start = TQDate::currentDate().addDays( -3 );
+ TQDate end = TQDate::currentDate().addDays( 60 );
fb->setDtStart( start );
fb->setDtEnd( end );
@@ -211,8 +211,8 @@ void Groupwise::getFreeBusy( const KURL &url )
}
#if 0
- QDateTime s = QDateTime( QDate( 2004, 9, 27 ), QTime( 10, 0 ) );
- QDateTime e = QDateTime( QDate( 2004, 9, 27 ), QTime( 11, 0 ) );
+ TQDateTime s = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 10, 0 ) );
+ TQDateTime e = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 11, 0 ) );
fb->addPeriod( s, e );
#endif
@@ -220,7 +220,7 @@ void Groupwise::getFreeBusy( const KURL &url )
// FIXME: This does not take into account the time zone!
KCal::ICalFormat format;
- QString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
+ TQString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
data( ical.utf8() );
@@ -230,10 +230,10 @@ void Groupwise::getFreeBusy( const KURL &url )
void Groupwise::getCalendar( const KURL &url )
{
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
@@ -241,7 +241,7 @@ void Groupwise::getCalendar( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
- KCal::CalendarLocal calendar( QString::fromLatin1("UTC"));
+ KCal::CalendarLocal calendar( TQString::fromLatin1("UTC"));
kdDebug() << "Login" << endl;
if ( !server.login() ) {
@@ -257,7 +257,7 @@ void Groupwise::getCalendar( const KURL &url )
KCal::ICalFormat format;
- QString ical = format.toString( &calendar );
+ TQString ical = format.toString( &calendar );
data( ical.utf8() );
@@ -266,26 +266,26 @@ void Groupwise::getCalendar( const KURL &url )
void Groupwise::getAddressbook( const KURL &url )
{
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
debugMessage( "Password: " + pass );
- QString query = url.query();
+ TQString query = url.query();
if ( query.isEmpty() || query == "?" ) {
errorMessage( i18n("No addressbook IDs given.") );
} else {
- QStringList ids;
+ TQStringList ids;
query = query.mid( 1 );
- QStringList queryItems = QStringList::split( "&", query );
- QStringList::ConstIterator it;
+ TQStringList queryItems = TQStringList::split( "&", query );
+ TQStringList::ConstIterator it;
for( it = queryItems.begin(); it != queryItems.end(); ++it ) {
- QStringList item = QStringList::split( "=", (*it) );
+ TQStringList item = TQStringList::split( "=", (*it) );
if ( item.count() == 2 && item[ 0 ] == "addressbookid" ) {
ids.append( item[ 1 ] );
}
@@ -295,14 +295,14 @@ void Groupwise::getAddressbook( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
- connect( &server, SIGNAL( readAddressBookTotalSize( int ) ),
- SLOT( slotReadAddressBookTotalSize( int ) ) );
- connect( &server, SIGNAL( readAddressBookProcessedSize( int ) ),
- SLOT( slotReadAddressBookProcessedSize( int ) ) );
- connect( &server, SIGNAL( errorMessage( const QString &, bool ) ),
- SLOT( slotServerErrorMessage( const QString &, bool ) ) );
- connect( &server, SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
- SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
+ connect( &server, TQT_SIGNAL( readAddressBookTotalSize( int ) ),
+ TQT_SLOT( slotReadAddressBookTotalSize( int ) ) );
+ connect( &server, TQT_SIGNAL( readAddressBookProcessedSize( int ) ),
+ TQT_SLOT( slotReadAddressBookProcessedSize( int ) ) );
+ connect( &server, TQT_SIGNAL( errorMessage( const TQString &, bool ) ),
+ TQT_SLOT( slotServerErrorMessage( const TQString &, bool ) ) );
+ connect( &server, TQT_SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
+ TQT_SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
kdDebug() << "Login" << endl;
if ( !server.login() ) {
@@ -324,7 +324,7 @@ void Groupwise::slotReadReceiveAddressees( const KABC::Addressee::List addressee
kdDebug() << "Groupwise::slotReadReceiveAddressees() - passing " << addressees.count() << " contacts back to application" << endl;
KABC::VCardConverter conv;
- QString vcard = conv.createVCards( addressees );
+ TQString vcard = conv.createVCards( addressees );
data( vcard.utf8() );
}
@@ -332,16 +332,16 @@ void Groupwise::slotReadReceiveAddressees( const KABC::Addressee::List addressee
void Groupwise::updateAddressbook( const KURL &url )
{
kdDebug() << "Groupwise::updateAddressbook() " << url << endl;
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "update AB URL: " + u );
debugMessage( "update AB User: " + user );
debugMessage( "update AB Password: " + pass );
- QString query = url.query();
+ TQString query = url.query();
unsigned long lastSequenceNumber = 0;
unsigned long lastPORebuildTime = 0;
@@ -350,13 +350,13 @@ void Groupwise::updateAddressbook( const KURL &url )
errorMessage( i18n("No addressbook IDs given.") );
return;
} else {
- QStringList ids;
+ TQStringList ids;
query = query.mid( 1 );
- QStringList queryItems = QStringList::split( "&", query );
- QStringList::ConstIterator it;
+ TQStringList queryItems = TQStringList::split( "&", query );
+ TQStringList::ConstIterator it;
for( it = queryItems.begin(); it != queryItems.end(); ++it ) {
- QStringList item = QStringList::split( "=", (*it) );
+ TQStringList item = TQStringList::split( "=", (*it) );
if ( item.count() == 2 && item[ 0 ] == "addressbookid" ) {
ids.append( item[ 1 ] );
}
@@ -369,10 +369,10 @@ void Groupwise::updateAddressbook( const KURL &url )
debugMessage( "update IDs: " + ids.join( "," ) );
GroupwiseServer server( u, user, pass, 0 );
- connect( &server, SIGNAL( errorMessage( const QString &, bool ) ),
- SLOT( slotServerErrorMessage( const QString &, bool ) ) );
- connect( &server, SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
- SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
+ connect( &server, TQT_SIGNAL( errorMessage( const TQString &, bool ) ),
+ TQT_SLOT( slotServerErrorMessage( const TQString &, bool ) ) );
+ connect( &server, TQT_SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
+ TQT_SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
kdDebug() << " Login" << endl;
if ( !server.login() ) {
@@ -391,12 +391,12 @@ void Groupwise::updateAddressbook( const KURL &url )
}
}
-void Groupwise::errorMessage( const QString &msg )
+void Groupwise::errorMessage( const TQString &msg )
{
error( KIO::ERR_SLAVE_DEFINED, msg );
}
-void Groupwise::debugMessage( const QString &msg )
+void Groupwise::debugMessage( const TQString &msg )
{
#if 0
data( ( msg + "\n" ).utf8() );
@@ -416,7 +416,7 @@ void Groupwise::slotReadAddressBookProcessedSize( int size )
processedSize( size );
}
-void Groupwise::slotServerErrorMessage( const QString & serverErrorMessage, bool fatal )
+void Groupwise::slotServerErrorMessage( const TQString & serverErrorMessage, bool fatal )
{
kdDebug() << "Groupwise::slotJobErrorMessage()" << serverErrorMessage << ( fatal ? ", FATAL!" : ", proceeding" ) << endl;
errorMessage( i18n( "An error occurred while communicating with the GroupWise server:\n%1" ).arg( serverErrorMessage ) );
diff --git a/kresources/groupwise/kioslave/groupwise.h b/kresources/groupwise/kioslave/groupwise.h
index c4362d634..9a816ad85 100644
--- a/kresources/groupwise/kioslave/groupwise.h
+++ b/kresources/groupwise/kioslave/groupwise.h
@@ -22,31 +22,31 @@
#include <kio/slavebase.h>
-#include <qobject.h>
+#include <tqobject.h>
-class Groupwise : public QObject, public KIO::SlaveBase
+class Groupwise : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
void get( const KURL &url );
- Groupwise( const QCString &protocol, const QCString &pool,
- const QCString &app );
+ Groupwise( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app );
protected:
- void debugMessage( const QString & );
- void errorMessage( const QString & );
+ void debugMessage( const TQString & );
+ void errorMessage( const TQString & );
void getFreeBusy( const KURL &url );
void getCalendar( const KURL &url );
void getAddressbook( const KURL &url );
void updateAddressbook( const KURL &url );
- QString soapUrl( const KURL &url );
+ TQString soapUrl( const KURL &url );
protected slots:
void slotReadAddressBookTotalSize( int );
void slotReadAddressBookProcessedSize( int );
- void slotServerErrorMessage( const QString &, bool );
+ void slotServerErrorMessage( const TQString &, bool );
void slotReadReceiveAddressees( const KABC::Addressee::List );
};