summaryrefslogtreecommitdiffstats
path: root/kresources/slox
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/slox')
-rw-r--r--kresources/slox/kabcresourceslox.cpp124
-rw-r--r--kresources/slox/kabcresourceslox.h18
-rw-r--r--kresources/slox/kabcresourcesloxconfig.cpp24
-rw-r--r--kresources/slox/kabcresourcesloxconfig.h6
-rw-r--r--kresources/slox/kcalresourceslox.cpp296
-rw-r--r--kresources/slox/kcalresourceslox.h40
-rw-r--r--kresources/slox/kcalresourcesloxconfig.cpp26
-rw-r--r--kresources/slox/kcalresourcesloxconfig.h8
-rw-r--r--kresources/slox/sloxaccounts.cpp64
-rw-r--r--kresources/slox/sloxaccounts.h14
-rw-r--r--kresources/slox/sloxbase.cpp12
-rw-r--r--kresources/slox/sloxbase.h10
-rw-r--r--kresources/slox/sloxfolder.cpp4
-rw-r--r--kresources/slox/sloxfolder.h14
-rw-r--r--kresources/slox/sloxfolderdialog.cpp24
-rw-r--r--kresources/slox/sloxfolderdialog.h10
-rw-r--r--kresources/slox/sloxfoldermanager.cpp48
-rw-r--r--kresources/slox/sloxfoldermanager.h10
-rw-r--r--kresources/slox/testsloxaccounts.cpp6
-rw-r--r--kresources/slox/webdavhandler.cpp104
-rw-r--r--kresources/slox/webdavhandler.h60
21 files changed, 461 insertions, 461 deletions
diff --git a/kresources/slox/kabcresourceslox.cpp b/kresources/slox/kabcresourceslox.cpp
index e6bf326c3..757bfae08 100644
--- a/kresources/slox/kabcresourceslox.cpp
+++ b/kresources/slox/kabcresourceslox.cpp
@@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kabc/picture.h>
#include <kconfig.h>
@@ -53,7 +53,7 @@ ResourceSlox::ResourceSlox( const KConfig *config )
}
ResourceSlox::ResourceSlox( const KURL &url,
- const QString &user, const QString &password )
+ const TQString &user, const TQString &password )
: ResourceCached( 0 ), SloxBase( this )
{
init();
@@ -184,16 +184,16 @@ bool ResourceSlox::asyncLoad()
url.setUser( mPrefs->user() );
url.setPass( mPrefs->password() );
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastSync();
+ TQDateTime dt = mPrefs->lastSync();
if ( dt.isValid() )
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->folderId() );
if ( type() == "ox" ) {
@@ -205,18 +205,18 @@ bool ResourceSlox::asyncLoad()
kdDebug() << "REQUEST CONTACTS: \n" << doc.toString( 2 ) << endl;
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
mDownloadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading contacts") );
connect( mDownloadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelDownload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelDownload() ) );
- mPrefs->setLastSync( QDateTime::currentDateTime() );
+ mPrefs->setLastSync( TQDateTime::currentDateTime() );
return true;
}
@@ -230,20 +230,20 @@ void ResourceSlox::slotResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotResult() success" << endl;
- QDomDocument doc = mDownloadJob->response();
+ TQDomDocument doc = mDownloadJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = "kresources_slox_kabc_" + item.sloxId;
+ TQString uid = "kresources_slox_kabc_" + item.sloxId;
if ( item.status == SloxItem::Delete ) {
- QMap<QString,Addressee>::Iterator it;
+ TQMap<TQString,Addressee>::Iterator it;
it = mAddrMap.find( uid );
if ( it != mAddrMap.end() ) {
mAddrMap.remove( it );
@@ -255,9 +255,9 @@ void ResourceSlox::slotResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
- QDomNode n;
+ TQDomNode n;
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseContactAttribute( e, a );
}
@@ -295,13 +295,13 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotUploadResult() success" << endl;
- QDomDocument doc = mUploadJob->response();
+ TQDomDocument doc = mUploadJob->response();
kdDebug() << k_funcinfo << "Upload result: " << endl;
kdDebug() << doc.toString() << endl;
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
if ( !item.response.contains( "200" ) ) {
@@ -309,7 +309,7 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
continue;
}
if ( item.status == SloxItem::New ) {
- QMap<QString,Addressee>::Iterator search_res;
+ TQMap<TQString,Addressee>::Iterator search_res;
search_res = mAddrMap.find( item.clientId );
if ( search_res != mAddrMap.end() ) {
// use the id provided by the server
@@ -334,15 +334,15 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
uploadContacts();
}
-void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
+void ResourceSlox::parseContactAttribute( const TQDomElement &e, Addressee &a )
{
- QString text = decodeText( e.text() );
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
- QString tag = e.tagName();
+ TQString tag = e.tagName();
int pnType = 0;
if ( tag == fieldName( Birthday ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
a.setBirthday( dt.date() );
} else if ( tag == fieldName( Role ) ) {
a.setRole( text );
@@ -376,9 +376,9 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
} else if ( tag == fieldName( Url ) ) {
a.setUrl( text );
} else if ( tag == fieldName( Image ) ) {
- QByteArray decodedPicture;
+ TQByteArray decodedPicture;
KCodecs::base64Decode( text.utf8(), decodedPicture );
- a.setPhoto( Picture( QImage( decodedPicture ) ) );
+ a.setPhoto( Picture( TQImage( decodedPicture ) ) );
} else if ( tag == fieldName( NickName ) ) {
a.setNickName( text );
} else if ( tag == fieldName( InstantMsg ) ) {
@@ -394,10 +394,10 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
} else if ( tag == fieldName( SpousesName ) ) {
a.insertCustom( "KADDRESSBOOK", "X-SpousesName", text );
} else if ( tag == fieldName( Anniversary ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
a.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt.toString( Qt::ISODate ) );
} else if ( tag == fieldName( Categories ) ) {
- a.setCategories( QStringList::split( QRegExp(",\\s*"), text ) );
+ a.setCategories( TQStringList::split( TQRegExp(",\\s*"), text ) );
} else if ( type() == "ox" ) { // FIXME: Address reading is missing for SLOX
// read addresses
Address addr;
@@ -423,17 +423,17 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
}
}
-int ResourceSlox::phoneNumberType( const QString &fieldName ) const
+int ResourceSlox::phoneNumberType( const TQString &fieldName ) const
{
- QMap<int, QStringList> pnmap;
+ TQMap<int, TQStringList> pnmap;
if ( type() == "ox" )
pnmap = mPhoneNumberOxMap;
else
pnmap = mPhoneNumberSloxMap;
- QMap<int, QStringList>::ConstIterator it;
+ TQMap<int, TQStringList>::ConstIterator it;
for ( it = pnmap.begin(); it != pnmap.end(); ++it ) {
- QStringList l = it.data();
- QStringList::ConstIterator it2;
+ TQStringList l = it.data();
+ TQStringList::ConstIterator it2;
for ( it2 = l.begin(); it2 != l.end(); ++it2 )
if ( (*it2) == fieldName )
return it.key();
@@ -471,10 +471,10 @@ bool ResourceSlox::asyncSave( Ticket* )
void ResourceSlox::uploadContacts()
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propertyupdate" );
- QDomElement set = WebdavHandler::addDavElement( doc, root, "set" );
- QDomElement prop = WebdavHandler::addDavElement( doc, set, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propertyupdate" );
+ TQDomElement set = WebdavHandler::addDavElement( doc, root, "set" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, set, "prop" );
bool isDelete = false;
@@ -501,7 +501,7 @@ void ResourceSlox::uploadContacts()
if ( !isDelete ) {
createAddresseeFields( doc, prop, mUploadAddressee );
} else {
- QString tmp_uid = mUploadAddressee.uid().remove( 0, sizeof("kresources_slox_kabc_") - 1); // remove prefix from uid
+ TQString tmp_uid = mUploadAddressee.uid().remove( 0, sizeof("kresources_slox_kabc_") - 1); // remove prefix from uid
WebdavHandler::addSloxElement( this, doc, prop, fieldName( ObjectId ), tmp_uid );
WebdavHandler::addSloxElement( this, doc, prop, "method", "DELETE" );
}
@@ -514,19 +514,19 @@ void ResourceSlox::uploadContacts()
url.setPass( mPrefs->password() );
mUploadJob = KIO::davPropPatch( url, doc, false );
- connect( mUploadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadResult( KIO::Job * ) ) );
- connect( mUploadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadResult( KIO::Job * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
mUploadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Uploading contacts") );
connect( mUploadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelUpload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelUpload() ) );
}
-void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
+void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop,
const Addressee &a )
{
// choose addressbook
@@ -562,10 +562,10 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
a.custom( "KADDRESSBOOK", "X-AssistantsName" ) );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( SpousesName ),
a.custom( "KADDRESSBOOK", "X-SpousesName" ) );
- QString anniversary = a.custom( "KADDRESSBOOK", "X-Anniversary" );
+ TQString anniversary = a.custom( "KADDRESSBOOK", "X-Anniversary" );
if ( !anniversary.isEmpty() )
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ),
- WebdavHandler::qDateTimeToSlox( QDateTime::fromString( anniversary, Qt::ISODate ).date() ) );
+ WebdavHandler::qDateTimeToSlox( TQDateTime::fromString( anniversary, Qt::ISODate ).date() ) );
else
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ) );
}
@@ -575,8 +575,8 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Categories ), a.categories().join( ", " ) );
// emails
- QStringList email_list = a.emails();
- QStringList::const_iterator emails_it = email_list.begin();
+ TQStringList email_list = a.emails();
+ TQStringList::const_iterator emails_it = email_list.begin();
if ( emails_it != email_list.end() )
WebdavHandler::addSloxElement( this, doc, prop, fieldName( PrimaryEmail ), *(emails_it++) );
if ( emails_it != email_list.end() )
@@ -586,15 +586,15 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
// phone numbers
PhoneNumber::List pnlist = a.phoneNumbers();
- QMap<int, QStringList> pnSaveMap;
+ TQMap<int, TQStringList> pnSaveMap;
if ( type() == "ox" )
pnSaveMap = mPhoneNumberOxMap;
else
pnSaveMap = mPhoneNumberSloxMap;
for ( PhoneNumber::List::ConstIterator it = pnlist.begin() ; it != pnlist.end(); ++it ) {
if ( pnSaveMap.contains( (*it).type() ) ) {
- QStringList l = pnSaveMap[(*it).type()];
- QString fn = l.first();
+ TQStringList l = pnSaveMap[(*it).type()];
+ TQString fn = l.first();
l.remove( l.begin() );
if ( !l.isEmpty() )
pnSaveMap[(*it).type()] = l;
@@ -606,9 +606,9 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
}
// send empty fields for the remaining ohone number fields
// it's not possible to delete phone numbers otherwise
- for ( QMap<int, QStringList>::ConstIterator it = pnSaveMap.begin(); it != pnSaveMap.end(); ++it ) {
- QStringList l = it.data();
- for ( QStringList::ConstIterator it2 = l.begin(); it2 != l.end(); ++it2 )
+ for ( TQMap<int, TQStringList>::ConstIterator it = pnSaveMap.begin(); it != pnSaveMap.end(); ++it ) {
+ TQStringList l = it.data();
+ for ( TQStringList::ConstIterator it2 = l.begin(); it2 != l.end(); ++it2 )
WebdavHandler::addSloxElement( this, doc, prop, (*it2) );
}
@@ -620,8 +620,8 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
}
}
-void KABC::ResourceSlox::createAddressFields( QDomDocument &doc, QDomElement &parent,
- const QString &prefix, const KABC::Address &addr )
+void KABC::ResourceSlox::createAddressFields( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &prefix, const KABC::Address &addr )
{
WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( Street ), addr.street() );
WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( PostalCode ), addr.postalCode() );
diff --git a/kresources/slox/kabcresourceslox.h b/kresources/slox/kabcresourceslox.h
index 066fdeaa4..5815acd4a 100644
--- a/kresources/slox/kabcresourceslox.h
+++ b/kresources/slox/kabcresourceslox.h
@@ -27,8 +27,8 @@
#include <kdepimmacros.h>
#include <kabc/addressee.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdom.h>
namespace KIO {
class DavJob;
@@ -51,7 +51,7 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
public:
ResourceSlox( const KConfig * );
ResourceSlox( const KURL &url,
- const QString &user, const QString &password );
+ const TQString &user, const TQString &password );
~ResourceSlox();
void readConfig( const KConfig * );
@@ -76,12 +76,12 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
protected:
void init();
- int phoneNumberType( const QString &fieldName ) const;
- void parseContactAttribute( const QDomElement &e, Addressee &a );
+ int phoneNumberType( const TQString &fieldName ) const;
+ void parseContactAttribute( const TQDomElement &e, Addressee &a );
- void createAddresseeFields( QDomDocument &doc, QDomElement &prop, const Addressee &a );
- void createAddressFields( QDomDocument &doc, QDomElement &parent,
- const QString &prefix, const KABC::Address &addr );
+ void createAddresseeFields( TQDomDocument &doc, TQDomElement &prop, const Addressee &a );
+ void createAddressFields( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &prefix, const KABC::Address &addr );
void uploadContacts();
@@ -105,7 +105,7 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
KABC::Addressee mUploadAddressee;
- QMap<int, QStringList> mPhoneNumberSloxMap, mPhoneNumberOxMap;
+ TQMap<int, TQStringList> mPhoneNumberSloxMap, mPhoneNumberOxMap;
};
}
diff --git a/kresources/slox/kabcresourcesloxconfig.cpp b/kresources/slox/kabcresourcesloxconfig.cpp
index 3df5636be..abacaf718 100644
--- a/kresources/slox/kabcresourcesloxconfig.cpp
+++ b/kresources/slox/kabcresourcesloxconfig.cpp
@@ -33,43 +33,43 @@
#include <klineedit.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KABC;
-ResourceSloxConfig::ResourceSloxConfig( QWidget* parent, const char* name )
+ResourceSloxConfig::ResourceSloxConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name ), mRes( 0 )
{
- QGridLayout *mainLayout = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUser, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPassword, 2, 1 );
- mLastSyncCheck = new QCheckBox( i18n("Only load data since last sync"),
+ mLastSyncCheck = new TQCheckBox( i18n("Only load data since last sync"),
this );
mainLayout->addMultiCellWidget( mLastSyncCheck, 3, 3, 0, 1 );
mFolderButton = new KPushButton( i18n("Select Folder..."), this );
mainLayout->addMultiCellWidget( mFolderButton, 4, 4, 0, 1 );
- connect( mFolderButton, SIGNAL( clicked() ), SLOT( selectAddressFolder() ) );
+ connect( mFolderButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectAddressFolder() ) );
}
@@ -114,7 +114,7 @@ void KABC::ResourceSloxConfig::selectAddressFolder( )
SloxFolderManager *manager = new SloxFolderManager( mRes, mURL->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, Contacts, this );
dialog->setSelectedFolder( mFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mFolderId = dialog->selectedFolder();
}
diff --git a/kresources/slox/kabcresourcesloxconfig.h b/kresources/slox/kabcresourcesloxconfig.h
index b55282a85..6aedf83b3 100644
--- a/kresources/slox/kabcresourcesloxconfig.h
+++ b/kresources/slox/kabcresourcesloxconfig.h
@@ -37,7 +37,7 @@ class KDE_EXPORT ResourceSloxConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceSloxConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceSloxConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -50,9 +50,9 @@ class KDE_EXPORT ResourceSloxConfig : public KRES::ConfigWidget
KURLRequester *mURL;
KLineEdit *mUser;
KLineEdit *mPassword;
- QCheckBox *mLastSyncCheck;
+ TQCheckBox *mLastSyncCheck;
KPushButton *mFolderButton;
- QString mFolderId;
+ TQString mFolderId;
SloxBase *mRes;
};
diff --git a/kresources/slox/kcalresourceslox.cpp b/kresources/slox/kcalresourceslox.cpp
index d446494f6..2fcb0baa3 100644
--- a/kresources/slox/kcalresourceslox.cpp
+++ b/kresources/slox/kcalresourceslox.cpp
@@ -22,11 +22,11 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kurl.h>
@@ -173,9 +173,9 @@ bool KCalResourceSlox::doLoad()
clearChanges();
- QString p = KURL( mPrefs->url() ).protocol();
+ TQString p = KURL( mPrefs->url() ).protocol();
if ( p != "http" && p != "https" && p != "webdav" && p != "webdavs" ) {
- QString err = i18n("Non-http protocol: '%1'").arg( p );
+ TQString err = i18n("Non-http protocol: '%1'").arg( p );
kdDebug() << "KCalResourceSlox::load(): " << err << endl;
loadError( err );
return false;
@@ -202,17 +202,17 @@ void KCalResourceSlox::requestEvents()
kdDebug() << "KCalResourceSlox::requestEvents(): " << url << endl;
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastEventSync();
+ TQDateTime dt = mPrefs->lastEventSync();
if ( dt.isValid() ) {
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->calendarFolderId() );
if ( type() == "ox" ) {
@@ -224,18 +224,18 @@ void KCalResourceSlox::requestEvents()
kdDebug() << "REQUEST CALENDAR: \n" << doc.toString( 2 ) << endl;
mLoadEventsJob = KIO::davPropFind( url, doc, "0", false );
- connect( mLoadEventsJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoadEventsResult( KIO::Job * ) ) );
- connect( mLoadEventsJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotEventsProgress( KIO::Job *, unsigned long ) ) );
+ connect( mLoadEventsJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoadEventsResult( KIO::Job * ) ) );
+ connect( mLoadEventsJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotEventsProgress( KIO::Job *, unsigned long ) ) );
mLoadEventsProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading events") );
connect( mLoadEventsProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoadEvents() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoadEvents() ) );
- mPrefs->setLastEventSync( QDateTime::currentDateTime() );
+ mPrefs->setLastEventSync( TQDateTime::currentDateTime() );
}
void KCalResourceSlox::requestTodos()
@@ -247,17 +247,17 @@ void KCalResourceSlox::requestTodos()
kdDebug() << "KCalResourceSlox::requestTodos(): " << url << endl;
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastTodoSync();
+ TQDateTime dt = mPrefs->lastTodoSync();
if ( dt.isValid() ) {
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->taskFolderId() );
if ( type() == "ox" ) {
@@ -269,27 +269,27 @@ void KCalResourceSlox::requestTodos()
kdDebug() << "REQUEST TASKS: \n" << doc.toString( 2 ) << endl;
mLoadTodosJob = KIO::davPropFind( url, doc, "0", false );
- connect( mLoadTodosJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoadTodosResult( KIO::Job * ) ) );
- connect( mLoadTodosJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotTodosProgress( KIO::Job *, unsigned long ) ) );
+ connect( mLoadTodosJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoadTodosResult( KIO::Job * ) ) );
+ connect( mLoadTodosJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotTodosProgress( KIO::Job *, unsigned long ) ) );
mLoadTodosProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading to-dos") );
connect( mLoadTodosProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoadTodos() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoadTodos() ) );
- mPrefs->setLastTodoSync( QDateTime::currentDateTime() );
+ mPrefs->setLastTodoSync( TQDateTime::currentDateTime() );
}
void KCalResourceSlox::uploadIncidences()
{
- QDomDocument doc;
- QDomElement ms = WebdavHandler::addDavElement( doc, doc, "multistatus" );
- QDomElement pu = WebdavHandler::addDavElement( doc, ms, "propertyupdate" );
- QDomElement set = WebdavHandler::addElement( doc, pu, "D:set" );
- QDomElement prop = WebdavHandler::addElement( doc, set, "D:prop" );
+ TQDomDocument doc;
+ TQDomElement ms = WebdavHandler::addDavElement( doc, doc, "multistatus" );
+ TQDomElement pu = WebdavHandler::addDavElement( doc, ms, "propertyupdate" );
+ TQDomElement set = WebdavHandler::addElement( doc, pu, "D:set" );
+ TQDomElement prop = WebdavHandler::addElement( doc, set, "D:prop" );
mUploadIsDelete = false;
Incidence::List added = addedIncidences();
@@ -320,7 +320,7 @@ void KCalResourceSlox::uploadIncidences()
KURL url = mPrefs->url();
- QString sloxId = mUploadedIncidence->customProperty( "SLOX", "ID" );
+ TQString sloxId = mUploadedIncidence->customProperty( "SLOX", "ID" );
if ( !sloxId.isEmpty() ) {
WebdavHandler::addSloxElement( this, doc, prop, fieldName( ObjectId ), sloxId );
} else {
@@ -348,8 +348,8 @@ void KCalResourceSlox::uploadIncidences()
if ( type() == "ox" ) {
WebdavHandler::addSloxElement( this, doc, prop, "method", "DELETE" );
} else {
- QDomElement remove = WebdavHandler::addElement( doc, pu, "D:remove" );
- QDomElement prop = WebdavHandler::addElement( doc, remove, "D:prop" );
+ TQDomElement remove = WebdavHandler::addElement( doc, pu, "D:remove" );
+ TQDomElement prop = WebdavHandler::addElement( doc, remove, "D:prop" );
WebdavHandler::addSloxElement( this, doc, prop, "sloxid", sloxId );
}
} else {
@@ -378,20 +378,20 @@ void KCalResourceSlox::uploadIncidences()
kdDebug() << "UPLOAD: \n" << doc.toString( 2 ) << endl;
mUploadJob = KIO::davPropPatch( url, doc, false );
- connect( mUploadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadResult( KIO::Job * ) ) );
- connect( mUploadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotUploadProgress( KIO::Job *, unsigned long ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadResult( KIO::Job * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotUploadProgress( KIO::Job *, unsigned long ) ) );
mUploadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Uploading incidence") );
connect( mUploadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelUpload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelUpload() ) );
}
-void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createIncidenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Incidence *incidence )
{
WebdavHandler::addSloxElement( this, doc, parent, fieldName( IncidenceTitle ),
@@ -401,20 +401,20 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
incidence->description() );
if ( incidence->attendeeCount() > 0 ) {
- QDomElement members = WebdavHandler::addSloxElement( this, doc, parent,
+ TQDomElement members = WebdavHandler::addSloxElement( this, doc, parent,
fieldName( Participants ) );
Attendee::List attendees = incidence->attendees();
Attendee::List::ConstIterator it;
for( it = attendees.begin(); it != attendees.end(); ++it ) {
if ( mAccounts ) {
- QString userId = mAccounts->lookupId( (*it)->email() );
- QString status;
+ TQString userId = mAccounts->lookupId( (*it)->email() );
+ TQString status;
switch ( (*it)->status() ) {
case Attendee::Accepted: status = "accept"; break;
case Attendee::Declined: status = "decline"; break;
default: status = "none"; break;
}
- QDomElement el = WebdavHandler::addSloxElement( this, doc, members, fieldName( Participant ), userId );
+ TQDomElement el = WebdavHandler::addSloxElement( this, doc, members, fieldName( Participant ), userId );
el.setAttribute( "confirm", status );
} else {
kdError() << "KCalResourceSlox: No accounts set." << endl;
@@ -426,7 +426,7 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
// TODO OX support
if ( incidence->secrecy() == Incidence::SecrecyPublic && type() != "ox" )
{
- QDomElement rights = WebdavHandler::addSloxElement( this, doc, parent, "readrights" );
+ TQDomElement rights = WebdavHandler::addSloxElement( this, doc, parent, "readrights" );
WebdavHandler::addSloxElement( this, doc, rights, "group", "users" );
}
@@ -434,7 +434,7 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
KCal::Alarm::List alarms = incidence->alarms();
if ( !alarms.isEmpty() && alarms.first()->hasStartOffset() && alarms.first()->enabled() )
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ),
- QString::number( (-1) * alarms.first()->startOffset().asSeconds() / 60 ) );
+ TQString::number( (-1) * alarms.first()->startOffset().asSeconds() / 60 ) );
else
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ), "0" );
@@ -442,11 +442,11 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Categories ), incidence->categories().join( ", " ) );
}
-void KCalResourceSlox::createEventAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createEventAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Event *event )
{
- QString folderId = mPrefs->calendarFolderId();
+ TQString folderId = mPrefs->calendarFolderId();
if ( folderId.isEmpty() && type() == "ox" ) // SLOX and OX use diffrent default folders
folderId = "-1";
WebdavHandler::addSloxElement( this, doc, parent, fieldName( FolderId ), folderId );
@@ -466,11 +466,11 @@ void KCalResourceSlox::createEventAttributes( QDomDocument &doc,
}
}
-void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createTodoAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Todo *todo )
{
- QString folderId = mPrefs->taskFolderId();
+ TQString folderId = mPrefs->taskFolderId();
if ( folderId.isEmpty() && type() == "ox" ) // SLOX and OX use diffrent default folders
folderId = "-1";
WebdavHandler::addSloxElement( this, doc, parent, fieldName( FolderId ), folderId );
@@ -486,7 +486,7 @@ void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
}
int priority = todo->priority();
- QString txt;
+ TQString txt;
switch ( priority ) {
case 9:
case 8:
@@ -503,11 +503,11 @@ void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Priority ), txt );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( PercentComplete ),
- QString::number( todo->percentComplete() ) );
+ TQString::number( todo->percentComplete() ) );
}
-void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createRecurrenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence )
{
if ( !incidence->doesRecur() ) {
@@ -521,12 +521,12 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
case Recurrence::rDaily:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "daily" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceDailyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
break;
case Recurrence::rWeekly: {
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "weekly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceWeeklyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
// TODO: SLOX support
int oxDays = 0;
for ( int i = 0; i < 7; ++i ) {
@@ -534,33 +534,33 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
oxDays += 1 << ( ( i + 1 ) % 7 );
}
if ( type() == "ox" )
- WebdavHandler::addSloxElement( this, doc, parent, "days", QString::number( oxDays ) );
+ WebdavHandler::addSloxElement( this, doc, parent, "days", TQString::number( oxDays ) );
break; }
case Recurrence::rMonthlyDay:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "monthly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyDay ),
- QString::number( r->monthDays().first() ) );
+ TQString::number( r->monthDays().first() ) );
break;
case Recurrence::rMonthlyPos: {
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ),
type() == "ox" ? "monthly" : "monthly2" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Freq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
RecurrenceRule::WDayPos wdp = r->monthPositions().first();
// TODO: SLOX support
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Day ),
- QString::number( 1 << wdp.day() ) );
+ TQString::number( 1 << wdp.day() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Pos ),
- QString::number( wdp.pos() ) );
+ TQString::number( wdp.pos() ) );
break; }
case Recurrence::rYearlyMonth:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "yearly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyDay ),
- QString::number( r->yearDates().first() ) );
+ TQString::number( r->yearDates().first() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyMonth ),
- QString::number( r->yearMonths().first() + monthOffset ) );
+ TQString::number( r->yearMonths().first() + monthOffset ) );
if ( type() == "ox" )
WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" );
break;
@@ -570,11 +570,11 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
RecurrenceRule::WDayPos wdp = r->monthPositions().first();
// TODO: SLOX support
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Day ),
- QString::number( 1 << wdp.day() ) );
+ TQString::number( 1 << wdp.day() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Pos ),
- QString::number( wdp.pos() ) );
+ TQString::number( wdp.pos() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Month ),
- QString::number( r->yearMonths().first() + monthOffset ) );
+ TQString::number( r->yearMonths().first() + monthOffset ) );
if ( type() == "ox" )
WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" );
break; }
@@ -585,27 +585,27 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
WebdavHandler::qDateTimeToSlox( r->endDateTime() ) );
// delete exceptions
DateList exlist = r->exDates();
- QStringList res;
+ TQStringList res;
for ( DateList::Iterator it = exlist.begin(); it != exlist.end(); ++it )
res.append( WebdavHandler::qDateTimeToSlox( *it ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceDelEx ), res.join( "," ) );
}
-void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
+void KCalResourceSlox::parseMembersAttribute( const TQDomElement &e,
Incidence *incidence )
{
incidence->clearAttendees();
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement memberElement = n.toElement();
+ TQDomElement memberElement = n.toElement();
if ( memberElement.tagName() == fieldName( Participant ) ) {
- QString member = memberElement.text();
+ TQString member = memberElement.text();
KABC::Addressee account;
if ( mAccounts ) account = mAccounts->lookupUser( member );
else kdError() << "KCalResourceSlox: no accounts set" << endl;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
Attendee *a = incidence->attendeeByUid( member );
if ( account.isEmpty() ) {
if ( a ) continue;
@@ -624,7 +624,7 @@ void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
a->setUid( member );
incidence->addAttendee( a );
}
- QString status = memberElement.attribute( "confirm" );
+ TQString status = memberElement.attribute( "confirm" );
if ( !status.isEmpty() ) {
if ( status == "accept" ) {
a->setStatus( Attendee::Accepted );
@@ -641,25 +641,25 @@ void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
}
}
-void KCalResourceSlox::parseReadRightsAttribute( const QDomElement &e,
+void KCalResourceSlox::parseReadRightsAttribute( const TQDomElement &e,
Incidence *incidence )
{
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement rightElement = n.toElement();
+ TQDomElement rightElement = n.toElement();
if ( rightElement.tagName() == "group" ) {
- QString groupName = rightElement.text();
+ TQString groupName = rightElement.text();
if ( groupName == "users" )
incidence->setSecrecy( Incidence::SecrecyPublic );
}
}
}
-void KCalResourceSlox::parseIncidenceAttribute( const QDomElement &e,
+void KCalResourceSlox::parseIncidenceAttribute( const TQDomElement &e,
Incidence *incidence )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( IncidenceTitle ) ) {
@@ -693,19 +693,19 @@ void KCalResourceSlox::parseIncidenceAttribute( const QDomElement &e,
} else if ( tag == "readrights" ) {
parseReadRightsAttribute( e, incidence );
} else if ( tag == fieldName( Categories ) ) {
- incidence->setCategories( QStringList::split( QRegExp(",\\s*"), text ) );
+ incidence->setCategories( TQStringList::split( TQRegExp(",\\s*"), text ) );
}
}
-void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
+void KCalResourceSlox::parseEventAttribute( const TQDomElement &e,
Event *event )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( EventBegin ) ) {
- QDateTime dt;
+ TQDateTime dt;
if ( event->doesFloat() ) {
if ( type() == "ox" )
dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() );
@@ -715,7 +715,7 @@ void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() );
event->setDtStart( dt );
} else if ( tag == fieldName( EventEnd ) ) {
- QDateTime dt;
+ TQDateTime dt;
if ( event->doesFloat() ) {
dt = WebdavHandler::sloxToQDateTime( text );
dt = dt.addSecs( -1 );
@@ -727,15 +727,15 @@ void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
}
}
-void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
+void KCalResourceSlox::parseRecurrence( const TQDomNode &node, Event *event )
{
- QString type;
+ TQString type;
int dailyValue = -1;
- QDateTime end;
+ TQDateTime end;
int weeklyValue = -1;
- QBitArray days( 7 ); // days, starting with monday
+ TQBitArray days( 7 ); // days, starting with monday
bool daysSet = false;
int monthlyValueDay = -1;
@@ -754,12 +754,12 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
DateList deleteExceptions;
- QDomNode n;
+ TQDomNode n;
for( n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
kdDebug() << k_funcinfo << tag << ": " << text << endl;
if ( tag == fieldName( RecurrenceType ) ) {
@@ -818,8 +818,8 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
yearlyMonth = text.toInt() + 1; // starts at 0
yearly2Month = text.toInt() + 1;
} else if ( tag == fieldName( RecurrenceDelEx ) ) {
- QStringList exdates = QStringList::split( ",", text );
- QStringList::Iterator it;
+ TQStringList exdates = TQStringList::split( ",", text );
+ TQStringList::Iterator it;
for ( it = exdates.begin(); it != exdates.end(); ++it )
deleteExceptions.append( WebdavHandler::sloxToQDateTime( *it ).date() );
}
@@ -845,7 +845,7 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
r->addYearlyMonth( yearlyMonth );
} else if ( type == "monthly2" ) {
r->setMonthly( monthly2ValueMonth );
- QBitArray _days( 7 );
+ TQBitArray _days( 7 );
if ( daysSet )
_days = days;
else
@@ -854,7 +854,7 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
} else if ( type == "yearly2" ) {
r->setYearly( 1 );
r->addYearlyMonth( yearly2Month );
- QBitArray _days( 7 );
+ TQBitArray _days( 7 );
if ( daysSet )
_days = days;
else
@@ -865,21 +865,21 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
r->setExDates( deleteExceptions );
}
-void KCalResourceSlox::parseTodoAttribute( const QDomElement &e,
+void KCalResourceSlox::parseTodoAttribute( const TQDomElement &e,
Todo *todo )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( TaskBegin ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
if ( dt.isValid() ) {
todo->setDtStart( dt );
todo->setHasStartDate( true );
}
} else if ( tag == fieldName( TaskEnd ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
if ( dt.isValid() ) {
todo->setDtDue( dt );
todo->setHasDueDate( true );
@@ -919,20 +919,20 @@ void KCalResourceSlox::slotLoadTodosResult( KIO::Job *job )
} else {
kdDebug() << "KCalResourceSlox::slotLoadTodosJobResult() success" << endl;
- QDomDocument doc = mLoadTodosJob->response();
+ TQDomDocument doc = mLoadTodosJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
disableChangeNotification();
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = sloxIdToTodoUid( item.sloxId );
+ TQString uid = sloxIdToTodoUid( item.sloxId );
if ( item.status == SloxItem::Delete ) {
Todo *todo = mCalendar.todo( uid );
if ( todo ) {
@@ -953,9 +953,9 @@ void KCalResourceSlox::slotLoadTodosResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
- QDomNode n;
+ TQDomNode n;
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseIncidenceAttribute( e, todo );
parseTodoAttribute( e, todo );
@@ -993,20 +993,20 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
} else {
kdDebug() << "KCalResourceSlox::slotLoadEventsResult() success" << endl;
- QDomDocument doc = mLoadEventsJob->response();
+ TQDomDocument doc = mLoadEventsJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
disableChangeNotification();
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = sloxIdToEventUid( item.sloxId );
+ TQString uid = sloxIdToEventUid( item.sloxId );
if ( item.status == SloxItem::Delete ) {
Event *event = mCalendar.event( uid );
if ( event ) {
@@ -1025,7 +1025,7 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
event->setCustomProperty( "SLOX", "ID", item.sloxId );
- QDomNode n = item.domNode.namedItem( fieldName( FullTime ) );
+ TQDomNode n = item.domNode.namedItem( fieldName( FullTime ) );
event->setFloats( n.toElement().text() == boolToStr( true ) );
bool doesRecur = false;
@@ -1033,7 +1033,7 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseIncidenceAttribute( e, event );
parseEventAttribute( e, event );
@@ -1089,69 +1089,69 @@ void KCalResourceSlox::slotUploadResult( KIO::Job *job )
return;
}
- QDomDocument doc = mUploadJob->response();
+ TQDomDocument doc = mUploadJob->response();
kdDebug() << "UPLOAD RESULT:" << endl;
kdDebug() << doc.toString( 2 ) << endl;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
- QDomNode responseNode;
+ TQDomNode responseNode;
for( responseNode = docElement.firstChild(); !responseNode.isNull();
responseNode = responseNode.nextSibling() ) {
- QDomElement responseElement = responseNode.toElement();
+ TQDomElement responseElement = responseNode.toElement();
if ( responseElement.tagName() == "response" ) {
- QDomNode propstat = responseElement.namedItem( "propstat" );
+ TQDomNode propstat = responseElement.namedItem( "propstat" );
if ( propstat.isNull() ) {
kdError() << "Unable to find propstat tag." << endl;
continue;
}
- QDomNode status = propstat.namedItem( "status" );
+ TQDomNode status = propstat.namedItem( "status" );
if ( !status.isNull() ) {
- QDomElement statusElement = status.toElement();
- QString response = statusElement.text();
+ TQDomElement statusElement = status.toElement();
+ TQString response = statusElement.text();
if ( !response.contains( "200" ) ) {
- QString error = "'" + mUploadedIncidence->summary() + "'\n";
+ TQString error = "'" + mUploadedIncidence->summary() + "'\n";
error += response;
- QDomNode dn = propstat.namedItem( "responsedescription" );
- QString d = dn.toElement().text();
+ TQDomNode dn = propstat.namedItem( "responsedescription" );
+ TQString d = dn.toElement().text();
if ( !d.isEmpty() ) error += "\n" + d;
saveError( error );
continue;
}
}
- QDomNode prop = propstat.namedItem( "prop" );
+ TQDomNode prop = propstat.namedItem( "prop" );
if ( prop.isNull() ) {
kdError() << "Unable to find WebDAV property" << endl;
continue;
}
- QDomNode sloxIdNode = prop.namedItem( fieldName( ObjectId ) );
+ TQDomNode sloxIdNode = prop.namedItem( fieldName( ObjectId ) );
if ( sloxIdNode.isNull() ) {
kdError() << "Unable to find SLOX id." << endl;
continue;
}
- QDomElement sloxIdElement = sloxIdNode.toElement();
- QString sloxId = sloxIdElement.text();
+ TQDomElement sloxIdElement = sloxIdNode.toElement();
+ TQString sloxId = sloxIdElement.text();
kdDebug() << "SLOXID: " << sloxId << endl;
if ( mUploadIsDelete ) {
kdDebug() << "Incidence deleted" << endl;
} else {
- QDomNode clientIdNode = prop.namedItem( fieldName( ClientId ) );
+ TQDomNode clientIdNode = prop.namedItem( fieldName( ClientId ) );
if ( clientIdNode.isNull() ) {
kdError() << "Unable to find client id." << endl;
continue;
}
- QDomElement clientidElement = clientIdNode.toElement();
- QString clientId = clientidElement.text();
+ TQDomElement clientidElement = clientIdNode.toElement();
+ TQString clientId = clientidElement.text();
kdDebug() << "CLIENTID: " << clientId << endl;
Incidence *i = mUploadedIncidence->clone();
- QString uid;
+ TQString uid;
if ( i->type() == "Event" ) uid = sloxIdToEventUid( sloxId );
else if ( i->type() == "Todo" ) uid = sloxIdToTodoUid( sloxId );
else {
@@ -1228,7 +1228,7 @@ bool KCalResourceSlox::confirmSave()
dlg.addIncidences( deletedIncidences(), i18n("Deleted") );
int result = dlg.exec();
- return result == QDialog::Accepted;
+ return result == TQDialog::Accepted;
}
bool KCalResourceSlox::doSave()
@@ -1313,12 +1313,12 @@ void KCalResourceSlox::cancelUpload()
if ( mUploadProgress ) mUploadProgress->setComplete();
}
-QString KCalResourceSlox::sloxIdToEventUid( const QString &sloxId )
+TQString KCalResourceSlox::sloxIdToEventUid( const TQString &sloxId )
{
return "KResources_SLOX_Event_" + sloxId;
}
-QString KCalResourceSlox::sloxIdToTodoUid( const QString &sloxId )
+TQString KCalResourceSlox::sloxIdToTodoUid( const TQString &sloxId )
{
return "KResources_SLOX_Todo_" + sloxId;
}
diff --git a/kresources/slox/kcalresourceslox.h b/kresources/slox/kcalresourceslox.h
index 2d0022cc7..0f9b289dd 100644
--- a/kresources/slox/kcalresourceslox.h
+++ b/kresources/slox/kcalresourceslox.h
@@ -23,10 +23,10 @@
#include "sloxbase.h"
#include "webdavhandler.h"
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
#include <kurl.h>
#include <kconfig.h>
@@ -113,33 +113,33 @@ class KDE_EXPORT KCalResourceSlox : public KCal::ResourceCached, public SloxBase
void uploadIncidences();
- void parseMembersAttribute( const QDomElement &e,
+ void parseMembersAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseReadRightsAttribute( const QDomElement &e,
+ void parseReadRightsAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseIncidenceAttribute( const QDomElement &e,
+ void parseIncidenceAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseTodoAttribute( const QDomElement &e, KCal::Todo *todo );
- void parseEventAttribute( const QDomElement &e, KCal::Event *event );
- void parseRecurrence( const QDomNode &n, KCal::Event *event );
+ void parseTodoAttribute( const TQDomElement &e, KCal::Todo *todo );
+ void parseEventAttribute( const TQDomElement &e, KCal::Event *event );
+ void parseRecurrence( const TQDomNode &n, KCal::Event *event );
- void createIncidenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createIncidenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence );
- void createEventAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createEventAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Event *event );
- void createTodoAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createTodoAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Todo *todo );
- void createRecurrenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createRecurrenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence );
bool confirmSave();
- QString sloxIdToEventUid( const QString &sloxId );
- QString sloxIdToTodoUid( const QString &sloxId );
+ TQString sloxIdToEventUid( const TQString &sloxId );
+ TQString sloxIdToTodoUid( const TQString &sloxId );
private:
void init();
diff --git a/kresources/slox/kcalresourcesloxconfig.cpp b/kresources/slox/kcalresourcesloxconfig.cpp
index 403a5e518..441ea5336 100644
--- a/kresources/slox/kcalresourcesloxconfig.cpp
+++ b/kresources/slox/kcalresourcesloxconfig.cpp
@@ -20,9 +20,9 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -40,43 +40,43 @@
#include "kcalresourcesloxconfig.h"
-KCalResourceSloxConfig::KCalResourceSloxConfig( QWidget* parent, const char* name ) :
+KCalResourceSloxConfig::KCalResourceSloxConfig( TQWidget* parent, const char* name ) :
KRES::ConfigWidget( parent, name ), mRes( 0 )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 6, 2, KDialog::spacingHint(), KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 6, 2, KDialog::spacingHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Download from:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Download from:" ), this );
mDownloadUrl = new KURLRequester( this );
mDownloadUrl->setMode( KFile::File );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDownloadUrl, 1, 1 );
- label = new QLabel( i18n("User:"), this );
+ label = new TQLabel( i18n("User:"), this );
mainLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( this );
mainLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
mainLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( this );
mainLayout->addWidget( mPasswordEdit, 3, 1 );
mPasswordEdit->setEchoMode( KLineEdit::Password );
- mLastSyncCheck = new QCheckBox( i18n("Only load data since last sync"),
+ mLastSyncCheck = new TQCheckBox( i18n("Only load data since last sync"),
this );
mainLayout->addMultiCellWidget( mLastSyncCheck, 4, 4, 0, 1 );
mCalButton = new KPushButton( i18n("Calendar Folder..."), this );
mainLayout->addWidget( mCalButton, 5, 0 );
- connect( mCalButton, SIGNAL( clicked() ), SLOT( selectCalendarFolder() ) );
+ connect( mCalButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectCalendarFolder() ) );
mTaskButton = new KPushButton( i18n("Task Folder..."), this );
mainLayout->addWidget( mTaskButton, 5, 1 );
- connect( mTaskButton, SIGNAL( clicked() ), SLOT( selectTaskFolder() ) );
+ connect( mTaskButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectTaskFolder() ) );
mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
mainLayout->addMultiCellWidget( mReloadConfig, 6, 6, 0, 1 );
@@ -129,7 +129,7 @@ void KCalResourceSloxConfig::selectCalendarFolder()
SloxFolderManager *manager = new SloxFolderManager( mRes, mDownloadUrl->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, ::Calendar, this );
dialog->setSelectedFolder( mCalendarFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mCalendarFolderId = dialog->selectedFolder();
}
@@ -138,7 +138,7 @@ void KCalResourceSloxConfig::selectTaskFolder( )
SloxFolderManager *manager = new SloxFolderManager( mRes, mDownloadUrl->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, Tasks, this );
dialog->setSelectedFolder( mTaskFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mTaskFolderId = dialog->selectedFolder();
}
diff --git a/kresources/slox/kcalresourcesloxconfig.h b/kresources/slox/kcalresourcesloxconfig.h
index a656478d2..370948c08 100644
--- a/kresources/slox/kcalresourcesloxconfig.h
+++ b/kresources/slox/kcalresourcesloxconfig.h
@@ -46,7 +46,7 @@ class KDE_EXPORT KCalResourceSloxConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- KCalResourceSloxConfig( QWidget *parent = 0, const char *name = 0 );
+ KCalResourceSloxConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
@@ -60,11 +60,11 @@ class KDE_EXPORT KCalResourceSloxConfig : public KRES::ConfigWidget
KURLRequester *mDownloadUrl;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mLastSyncCheck;
+ TQCheckBox *mLastSyncCheck;
KPushButton *mCalButton;
KPushButton *mTaskButton;
- QString mCalendarFolderId;
- QString mTaskFolderId;
+ TQString mCalendarFolderId;
+ TQString mTaskFolderId;
KCal::ResourceCachedReloadConfig *mReloadConfig;
KCal::ResourceCachedSaveConfig *mSaveConfig;
diff --git a/kresources/slox/sloxaccounts.cpp b/kresources/slox/sloxaccounts.cpp
index 35203b06f..a32df5fa2 100644
--- a/kresources/slox/sloxaccounts.cpp
+++ b/kresources/slox/sloxaccounts.cpp
@@ -33,9 +33,9 @@
#include <kstringhandler.h>
#include <kconfig.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstring.h>
SloxAccounts::SloxAccounts( SloxBase *res, const KURL &baseUrl )
: mBaseUrl( baseUrl ), mRes( res )
@@ -44,9 +44,9 @@ SloxAccounts::SloxAccounts( SloxBase *res, const KURL &baseUrl )
mDownloadJob = 0;
- QString server = mBaseUrl.host();
+ TQString server = mBaseUrl.host();
- QStringList l = QStringList::split( '.', server );
+ TQStringList l = TQStringList::split( '.', server );
if ( l.count() < 2 ) mDomain = server;
else mDomain = l[ l.count() - 2 ] + "." + l[ l.count() - 1 ];
@@ -61,23 +61,23 @@ SloxAccounts::~SloxAccounts()
if ( mDownloadJob ) mDownloadJob->kill();
}
-void SloxAccounts::insertUser( const QString &id, const KABC::Addressee &a )
+void SloxAccounts::insertUser( const TQString &id, const KABC::Addressee &a )
{
kdDebug() << "SloxAccount::insertUser() " << id << endl;
mUsers.replace( id, a );
- QString email = a.preferredEmail();
+ TQString email = a.preferredEmail();
- QString url = "http://" + mBaseUrl.host() + "/servlet/webdav.freebusy?username=";
+ TQString url = "http://" + mBaseUrl.host() + "/servlet/webdav.freebusy?username=";
url += id + "&server=" + mDomain;
KCal::FreeBusyUrlStore::self()->writeUrl( email, url );
}
-KABC::Addressee SloxAccounts::lookupUser( const QString &id )
+KABC::Addressee SloxAccounts::lookupUser( const TQString &id )
{
- QMap<QString, KABC::Addressee>::ConstIterator it;
+ TQMap<TQString, KABC::Addressee>::ConstIterator it;
it = mUsers.find( id );
if ( it == mUsers.end() ) {
requestAccounts();
@@ -87,11 +87,11 @@ KABC::Addressee SloxAccounts::lookupUser( const QString &id )
}
}
-QString SloxAccounts::lookupId( const QString &email )
+TQString SloxAccounts::lookupId( const TQString &email )
{
kdDebug() << "SloxAccounts::lookupId() " << email << endl;
- QMap<QString, KABC::Addressee>::ConstIterator it;
+ TQMap<TQString, KABC::Addressee>::ConstIterator it;
for( it = mUsers.begin(); it != mUsers.end(); ++it ) {
kdDebug() << "PREF: " << (*it).preferredEmail() << endl;
kdDebug() << "KEY: " << it.key() << endl;
@@ -126,9 +126,9 @@ void SloxAccounts::requestAccounts()
KURL url = mBaseUrl;
url.setPath( "/servlet/webdav.groupuser/" );
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( mRes, doc, prop, "user", "*" );
WebdavHandler::addSloxElement( mRes, doc, prop, "group", "*" );
WebdavHandler::addSloxElement( mRes, doc, prop, "resource", "*" );
@@ -139,8 +139,8 @@ void SloxAccounts::requestAccounts()
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
}
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void SloxAccounts::slotResult( KIO::Job *job )
@@ -151,12 +151,12 @@ void SloxAccounts::slotResult( KIO::Job *job )
job->showErrorDialog( 0 );
} else {
if ( mRes->resType() == "ox" ) {
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_WriteOnly ) ) {
kdWarning() << "Unable to open '" << cacheFile() << "'" << endl;
return;
}
- QTextStream stream ( &f );
+ TQTextStream stream ( &f );
stream << static_cast<KIO::DavJob*>( mDownloadJob )->response();
f.close();
}
@@ -166,11 +166,11 @@ void SloxAccounts::slotResult( KIO::Job *job )
mDownloadJob = 0;
}
-QString SloxAccounts::cacheFile() const
+TQString SloxAccounts::cacheFile() const
{
- QString host = mBaseUrl.host();
+ TQString host = mBaseUrl.host();
- QString file = locateLocal( "cache", "slox/accounts_" + host );
+ TQString file = locateLocal( "cache", "slox/accounts_" + host );
kdDebug() << "SloxAccounts::cacheFile(): " << file << endl;
@@ -181,34 +181,34 @@ void SloxAccounts::readAccounts()
{
kdDebug() << "SloxAccounts::readAccounts()" << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
requestAccounts();
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &f );
// kdDebug() << "SLOX ACCOUNTS: " << doc.toString( 2 ) << endl;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
mUsers.clear();
- QDomNodeList nodes = doc.elementsByTagName( mRes->resType() == "ox" ? "ox:user" : "user" );
+ TQDomNodeList nodes = doc.elementsByTagName( mRes->resType() == "ox" ? "ox:user" : "user" );
for( uint i = 0; i < nodes.count(); ++i ) {
- QDomElement element = nodes.item(i).toElement();
- QString id;
+ TQDomElement element = nodes.item(i).toElement();
+ TQString id;
KABC::Addressee a;
- QDomNode n;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
// remove XML namespace
tag = tag.right( tag.length() - ( tag.find( ':' ) + 1 ) );
- QString value = e.text();
+ TQString value = e.text();
if ( tag == "uid" ) id = value;
else if ( tag == "mail" ) a.insertEmail( value, true );
else if ( tag == "forename" ) a.setGivenName( value );
diff --git a/kresources/slox/sloxaccounts.h b/kresources/slox/sloxaccounts.h
index ea3e664e2..bda5c4492 100644
--- a/kresources/slox/sloxaccounts.h
+++ b/kresources/slox/sloxaccounts.h
@@ -22,7 +22,7 @@
#include <kabc/addressee.h>
#include <kdepimmacros.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -37,27 +37,27 @@ class KDE_EXPORT SloxAccounts : public QObject
SloxAccounts( SloxBase *res, const KURL &baseUrl );
~SloxAccounts();
- void insertUser( const QString &id, const KABC::Addressee &a );
+ void insertUser( const TQString &id, const KABC::Addressee &a );
- KABC::Addressee lookupUser( const QString &id );
+ KABC::Addressee lookupUser( const TQString &id );
- QString lookupId( const QString &email );
+ TQString lookupId( const TQString &email );
protected:
void requestAccounts();
void readAccounts();
- QString cacheFile() const;
+ TQString cacheFile() const;
protected slots:
void slotResult( KIO::Job * );
private:
- QString mDomain;
+ TQString mDomain;
KIO::Job *mDownloadJob;
- QMap<QString, KABC::Addressee> mUsers; // map users ids to addressees.
+ TQMap<TQString, KABC::Addressee> mUsers; // map users ids to addressees.
KURL mBaseUrl;
SloxBase *mRes;
diff --git a/kresources/slox/sloxbase.cpp b/kresources/slox/sloxbase.cpp
index c58990593..3871a2c7a 100644
--- a/kresources/slox/sloxbase.cpp
+++ b/kresources/slox/sloxbase.cpp
@@ -22,7 +22,7 @@
#include <kdebug.h>
#include <kresources/resource.h>
-static QString mFieldNameMap[][2] =
+static TQString mFieldNameMap[][2] =
{
// SLOX, OX
{"sloxid", "object_id"}, // system fields
@@ -106,14 +106,14 @@ SloxBase::SloxBase( KRES::Resource * res ) :
{
}
-QString SloxBase::decodeText( const QString & text )
+TQString SloxBase::decodeText( const TQString & text )
{
if ( mRes->type() == "ox" )
return text;
- return QString::fromUtf8( text.latin1() );
+ return TQString::fromUtf8( text.latin1() );
}
-QString SloxBase::fieldName( Field f )
+TQString SloxBase::fieldName( Field f )
{
int t = 0;
if ( mRes->type() == "ox" )
@@ -121,12 +121,12 @@ QString SloxBase::fieldName( Field f )
return mFieldNameMap[f][t];
}
-QString SloxBase::resType( ) const
+TQString SloxBase::resType( ) const
{
return mRes->type();
}
-QString SloxBase::boolToStr( bool b )
+TQString SloxBase::boolToStr( bool b )
{
if ( mRes->type() == "ox" ) {
if ( b )
diff --git a/kresources/slox/sloxbase.h b/kresources/slox/sloxbase.h
index 90afb16fa..7047ed28d 100644
--- a/kresources/slox/sloxbase.h
+++ b/kresources/slox/sloxbase.h
@@ -20,7 +20,7 @@
#ifndef SLOXUTILS_H
#define SLOXUTILS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
namespace KRES {
@@ -103,10 +103,10 @@ class KDE_EXPORT SloxBase {
SloxBase( KRES::Resource *res );
- QString decodeText( const QString &text );
- QString fieldName( Field f );
- QString resType() const;
- QString boolToStr( bool b );
+ TQString decodeText( const TQString &text );
+ TQString fieldName( Field f );
+ TQString resType() const;
+ TQString boolToStr( bool b );
private:
KRES::Resource *mRes;
diff --git a/kresources/slox/sloxfolder.cpp b/kresources/slox/sloxfolder.cpp
index 157463149..fbfb9f051 100644
--- a/kresources/slox/sloxfolder.cpp
+++ b/kresources/slox/sloxfolder.cpp
@@ -21,7 +21,7 @@
#include "sloxfolder.h"
-SloxFolder::SloxFolder( const QString &id, const QString &parentId, const QString &type, const QString &name, bool def ) :
+SloxFolder::SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def ) :
item( 0 ),
mId( id ),
mParentId( parentId ),
@@ -38,7 +38,7 @@ SloxFolder::SloxFolder( const QString &id, const QString &parentId, const QStrin
mType = Unbound;
}
-QString SloxFolder::name( ) const
+TQString SloxFolder::name( ) const
{
// special cases for system folders
if ( mName == "system_global" )
diff --git a/kresources/slox/sloxfolder.h b/kresources/slox/sloxfolder.h
index bda529ba4..e27399a66 100644
--- a/kresources/slox/sloxfolder.h
+++ b/kresources/slox/sloxfolder.h
@@ -20,7 +20,7 @@
#ifndef SLOXFOLDER_H
#define SLOXFOLDER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KListViewItem;
@@ -35,20 +35,20 @@ enum FolderType {
class KDE_EXPORT SloxFolder
{
public:
- SloxFolder( const QString &id, const QString &parentId, const QString &type, const QString &name, bool def = false );
+ SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def = false );
- QString id() const { return mId; }
- QString parentId() const { return mParentId; }
+ TQString id() const { return mId; }
+ TQString parentId() const { return mParentId; }
FolderType type() const { return mType; }
- QString name() const;
+ TQString name() const;
bool isDefault() const { return mDefault; }
KListViewItem *item;
private:
- QString mId, mParentId;
+ TQString mId, mParentId;
FolderType mType;
- QString mName;
+ TQString mName;
bool mDefault;
};
diff --git a/kresources/slox/sloxfolderdialog.cpp b/kresources/slox/sloxfolderdialog.cpp
index b188fb2fa..4f17ea893 100644
--- a/kresources/slox/sloxfolderdialog.cpp
+++ b/kresources/slox/sloxfolderdialog.cpp
@@ -25,7 +25,7 @@
#include "sloxfolderdialog.h"
#include "sloxfoldermanager.h"
-SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type, QWidget *parent, const char *name ) :
+SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget *parent, const char *name ) :
KDialogBase( parent, name, true, i18n("Select Folder"), Ok|Cancel|User1, Ok, false, KGuiItem( i18n("Reload"), "reload" ) ),
mManager( manager ),
mFolderType( type )
@@ -37,23 +37,23 @@ SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type,
mListView->addColumn( i18n("Folder ID"), 0 );
setMainWidget( mListView );
updateFolderView();
- connect( manager, SIGNAL( foldersUpdated() ), SLOT( updateFolderView() ) );
+ connect( manager, TQT_SIGNAL( foldersUpdated() ), TQT_SLOT( updateFolderView() ) );
}
SloxFolderDialog::~SloxFolderDialog()
{
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it )
(*it)->item = 0;
}
void SloxFolderDialog::updateFolderView()
{
- QString selected = selectedFolder();
+ TQString selected = selectedFolder();
mListView->clear();
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it )
createFolderViewItem( *it );
setSelectedFolder( selected );
@@ -99,18 +99,18 @@ void SloxFolderDialog::createFolderViewItem( SloxFolder *folder )
}
}
-QString SloxFolderDialog::selectedFolder() const
+TQString SloxFolderDialog::selectedFolder() const
{
- QListViewItem *item = mListView->selectedItem();
+ TQListViewItem *item = mListView->selectedItem();
if ( item )
return item->text( 1 );
return "-1"; // OX default folder
}
-void SloxFolderDialog::setSelectedFolder( const QString &id )
+void SloxFolderDialog::setSelectedFolder( const TQString &id )
{
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it ) {
if ( !(*it)->item )
continue;
diff --git a/kresources/slox/sloxfolderdialog.h b/kresources/slox/sloxfolderdialog.h
index 37287d1b1..6432a6495 100644
--- a/kresources/slox/sloxfolderdialog.h
+++ b/kresources/slox/sloxfolderdialog.h
@@ -19,7 +19,7 @@
#ifndef SLOXFOLDERDIALOG_H
#define SLOXFOLDERDIALOG_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
#include "sloxfolder.h"
@@ -32,11 +32,11 @@ class SloxFolderDialog : public KDialogBase
{
Q_OBJECT
public:
- SloxFolderDialog( SloxFolderManager *manager, FolderType type, QWidget* parent = 0, const char *name = 0 );
+ SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget* parent = 0, const char *name = 0 );
~SloxFolderDialog();
- QString selectedFolder() const;
- void setSelectedFolder( const QString &id );
+ TQString selectedFolder() const;
+ void setSelectedFolder( const TQString &id );
protected slots:
virtual void slotUser1();
@@ -48,7 +48,7 @@ class SloxFolderDialog : public KDialogBase
private:
KListView *mListView;
SloxFolderManager *mManager;
- QString mFolderId;
+ TQString mFolderId;
FolderType mFolderType;
};
diff --git a/kresources/slox/sloxfoldermanager.cpp b/kresources/slox/sloxfoldermanager.cpp
index b693767ca..41864caf8 100644
--- a/kresources/slox/sloxfoldermanager.cpp
+++ b/kresources/slox/sloxfoldermanager.cpp
@@ -17,9 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdom.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -46,7 +46,7 @@ SloxFolderManager::~SloxFolderManager()
{
if ( mDownloadJob )
mDownloadJob->kill();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = mFolders.begin(); it != mFolders.end(); ++it )
delete *it;
mFolders.clear();
@@ -64,9 +64,9 @@ void SloxFolderManager::requestFolders()
KURL url = mBaseUrl;
url.setPath( "/servlet/webdav.folders/file.xml" );
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( mRes, doc, prop, "objectmode", "NEW_AND_MODIFIED" );
WebdavHandler::addSloxElement( mRes, doc, prop, "lastsync", "0" );
WebdavHandler::addSloxElement( mRes, doc, prop, "foldertype", "PRIVATE" );
@@ -79,8 +79,8 @@ void SloxFolderManager::requestFolders()
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void SloxFolderManager::slotResult( KIO::Job *job )
@@ -91,12 +91,12 @@ void SloxFolderManager::slotResult( KIO::Job *job )
job->showErrorDialog( 0 );
} else {
kdDebug() << k_funcinfo << " success, writing to " << cacheFile() << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_WriteOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
return;
}
- QTextStream stream ( &f );
+ TQTextStream stream ( &f );
stream << mDownloadJob->response();
f.close();
readFolders();
@@ -106,11 +106,11 @@ void SloxFolderManager::slotResult( KIO::Job *job )
emit foldersUpdated();
}
-QString SloxFolderManager::cacheFile() const
+TQString SloxFolderManager::cacheFile() const
{
- QString host = mBaseUrl.host();
+ TQString host = mBaseUrl.host();
- QString file = locateLocal( "cache", "slox/folders_" + host );
+ TQString file = locateLocal( "cache", "slox/folders_" + host );
kdDebug() << k_funcinfo << file << endl;
@@ -121,29 +121,29 @@ void SloxFolderManager::readFolders()
{
kdDebug() << k_funcinfo << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
requestFolders();
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &f );
mFolders.clear();
- QDomNodeList nodes = doc.elementsByTagName( "D:prop" );
+ TQDomNodeList nodes = doc.elementsByTagName( "D:prop" );
for( uint i = 0; i < nodes.count(); ++i ) {
- QDomElement element = nodes.item(i).toElement();
- QString id = "-1", parentId = "-1"; // OX default folder
+ TQDomElement element = nodes.item(i).toElement();
+ TQString id = "-1", parentId = "-1"; // OX default folder
bool def = false;
- QString name, type;
- QDomNode n;
+ TQString name, type;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
- QString value = e.text();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
+ TQString value = e.text();
if ( tag == "ox:object_id" ) id = value;
else if ( tag == "ox:folder_id" ) parentId = value;
else if ( tag == "ox:title" ) name = value;
diff --git a/kresources/slox/sloxfoldermanager.h b/kresources/slox/sloxfoldermanager.h
index 3adac2061..832c70675 100644
--- a/kresources/slox/sloxfoldermanager.h
+++ b/kresources/slox/sloxfoldermanager.h
@@ -20,8 +20,8 @@
#ifndef SLOXFOLDERMANAGER_H
#define SLOXFOLDERMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -42,7 +42,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
SloxFolderManager( SloxBase *res, const KURL &baseUrl );
~SloxFolderManager();
- QMap<QString, SloxFolder*> folders() const { return mFolders; }
+ TQMap<TQString, SloxFolder*> folders() const { return mFolders; }
void requestFolders();
signals:
@@ -51,7 +51,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
protected:
void readFolders();
- QString cacheFile() const;
+ TQString cacheFile() const;
protected slots:
void slotResult( KIO::Job * );
@@ -59,7 +59,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
private:
KIO::DavJob *mDownloadJob;
KURL mBaseUrl;
- QMap<QString, SloxFolder*> mFolders;
+ TQMap<TQString, SloxFolder*> mFolders;
SloxBase *mRes;
};
diff --git a/kresources/slox/testsloxaccounts.cpp b/kresources/slox/testsloxaccounts.cpp
index c1cc75d3e..6ad10c1b1 100644
--- a/kresources/slox/testsloxaccounts.cpp
+++ b/kresources/slox/testsloxaccounts.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
static const KCmdLineOptions options[] =
{
@@ -48,14 +48,14 @@ int main(int argc,char **argv)
bool verbose = false;
if ( args->isSet( "verbose" ) ) verbose = true;
- QPushButton button( "Close", 0 );
+ TQPushButton button( "Close", 0 );
SloxAccounts::setServer( "f85.suse.de" );
SloxAccounts::self();
app.setMainWidget( &button );
button.show();
- QObject::connect( &button, SIGNAL( clicked() ), &app, SLOT( quit() ) );
+ TQObject::connect( &button, TQT_SIGNAL( clicked() ), &app, TQT_SLOT( quit() ) );
app.exec();
}
diff --git a/kresources/slox/webdavhandler.cpp b/kresources/slox/webdavhandler.cpp
index 511373d51..3f1b6be86 100644
--- a/kresources/slox/webdavhandler.cpp
+++ b/kresources/slox/webdavhandler.cpp
@@ -39,7 +39,7 @@
#include <kdebug.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
SloxItem::SloxItem()
: status( Invalid )
@@ -57,81 +57,81 @@ WebdavHandler::WebdavHandler()
kdDebug() << "LOG FILE: " << mLogFile << endl;
}
-void WebdavHandler::setUserId( const QString &id )
+void WebdavHandler::setUserId( const TQString &id )
{
mUserId = id;
}
-QString WebdavHandler::userId() const
+TQString WebdavHandler::userId() const
{
return mUserId;
}
-void WebdavHandler::log( const QString &text )
+void WebdavHandler::log( const TQString &text )
{
if ( mLogFile.isEmpty() ) return;
- QString filename = mLogFile + "-" + QString::number( mLogCount );
- QFile file( filename );
+ TQString filename = mLogFile + "-" + TQString::number( mLogCount );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) {
kdWarning() << "Unable to open log file '" << filename << "'" << endl;
return;
}
- QCString textUtf8 = text.utf8();
+ TQCString textUtf8 = text.utf8();
file.writeBlock( textUtf8.data(), textUtf8.size() - 1 );
if ( ++mLogCount > 5 ) mLogCount = 0;
}
-QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocument &doc )
+TQValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const TQDomDocument &doc )
{
kdDebug() << "getSloxItems" << endl;
- QValueList<SloxItem> items;
+ TQValueList<SloxItem> items;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
- QDomNode responseNode;
+ TQDomNode responseNode;
for( responseNode = docElement.firstChild(); !responseNode.isNull();
responseNode = responseNode.nextSibling() ) {
- QDomElement responseElement = responseNode.toElement();
+ TQDomElement responseElement = responseNode.toElement();
if ( responseElement.tagName() == "response" ) {
SloxItem item;
- QDomNode propstat = responseElement.namedItem( "propstat" );
+ TQDomNode propstat = responseElement.namedItem( "propstat" );
if ( propstat.isNull() ) {
kdError() << "Unable to find propstat tag." << endl;
continue;
}
- QDomNode prop = propstat.namedItem( "prop" );
+ TQDomNode prop = propstat.namedItem( "prop" );
if ( prop.isNull() ) {
kdError() << "Unable to find WebDAV property" << endl;
continue;
}
item.domNode = prop;
- QDomNode sloxIdNode = prop.namedItem( res->fieldName( SloxBase::ObjectId ) );
+ TQDomNode sloxIdNode = prop.namedItem( res->fieldName( SloxBase::ObjectId ) );
if ( sloxIdNode.isNull() ) {
kdError() << "Unable to find SLOX id." << endl;
continue;
}
- QDomElement sloxIdElement = sloxIdNode.toElement();
+ TQDomElement sloxIdElement = sloxIdNode.toElement();
item.sloxId = sloxIdElement.text();
- QDomNode clientIdNode = prop.namedItem( res->fieldName( SloxBase::ClientId ) );
+ TQDomNode clientIdNode = prop.namedItem( res->fieldName( SloxBase::ClientId ) );
if ( !clientIdNode.isNull() ) {
- QDomElement clientIdElement = clientIdNode.toElement();
+ TQDomElement clientIdElement = clientIdNode.toElement();
item.clientId = clientIdElement.text();
if ( item.clientId != item.sloxId )
item.status = SloxItem::New;
}
- QDomNode sloxStatus = prop.namedItem( res->fieldName( SloxBase::ObjectStatus ) );
+ TQDomNode sloxStatus = prop.namedItem( res->fieldName( SloxBase::ObjectStatus ) );
if ( !sloxStatus.isNull() ) {
- QDomElement sloxStatusElement = sloxStatus.toElement();
+ TQDomElement sloxStatusElement = sloxStatus.toElement();
if ( sloxStatusElement.text() == "DELETE" ) {
item.status = SloxItem::Delete;
} else if ( sloxStatusElement.text() == "CREATE" ) {
@@ -139,14 +139,14 @@ QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocum
}
}
- QDomNode status = propstat.namedItem( "status" );
+ TQDomNode status = propstat.namedItem( "status" );
if ( status.isNull() ) {
kdError() << "Unable to find WebDAV status" << endl;
continue;
}
item.response = status.toElement().text();
- QDomNode desc = propstat.namedItem( "responsedescription" );
+ TQDomNode desc = propstat.namedItem( "responsedescription" );
if ( desc.isNull() ) {
kdError() << "Unable to find WebDAV responsedescription" << endl;
continue;
@@ -160,22 +160,22 @@ QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocum
return items;
}
-QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt )
+TQString WebdavHandler::qDateTimeToSlox( const TQDateTime &dt )
{
- uint ticks = -dt.secsTo( QDateTime( QDate( 1970, 1, 1 ), QTime( 0, 0 ) ) );
+ uint ticks = -dt.secsTo( TQDateTime( TQDate( 1970, 1, 1 ), TQTime( 0, 0 ) ) );
- return QString::number( ticks ) + "000";
+ return TQString::number( ticks ) + "000";
}
-QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt,
- const QString &timeZoneId )
+TQString WebdavHandler::qDateTimeToSlox( const TQDateTime &dt,
+ const TQString &timeZoneId )
{
- QDateTime utc = KPimPrefs::localTimeToUtc( dt, timeZoneId );
+ TQDateTime utc = KPimPrefs::localTimeToUtc( dt, timeZoneId );
// secsTo and toTime_t etc also perform a timezone conversion using the system timezone,
// but we want to use the calendar timezone, so we have to convert ourself and spoof the tz to UTC before
// converting to ticks to prevent this
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", "UTC", 1 );
uint ticks = utc.toTime_t();
if ( origTz.isNull() )
@@ -183,12 +183,12 @@ QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt,
else
setenv( "TZ", origTz, 1 );
- return QString::number( ticks ) + "000";
+ return TQString::number( ticks ) + "000";
}
-QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
+TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str )
{
- QString s = str.mid( 0, str.length() - 3 );
+ TQString s = str.mid( 0, str.length() - 3 );
bool preEpoch = s.startsWith("-");
if (preEpoch)
@@ -196,7 +196,7 @@ QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
unsigned long ticks = s.toULong();
- QDateTime dt;
+ TQDateTime dt;
if (preEpoch) {
dt.setTime_t( 0, Qt::UTC );
@@ -214,60 +214,60 @@ QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
return dt;
}
-QDateTime WebdavHandler::sloxToQDateTime( const QString &str,
- const QString &timeZoneId )
+TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str,
+ const TQString &timeZoneId )
{
return KPimPrefs::utcToLocalTime( sloxToQDateTime(str), timeZoneId );
}
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElementNS( "DAV:", "D:" + tag );
+ TQDomElement el = doc.createElementNS( "DAV:", "D:" + tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addSloxElement( SloxBase *res,
- QDomDocument &doc, QDomNode &node,
- const QString &tag,
- const QString &text )
+TQDomElement WebdavHandler::addSloxElement( SloxBase *res,
+ TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag,
+ const TQString &text )
{
- QDomElement el;
+ TQDomElement el;
if ( res->resType() == "ox" )
el = doc.createElementNS( "http://www.open-xchange.org", "ox:" + tag );
else
el = doc.createElementNS( "SLOX", "S:" + tag );
if ( !text.isEmpty() ) {
- QDomText textnode = doc.createTextNode( text );
+ TQDomText textnode = doc.createTextNode( text );
el.appendChild( textnode );
}
node.appendChild( el );
return el;
}
-void WebdavHandler::parseSloxAttribute( const QDomElement &e )
+void WebdavHandler::parseSloxAttribute( const TQDomElement &e )
{
// kdDebug() << "parseSloxAttribute" << endl;
- QString tag = e.tagName();
- QString text = QString::fromUtf8( e.text().latin1() );
+ TQString tag = e.tagName();
+ TQString text = TQString::fromUtf8( e.text().latin1() );
if ( text.isEmpty() ) return;
if ( tag == "owner" ) {
if ( text == mUserId ) mWritable = true;
} else if ( tag == "writerights" ) {
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e2 = n.toElement();
+ TQDomElement e2 = n.toElement();
if ( e2.tagName() == "member" ) {
if ( e2.text() == mUserId ) mWritable = true;
}
diff --git a/kresources/slox/webdavhandler.h b/kresources/slox/webdavhandler.h
index b41499a4a..2d4286193 100644
--- a/kresources/slox/webdavhandler.h
+++ b/kresources/slox/webdavhandler.h
@@ -20,10 +20,10 @@
#ifndef WEBDAVHANDLER_H
#define WEBDAVHANDLER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
#include <kdepimmacros.h>
#include <kabc/addressee.h>
@@ -41,12 +41,12 @@ class KDE_EXPORT SloxItem
SloxItem();
- QDomNode domNode;
- QString sloxId;
- QString clientId;
+ TQDomNode domNode;
+ TQString sloxId;
+ TQString clientId;
Status status;
- QString response;
- QString responseDescription;
+ TQString response;
+ TQString responseDescription;
};
class KDE_EXPORT WebdavHandler
@@ -54,41 +54,41 @@ class KDE_EXPORT WebdavHandler
public:
WebdavHandler();
- void setUserId( const QString & );
- QString userId() const;
+ void setUserId( const TQString & );
+ TQString userId() const;
void setResource( SloxBase *res ) { mRes = res; }
- void log( const QString & );
+ void log( const TQString & );
- static QDomElement addElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addDavElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addSloxElement( SloxBase *res,
- QDomDocument &, QDomNode &,
- const QString &tag,
- const QString &text = QString::null );
+ static TQDomElement addElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addDavElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addSloxElement( SloxBase *res,
+ TQDomDocument &, TQDomNode &,
+ const TQString &tag,
+ const TQString &text = TQString::null );
- static QDateTime sloxToQDateTime( const QString &str );
- static QDateTime sloxToQDateTime( const QString &str,
- const QString &timeZoneId );
- static QString qDateTimeToSlox( const QDateTime &dt );
- static QString qDateTimeToSlox( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime sloxToQDateTime( const TQString &str );
+ static TQDateTime sloxToQDateTime( const TQString &str,
+ const TQString &timeZoneId );
+ static TQString qDateTimeToSlox( const TQDateTime &dt );
+ static TQString qDateTimeToSlox( const TQDateTime &dt,
+ const TQString &timeZoneId );
- static QValueList<SloxItem> getSloxItems( SloxBase *res, const QDomDocument &doc );
+ static TQValueList<SloxItem> getSloxItems( SloxBase *res, const TQDomDocument &doc );
void clearSloxAttributeStatus();
- void parseSloxAttribute( const QDomElement & );
+ void parseSloxAttribute( const TQDomElement & );
void setSloxAttributes( KCal::Incidence * );
void setSloxAttributes( KABC::Addressee & );
private:
- QString mLogFile;
+ TQString mLogFile;
int mLogCount;
SloxBase *mRes;
- QString mUserId;
+ TQString mUserId;
bool mWritable;
};