diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kresources/slox | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/slox')
-rw-r--r-- | kresources/slox/kabcresourceslox.cpp | 28 | ||||
-rw-r--r-- | kresources/slox/kabcresourceslox.h | 3 | ||||
-rw-r--r-- | kresources/slox/kabcresourcesloxconfig.cpp | 4 | ||||
-rw-r--r-- | kresources/slox/kabcresourcesloxconfig.h | 3 | ||||
-rw-r--r-- | kresources/slox/kcalresourceslox.cpp | 124 | ||||
-rw-r--r-- | kresources/slox/kcalresourceslox.h | 9 | ||||
-rw-r--r-- | kresources/slox/kcalresourcesloxconfig.cpp | 4 | ||||
-rw-r--r-- | kresources/slox/kcalresourcesloxconfig.h | 3 | ||||
-rw-r--r-- | kresources/slox/sloxaccounts.cpp | 8 | ||||
-rw-r--r-- | kresources/slox/sloxaccounts.h | 3 | ||||
-rw-r--r-- | kresources/slox/sloxbase.h | 2 | ||||
-rw-r--r-- | kresources/slox/sloxfolder.cpp | 4 | ||||
-rw-r--r-- | kresources/slox/sloxfolder.h | 4 | ||||
-rw-r--r-- | kresources/slox/sloxfolderdialog.cpp | 14 | ||||
-rw-r--r-- | kresources/slox/sloxfolderdialog.h | 3 | ||||
-rw-r--r-- | kresources/slox/sloxfoldermanager.cpp | 10 | ||||
-rw-r--r-- | kresources/slox/sloxfoldermanager.h | 3 | ||||
-rw-r--r-- | kresources/slox/webdavhandler.cpp | 18 | ||||
-rw-r--r-- | kresources/slox/webdavhandler.h | 12 |
19 files changed, 133 insertions, 126 deletions
diff --git a/kresources/slox/kabcresourceslox.cpp b/kresources/slox/kabcresourceslox.cpp index 433a6adb0..76e233ce8 100644 --- a/kresources/slox/kabcresourceslox.cpp +++ b/kresources/slox/kabcresourceslox.cpp @@ -194,7 +194,7 @@ bool ResourceSlox::asyncLoad() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->folderId() ); @@ -246,7 +246,7 @@ void ResourceSlox::slotResult( KIO::Job *job ) TQString uid = "kresources_slox_kabc_" + item.sloxId; if ( item.status == SloxItem::Delete ) { TQMap<TQString,Addressee>::Iterator it; - it = mAddrMap.find( uid ); + it = mAddrMap.tqfind( uid ); if ( it != mAddrMap.end() ) { mAddrMap.remove( it ); changed = true; @@ -255,7 +255,7 @@ void ResourceSlox::slotResult( KIO::Job *job ) Addressee a; a.setUid( uid ); - mWebdavHandler.clearSloxAttributeStatus(); + mWebdavHandler.clearSloxAttributetqStatus(); TQDomNode n; for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) { @@ -312,7 +312,7 @@ void ResourceSlox::slotUploadResult( KIO::Job *job ) } if ( item.status == SloxItem::New ) { TQMap<TQString,Addressee>::Iterator search_res; - search_res = mAddrMap.find( item.clientId ); + search_res = mAddrMap.tqfind( item.clientId ); if ( search_res != mAddrMap.end() ) { // use the id provided by the server Addressee a = *search_res; @@ -344,7 +344,7 @@ void ResourceSlox::parseContactAttribute( const TQDomElement &e, Addressee &a ) int pnType = 0; if ( tag == fieldName( Birthday ) ) { - TQDateTime dt = WebdavHandler::sloxToQDateTime( text ); + TQDateTime dt = WebdavHandler::sloxToTQDateTime( text ); a.setBirthday( dt.date() ); } else if ( tag == fieldName( Role ) ) { a.setRole( text ); @@ -400,8 +400,8 @@ void ResourceSlox::parseContactAttribute( const TQDomElement &e, Addressee &a ) } else if ( tag == fieldName( SpousesName ) ) { a.insertCustom( "KADDRESSBOOK", "X-SpousesName", text ); } else if ( tag == fieldName( Anniversary ) ) { - TQDateTime dt = WebdavHandler::sloxToQDateTime( text ); - a.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt.toString( Qt::ISODate ) ); + TQDateTime dt = WebdavHandler::sloxToTQDateTime( text ); + a.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt.toString( TQt::ISODate ) ); } else if ( tag == fieldName( Categories ) ) { a.setCategories( TQStringList::split( TQRegExp(",\\s*"), text ) ); } else if ( type() == "ox" ) { // FIXME: Address reading is missing for SLOX @@ -576,7 +576,7 @@ void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop TQString anniversary = a.custom( "KADDRESSBOOK", "X-Anniversary" ); if ( !anniversary.isEmpty() ) WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ), - WebdavHandler::qDateTimeToSlox( TQDateTime::fromString( anniversary, Qt::ISODate ).date() ) ); + WebdavHandler::qDateTimeToSlox( TQDateTime::fromString( anniversary, TQt::ISODate ).date() ) ); else WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ) ); } @@ -631,14 +631,14 @@ void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop } } -void KABC::ResourceSlox::createAddressFields( TQDomDocument &doc, TQDomElement &parent, +void KABC::ResourceSlox::createAddressFields( TQDomDocument &doc, TQDomElement &tqparent, 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() ); - WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( City ), addr.locality() ); - WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( State ), addr.region() ); - WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( Country ), addr.country() ); + WebdavHandler::addSloxElement( this, doc, tqparent, prefix + fieldName( Street ), addr.street() ); + WebdavHandler::addSloxElement( this, doc, tqparent, prefix + fieldName( PostalCode ), addr.postalCode() ); + WebdavHandler::addSloxElement( this, doc, tqparent, prefix + fieldName( City ), addr.locality() ); + WebdavHandler::addSloxElement( this, doc, tqparent, prefix + fieldName( State ), addr.region() ); + WebdavHandler::addSloxElement( this, doc, tqparent, prefix + fieldName( Country ), addr.country() ); } void ResourceSlox::slotProgress( KIO::Job *job, unsigned long percent ) diff --git a/kresources/slox/kabcresourceslox.h b/kresources/slox/kabcresourceslox.h index 5815acd4a..d7d3417f7 100644 --- a/kresources/slox/kabcresourceslox.h +++ b/kresources/slox/kabcresourceslox.h @@ -48,6 +48,7 @@ class SloxPrefs; class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase { Q_OBJECT + TQ_OBJECT public: ResourceSlox( const KConfig * ); ResourceSlox( const KURL &url, @@ -80,7 +81,7 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase void parseContactAttribute( const TQDomElement &e, Addressee &a ); void createAddresseeFields( TQDomDocument &doc, TQDomElement &prop, const Addressee &a ); - void createAddressFields( TQDomDocument &doc, TQDomElement &parent, + void createAddressFields( TQDomDocument &doc, TQDomElement &tqparent, const TQString &prefix, const KABC::Address &addr ); void uploadContacts(); diff --git a/kresources/slox/kabcresourcesloxconfig.cpp b/kresources/slox/kabcresourcesloxconfig.cpp index abacaf718..d6760156b 100644 --- a/kresources/slox/kabcresourcesloxconfig.cpp +++ b/kresources/slox/kabcresourcesloxconfig.cpp @@ -39,8 +39,8 @@ using namespace KABC; -ResourceSloxConfig::ResourceSloxConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ), mRes( 0 ) +ResourceSloxConfig::ResourceSloxConfig( TQWidget* tqparent, const char* name ) + : KRES::ConfigWidget( tqparent, name ), mRes( 0 ) { TQGridLayout *mainLayout = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); diff --git a/kresources/slox/kabcresourcesloxconfig.h b/kresources/slox/kabcresourcesloxconfig.h index 63031045c..2392d5cc7 100644 --- a/kresources/slox/kabcresourcesloxconfig.h +++ b/kresources/slox/kabcresourcesloxconfig.h @@ -35,9 +35,10 @@ namespace KABC { class KDE_EXPORT ResourceSloxConfig : public KRES::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ResourceSloxConfig( TQWidget* parent = 0, const char* name = 0 ); + ResourceSloxConfig( TQWidget* tqparent = 0, const char* name = 0 ); public slots: void loadSettings( KRES::Resource* ); diff --git a/kresources/slox/kcalresourceslox.cpp b/kresources/slox/kcalresourceslox.cpp index 668631d37..40afcd7e8 100644 --- a/kresources/slox/kcalresourceslox.cpp +++ b/kresources/slox/kcalresourceslox.cpp @@ -213,7 +213,7 @@ void KCalResourceSlox::requestEvents() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->calendarFolderId() ); @@ -258,7 +258,7 @@ void KCalResourceSlox::requestTodos() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->taskFolderId() ); @@ -393,17 +393,17 @@ void KCalResourceSlox::uploadIncidences() } void KCalResourceSlox::createIncidenceAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, Incidence *incidence ) { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( IncidenceTitle ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( IncidenceTitle ), incidence->summary() ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Description ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Description ), incidence->description() ); if ( incidence->attendeeCount() > 0 ) { - TQDomElement members = WebdavHandler::addSloxElement( this, doc, parent, + TQDomElement members = WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Participants ) ); Attendee::List attendees = incidence->attendees(); Attendee::List::ConstIterator it; @@ -428,62 +428,62 @@ void KCalResourceSlox::createIncidenceAttributes( TQDomDocument &doc, // TODO OX support if ( incidence->secrecy() == Incidence::SecrecyPublic && type() != "ox" ) { - TQDomElement rights = WebdavHandler::addSloxElement( this, doc, parent, "readrights" ); + TQDomElement rights = WebdavHandler::addSloxElement( this, doc, tqparent, "readrights" ); WebdavHandler::addSloxElement( this, doc, rights, "group", "users" ); } // set reminder as the number of minutes to the start of the event KCal::Alarm::List alarms = incidence->alarms(); if ( !alarms.isEmpty() && alarms.first()->hasStartOffset() && alarms.first()->enabled() ) - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Reminder ), TQString::number( (-1) * alarms.first()->startOffset().asSeconds() / 60 ) ); else - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ), "0" ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Reminder ), "0" ); // categories - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Categories ), incidence->categories().join( ", " ) ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Categories ), incidence->categories().join( ", " ) ); } void KCalResourceSlox::createEventAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, Event *event ) { 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 ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( FolderId ), folderId ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( EventBegin ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( EventBegin ), WebdavHandler::qDateTimeToSlox( event->dtStart(), timeZoneId() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( EventEnd ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( EventEnd ), WebdavHandler::qDateTimeToSlox( event->dtEnd(), timeZoneId() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Location ), event->location() ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Location ), event->location() ); if ( event->doesFloat() ) { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( FullTime ), boolToStr( true ) ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( FullTime ), boolToStr( true ) ); } else { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( FullTime ), boolToStr( false ) ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( FullTime ), boolToStr( false ) ); } } void KCalResourceSlox::createTodoAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, Todo *todo ) { 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 ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( FolderId ), folderId ); if ( todo->hasStartDate() ) { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( TaskBegin ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( TaskBegin ), WebdavHandler::qDateTimeToSlox( todo->dtStart(), timeZoneId() ) ); } if ( todo->hasDueDate() ) { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( TaskEnd ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( TaskEnd ), WebdavHandler::qDateTimeToSlox( todo->dtDue(), timeZoneId() ) ); } @@ -502,18 +502,18 @@ void KCalResourceSlox::createTodoAttributes( TQDomDocument &doc, txt = "2"; break; } - WebdavHandler::addSloxElement( this, doc, parent, fieldName( Priority ), txt ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( Priority ), txt ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( PercentComplete ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( PercentComplete ), TQString::number( todo->percentComplete() ) ); } void KCalResourceSlox::createRecurrenceAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, KCal::Incidence *incidence ) { if ( !incidence->doesRecur() ) { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), type() == "ox" ? "none" : "no" ); return; } @@ -521,13 +521,13 @@ void KCalResourceSlox::createRecurrenceAttributes( TQDomDocument &doc, int monthOffset = ( type() == "ox" ? -1 : 0 ); switch ( r->recurrenceType() ) { case Recurrence::rDaily: - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "daily" ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceDailyFreq ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), "daily" ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceDailyFreq ), TQString::number( r->frequency() ) ); break; case Recurrence::rWeekly: { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "weekly" ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceWeeklyFreq ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), "weekly" ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceWeeklyFreq ), TQString::number( r->frequency() ) ); // TODO: SLOX support int oxDays = 0; @@ -536,61 +536,61 @@ void KCalResourceSlox::createRecurrenceAttributes( TQDomDocument &doc, oxDays += 1 << ( ( i + 1 ) % 7 ); } if ( type() == "ox" ) - WebdavHandler::addSloxElement( this, doc, parent, "days", TQString::number( oxDays ) ); + WebdavHandler::addSloxElement( this, doc, tqparent, "days", TQString::number( oxDays ) ); break; } case Recurrence::rMonthlyDay: - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "monthly" ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyFreq ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), "monthly" ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceMonthlyFreq ), TQString::number( r->frequency() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyDay ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceMonthlyDay ), TQString::number( r->monthDays().first() ) ); break; case Recurrence::rMonthlyPos: { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), type() == "ox" ? "monthly" : "monthly2" ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Freq ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceMonthly2Freq ), TQString::number( r->frequency() ) ); RecurrenceRule::WDayPos wdp = r->monthPositions().first(); // TODO: SLOX support - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Day ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceMonthly2Day ), TQString::number( 1 << wdp.day() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Pos ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceMonthly2Pos ), TQString::number( wdp.pos() ) ); break; } case Recurrence::rYearlyMonth: - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "yearly" ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyDay ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), "yearly" ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceYearlyDay ), TQString::number( r->yearDates().first() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyMonth ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceYearlyMonth ), TQString::number( r->yearMonths().first() + monthOffset ) ); if ( type() == "ox" ) - WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" ); + WebdavHandler::addSloxElement( this, doc, tqparent, "interval", "1" ); break; case Recurrence::rYearlyPos: { - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceType ), type() == "ox" ? "yearly" : "yearly2" ); RecurrenceRule::WDayPos wdp = r->monthPositions().first(); // TODO: SLOX support - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Day ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceYearly2Day ), TQString::number( 1 << wdp.day() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Pos ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceYearly2Pos ), TQString::number( wdp.pos() ) ); - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Month ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceYearly2Month ), TQString::number( r->yearMonths().first() + monthOffset ) ); if ( type() == "ox" ) - WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" ); + WebdavHandler::addSloxElement( this, doc, tqparent, "interval", "1" ); break; } default: kdDebug() << k_funcinfo << "unsupported recurrence type: " << r->recurrenceType() << endl; } - WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceEnd ), + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceEnd ), WebdavHandler::qDateTimeToSlox( r->endDateTime() ) ); // delete exceptions DateList exlist = r->exDates(); 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( "," ) ); + WebdavHandler::addSloxElement( this, doc, tqparent, fieldName( RecurrenceDelEx ), res.join( "," ) ); } void KCalResourceSlox::parseMembersAttribute( const TQDomElement &e, @@ -629,11 +629,11 @@ void KCalResourceSlox::parseMembersAttribute( const TQDomElement &e, TQString status = memberElement.attribute( "confirm" ); if ( !status.isEmpty() ) { if ( status == "accept" ) { - a->seStatus( Attendee::Accepted ); + a->setqStatus( Attendee::Accepted ); } else if ( status == "decline" ) { - a->seStatus( Attendee::Declined ); + a->setqStatus( Attendee::Declined ); } else { - a->seStatus( Attendee::NeedsAction ); + a->setqStatus( Attendee::NeedsAction ); } } } else { @@ -710,19 +710,19 @@ void KCalResourceSlox::parseEventAttribute( const TQDomElement &e, TQDateTime dt; if ( event->doesFloat() ) { if ( type() == "ox" ) - dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() ); + dt = WebdavHandler::sloxToTQDateTime( text, timeZoneId() ); else - dt = WebdavHandler::sloxToQDateTime( text ); // ### is this really correct for SLOX? + dt = WebdavHandler::sloxToTQDateTime( text ); // ### is this really correct for SLOX? } else - dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() ); + dt = WebdavHandler::sloxToTQDateTime( text, timeZoneId() ); event->setDtStart( dt ); } else if ( tag == fieldName( EventEnd ) ) { TQDateTime dt; if ( event->doesFloat() ) { - dt = WebdavHandler::sloxToQDateTime( text ); + dt = WebdavHandler::sloxToTQDateTime( text ); dt = dt.addSecs( -1 ); } - else dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() ); + else dt = WebdavHandler::sloxToTQDateTime( text, timeZoneId() ); event->setDtEnd( dt ); } else if ( tag == fieldName( Location ) ) { event->setLocation( text ); @@ -769,7 +769,7 @@ void KCalResourceSlox::parseRecurrence( const TQDomNode &node, Event *event ) } else if ( tag == "daily_value" ) { dailyValue = text.toInt(); } else if ( tag == fieldName( RecurrenceEnd ) ) { - end = WebdavHandler::sloxToQDateTime( text ); + end = WebdavHandler::sloxToTQDateTime( text ); } else if ( tag == "weekly_value" ) { weeklyValue = text.toInt(); } else if ( tag.left( 11 ) == "weekly_day_" ) { @@ -823,7 +823,7 @@ void KCalResourceSlox::parseRecurrence( const TQDomNode &node, Event *event ) TQStringList exdates = TQStringList::split( ",", text ); TQStringList::Iterator it; for ( it = exdates.begin(); it != exdates.end(); ++it ) - deleteExceptions.append( WebdavHandler::sloxToQDateTime( *it ).date() ); + deleteExceptions.append( WebdavHandler::sloxToTQDateTime( *it ).date() ); } } @@ -875,13 +875,13 @@ void KCalResourceSlox::parseTodoAttribute( const TQDomElement &e, if ( text.isEmpty() ) return; if ( tag == fieldName( TaskBegin ) ) { - TQDateTime dt = WebdavHandler::sloxToQDateTime( text ); + TQDateTime dt = WebdavHandler::sloxToTQDateTime( text ); if ( dt.isValid() ) { todo->setDtStart( dt ); todo->setHasStartDate( true ); } } else if ( tag == fieldName( TaskEnd ) ) { - TQDateTime dt = WebdavHandler::sloxToQDateTime( text ); + TQDateTime dt = WebdavHandler::sloxToTQDateTime( text ); if ( dt.isValid() ) { todo->setDtDue( dt ); todo->setHasDueDate( true ); @@ -953,7 +953,7 @@ void KCalResourceSlox::slotLoadTodosResult( KIO::Job *job ) todo->setCustomProperty( "SLOX", "ID", item.sloxId ); - mWebdavHandler.clearSloxAttributeStatus(); + mWebdavHandler.clearSloxAttributetqStatus(); TQDomNode n; for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) { @@ -1032,7 +1032,7 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job ) bool doesRecur = false; - mWebdavHandler.clearSloxAttributeStatus(); + mWebdavHandler.clearSloxAttributetqStatus(); for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) { TQDomElement e = n.toElement(); diff --git a/kresources/slox/kcalresourceslox.h b/kresources/slox/kcalresourceslox.h index 0f9b289dd..73e44a118 100644 --- a/kresources/slox/kcalresourceslox.h +++ b/kresources/slox/kcalresourceslox.h @@ -61,6 +61,7 @@ class SloxAccounts; class KDE_EXPORT KCalResourceSlox : public KCal::ResourceCached, public SloxBase { Q_OBJECT + TQ_OBJECT friend class KCalResourceSloxConfig; @@ -124,16 +125,16 @@ class KDE_EXPORT KCalResourceSlox : public KCal::ResourceCached, public SloxBase void parseRecurrence( const TQDomNode &n, KCal::Event *event ); void createIncidenceAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, KCal::Incidence *incidence ); void createEventAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, KCal::Event *event ); void createTodoAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, KCal::Todo *todo ); void createRecurrenceAttributes( TQDomDocument &doc, - TQDomElement &parent, + TQDomElement &tqparent, KCal::Incidence *incidence ); bool confirmSave(); diff --git a/kresources/slox/kcalresourcesloxconfig.cpp b/kresources/slox/kcalresourcesloxconfig.cpp index 441ea5336..8b1683ea5 100644 --- a/kresources/slox/kcalresourcesloxconfig.cpp +++ b/kresources/slox/kcalresourcesloxconfig.cpp @@ -40,8 +40,8 @@ #include "kcalresourcesloxconfig.h" -KCalResourceSloxConfig::KCalResourceSloxConfig( TQWidget* parent, const char* name ) : - KRES::ConfigWidget( parent, name ), mRes( 0 ) +KCalResourceSloxConfig::KCalResourceSloxConfig( TQWidget* tqparent, const char* name ) : + KRES::ConfigWidget( tqparent, name ), mRes( 0 ) { resize( 245, 115 ); TQGridLayout *mainLayout = new TQGridLayout( this, 6, 2, KDialog::spacingHint(), KDialog::spacingHint() ); diff --git a/kresources/slox/kcalresourcesloxconfig.h b/kresources/slox/kcalresourcesloxconfig.h index 7e7422b6f..56fef761e 100644 --- a/kresources/slox/kcalresourcesloxconfig.h +++ b/kresources/slox/kcalresourcesloxconfig.h @@ -45,8 +45,9 @@ class SloxBase; class KDE_EXPORT KCalResourceSloxConfig : public KRES::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - KCalResourceSloxConfig( TQWidget *parent = 0, const char *name = 0 ); + KCalResourceSloxConfig( TQWidget *tqparent = 0, const char *name = 0 ); public slots: virtual void loadSettings( KRES::Resource *resource ); diff --git a/kresources/slox/sloxaccounts.cpp b/kresources/slox/sloxaccounts.cpp index a49594ea7..de694b4f5 100644 --- a/kresources/slox/sloxaccounts.cpp +++ b/kresources/slox/sloxaccounts.cpp @@ -78,7 +78,7 @@ void SloxAccounts::insertUser( const TQString &id, const KABC::Addressee &a ) KABC::Addressee SloxAccounts::lookupUser( const TQString &id ) { TQMap<TQString, KABC::Addressee>::ConstIterator it; - it = mUsers.find( id ); + it = mUsers.tqfind( id ); if ( it == mUsers.end() ) { requestAccounts(); return KABC::Addressee(); @@ -99,7 +99,7 @@ TQString SloxAccounts::lookupId( const TQString &email ) } requestAccounts(); - int pos = email.find( '@' ); + int pos = email.tqfind( '@' ); if ( pos < 0 ) return email; else return email.left( pos ); } @@ -127,7 +127,7 @@ void SloxAccounts::requestAccounts() url.setPath( "/servlet/webdav.groupuser/" ); TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( mRes, doc, prop, "user", "*" ); WebdavHandler::addSloxElement( mRes, doc, prop, "group", "*" ); @@ -207,7 +207,7 @@ void SloxAccounts::readAccounts() TQDomElement e = n.toElement(); TQString tag = e.tagName(); // remove XML namespace - tag = tag.right( tag.length() - ( tag.find( ':' ) + 1 ) ); + tag = tag.right( tag.length() - ( tag.tqfind( ':' ) + 1 ) ); TQString value = e.text(); if ( tag == "uid" ) id = value; else if ( tag == "mail" ) a.insertEmail( value, true ); diff --git a/kresources/slox/sloxaccounts.h b/kresources/slox/sloxaccounts.h index bda5c4492..f971360cb 100644 --- a/kresources/slox/sloxaccounts.h +++ b/kresources/slox/sloxaccounts.h @@ -30,9 +30,10 @@ class Job; class SloxBase; -class KDE_EXPORT SloxAccounts : public QObject +class KDE_EXPORT SloxAccounts : public TQObject { Q_OBJECT + TQ_OBJECT public: SloxAccounts( SloxBase *res, const KURL &baseUrl ); ~SloxAccounts(); diff --git a/kresources/slox/sloxbase.h b/kresources/slox/sloxbase.h index dd96cc496..3a6e70555 100644 --- a/kresources/slox/sloxbase.h +++ b/kresources/slox/sloxbase.h @@ -35,7 +35,7 @@ class KDE_EXPORT SloxBase { FolderId, LastSync, ObjectType, - ObjecStatus, + ObjectqStatus, CreatedBy, Categories, IncidenceTitle, // incidence fields diff --git a/kresources/slox/sloxfolder.cpp b/kresources/slox/sloxfolder.cpp index fbfb9f051..0430f8eeb 100644 --- a/kresources/slox/sloxfolder.cpp +++ b/kresources/slox/sloxfolder.cpp @@ -21,10 +21,10 @@ #include "sloxfolder.h" -SloxFolder::SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def ) : +SloxFolder::SloxFolder( const TQString &id, const TQString &tqparentId, const TQString &type, const TQString &name, bool def ) : item( 0 ), mId( id ), - mParentId( parentId ), + mParentId( tqparentId ), mName( name ), mDefault( def ) { diff --git a/kresources/slox/sloxfolder.h b/kresources/slox/sloxfolder.h index e27399a66..967f83eda 100644 --- a/kresources/slox/sloxfolder.h +++ b/kresources/slox/sloxfolder.h @@ -35,10 +35,10 @@ enum FolderType { class KDE_EXPORT SloxFolder { public: - SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def = false ); + SloxFolder( const TQString &id, const TQString &tqparentId, const TQString &type, const TQString &name, bool def = false ); TQString id() const { return mId; } - TQString parentId() const { return mParentId; } + TQString tqparentId() const { return mParentId; } FolderType type() const { return mType; } TQString name() const; bool isDefault() const { return mDefault; } diff --git a/kresources/slox/sloxfolderdialog.cpp b/kresources/slox/sloxfolderdialog.cpp index dc3c59dc2..acf871b2f 100644 --- a/kresources/slox/sloxfolderdialog.cpp +++ b/kresources/slox/sloxfolderdialog.cpp @@ -25,8 +25,8 @@ #include "sloxfolderdialog.h" #include "sloxfoldermanager.h" -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" ) ), +SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget *tqparent, const char *name ) : + KDialogBase( tqparent, name, true, i18n("Select Folder"), Ok|Cancel|User1, Ok, false, KGuiItem( i18n("Reload"), "reload" ) ), mManager( manager ), mFolderType( type ) { @@ -70,11 +70,11 @@ void SloxFolderDialog::createFolderViewItem( SloxFolder *folder ) return; if ( folder->type() != mFolderType && folder->type() != Unbound ) return; - if( mManager->folders().tqcontains( folder->parentId() ) ) { - SloxFolder *parent = mManager->folders()[folder->parentId()]; - createFolderViewItem( parent ); - if ( parent->item ) - folder->item = new KListViewItem( parent->item ); + if( mManager->folders().tqcontains( folder->tqparentId() ) ) { + SloxFolder *tqparent = mManager->folders()[folder->tqparentId()]; + createFolderViewItem( tqparent ); + if ( tqparent->item ) + folder->item = new KListViewItem( tqparent->item ); else folder->item = new KListViewItem( mListView ); } else { diff --git a/kresources/slox/sloxfolderdialog.h b/kresources/slox/sloxfolderdialog.h index 6432a6495..3c2cac883 100644 --- a/kresources/slox/sloxfolderdialog.h +++ b/kresources/slox/sloxfolderdialog.h @@ -31,8 +31,9 @@ class SloxFolderManager; class SloxFolderDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget* parent = 0, const char *name = 0 ); + SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget* tqparent = 0, const char *name = 0 ); ~SloxFolderDialog(); TQString selectedFolder() const; diff --git a/kresources/slox/sloxfoldermanager.cpp b/kresources/slox/sloxfoldermanager.cpp index 41864caf8..b5fd39585 100644 --- a/kresources/slox/sloxfoldermanager.cpp +++ b/kresources/slox/sloxfoldermanager.cpp @@ -65,7 +65,7 @@ void SloxFolderManager::requestFolders() url.setPath( "/servlet/webdav.folders/file.xml" ); TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( mRes, doc, prop, "objectmode", "NEW_AND_MODIFIED" ); WebdavHandler::addSloxElement( mRes, doc, prop, "lastsync", "0" ); @@ -136,7 +136,7 @@ void SloxFolderManager::readFolders() TQDomNodeList nodes = doc.elementsByTagName( "D:prop" ); for( uint i = 0; i < nodes.count(); ++i ) { TQDomElement element = nodes.item(i).toElement(); - TQString id = "-1", parentId = "-1"; // OX default folder + TQString id = "-1", tqparentId = "-1"; // OX default folder bool def = false; TQString name, type; TQDomNode n; @@ -145,13 +145,13 @@ void SloxFolderManager::readFolders() 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:folder_id" ) tqparentId = value; else if ( tag == "ox:title" ) name = value; else if ( tag == "ox:module" ) type = value; else if ( tag == "ox:defaultfolder" ) def = (value == "true"); } - if ( id != "-1" && parentId != "-1" ) { - SloxFolder *folder = new SloxFolder( id, parentId, type, name, def ); + if ( id != "-1" && tqparentId != "-1" ) { + SloxFolder *folder = new SloxFolder( id, tqparentId, type, name, def ); mFolders[id] = folder; kdDebug() << k_funcinfo << "Found folder: " << folder->name() << endl; } diff --git a/kresources/slox/sloxfoldermanager.h b/kresources/slox/sloxfoldermanager.h index 832c70675..ee21c150d 100644 --- a/kresources/slox/sloxfoldermanager.h +++ b/kresources/slox/sloxfoldermanager.h @@ -35,9 +35,10 @@ class DavJob; class SloxBase; class SloxFolder; -class KDE_EXPORT SloxFolderManager : public QObject +class KDE_EXPORT SloxFolderManager : public TQObject { Q_OBJECT + TQ_OBJECT public: SloxFolderManager( SloxBase *res, const KURL &baseUrl ); ~SloxFolderManager(); diff --git a/kresources/slox/webdavhandler.cpp b/kresources/slox/webdavhandler.cpp index 576def371..b010e0e92 100644 --- a/kresources/slox/webdavhandler.cpp +++ b/kresources/slox/webdavhandler.cpp @@ -129,9 +129,9 @@ TQValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const TQDomDoc item.status = SloxItem::New; } - TQDomNode sloxStatus = prop.namedItem( res->fieldName( SloxBase::ObjecStatus ) ); - if ( !sloxStatus.isNull() ) { - TQDomElement sloxStatusElement = sloxStatus.toElement(); + TQDomNode sloxtqStatus = prop.namedItem( res->fieldName( SloxBase::ObjectqStatus ) ); + if ( !sloxtqStatus.isNull() ) { + TQDomElement sloxStatusElement = sloxtqStatus.toElement(); if ( sloxStatusElement.text() == "DELETE" ) { item.status = SloxItem::Delete; } else if ( sloxStatusElement.text() == "CREATE" ) { @@ -186,7 +186,7 @@ TQString WebdavHandler::qDateTimeToSlox( const TQDateTime &dt, return TQString::number( ticks ) + "000"; } -TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str ) +TQDateTime WebdavHandler::sloxToTQDateTime( const TQString &str ) { TQString s = str.mid( 0, str.length() - 3 ); @@ -199,7 +199,7 @@ TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str ) TQDateTime dt; if (preEpoch) { - dt.setTime_t( 0, Qt::UTC ); + dt.setTime_t( 0, TQt::UTC ); if (ticks > INT_MAX) { dt = dt.addSecs(-INT_MAX); ticks -= INT_MAX; @@ -208,16 +208,16 @@ TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str ) } else { - dt.setTime_t( ticks, Qt::UTC ); + dt.setTime_t( ticks, TQt::UTC ); } return dt; } -TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str, +TQDateTime WebdavHandler::sloxToTQDateTime( const TQString &str, const TQString &timeZoneId ) { - return KPimPrefs::utcToLocalTime( sloxToQDateTime(str), timeZoneId ); + return KPimPrefs::utcToLocalTime( sloxToTQDateTime(str), timeZoneId ); } TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node, @@ -276,7 +276,7 @@ void WebdavHandler::parseSloxAttribute( const TQDomElement &e ) } } -void WebdavHandler::clearSloxAttributeStatus() +void WebdavHandler::clearSloxAttributetqStatus() { if ( mRes->resType() == "ox" ) mWritable = true; // parseSloxAttribute() won't work for OX diff --git a/kresources/slox/webdavhandler.h b/kresources/slox/webdavhandler.h index 2d4286193..bbaf897f7 100644 --- a/kresources/slox/webdavhandler.h +++ b/kresources/slox/webdavhandler.h @@ -37,14 +37,14 @@ class SloxBase; class KDE_EXPORT SloxItem { public: - enum Status { Invalid, Delete, Create, New }; + enum tqStatus { Invalid, Delete, Create, New }; SloxItem(); TQDomNode domNode; TQString sloxId; TQString clientId; - Status status; + tqStatus status; TQString response; TQString responseDescription; }; @@ -67,10 +67,10 @@ class KDE_EXPORT WebdavHandler static TQDomElement addSloxElement( SloxBase *res, TQDomDocument &, TQDomNode &, const TQString &tag, - const TQString &text = TQString::null ); + const TQString &text = TQString() ); - static TQDateTime sloxToQDateTime( const TQString &str ); - static TQDateTime sloxToQDateTime( const TQString &str, + static TQDateTime sloxToTQDateTime( const TQString &str ); + static TQDateTime sloxToTQDateTime( const TQString &str, const TQString &timeZoneId ); static TQString qDateTimeToSlox( const TQDateTime &dt ); static TQString qDateTimeToSlox( const TQDateTime &dt, @@ -78,7 +78,7 @@ class KDE_EXPORT WebdavHandler static TQValueList<SloxItem> getSloxItems( SloxBase *res, const TQDomDocument &doc ); - void clearSloxAttributeStatus(); + void clearSloxAttributetqStatus(); void parseSloxAttribute( const TQDomElement & ); void setSloxAttributes( KCal::Incidence * ); void setSloxAttributes( KABC::Addressee & ); |