summaryrefslogtreecommitdiffstats
path: root/kresources/exchange/resourceexchange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/exchange/resourceexchange.cpp')
-rw-r--r--kresources/exchange/resourceexchange.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp
index 355244922..8e877f9b0 100644
--- a/kresources/exchange/resourceexchange.cpp
+++ b/kresources/exchange/resourceexchange.cpp
@@ -20,11 +20,11 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qwidgetlist.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqwidgetlist.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -78,7 +78,7 @@ ResourceExchange::ResourceExchange( const KConfig *config )
{
mLock = new KABC::LockNull( true );
- mTimeZoneId = QString::fromLatin1( "UTC" );
+ mTimeZoneId = TQString::fromLatin1( "UTC" );
kdDebug() << "Creating ResourceExchange" << endl;
if (config ) {
@@ -122,31 +122,31 @@ bool ResourceExchange::doOpen()
kdDebug() << "ResourceExchange::doOpen()" << endl;
mClient = new ExchangeClient( mAccount, mTimeZoneId );
- connect( mClient, SIGNAL( downloadFinished( int, const QString & ) ),
- SLOT( slotDownloadFinished( int, const QString & ) ) );
- connect( mClient, SIGNAL( event( KCal::Event *, const KURL & ) ),
- SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
+ connect( mClient, TQT_SIGNAL( downloadFinished( int, const TQString & ) ),
+ TQT_SLOT( slotDownloadFinished( int, const TQString & ) ) );
+ connect( mClient, TQT_SIGNAL( event( KCal::Event *, const KURL & ) ),
+ TQT_SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
#if 0
kdDebug() << "Creating monitor" << endl;
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( mAccount->host() );
mMonitor = new ExchangeMonitor( mAccount, ExchangeMonitor::CallBack, ip );
- connect( mMonitor, SIGNAL(notify( const QValueList<long>& , const QValueList<KURL>& )), this, SLOT(slotMonitorNotify( const QValueList<long>& , const QValueList<KURL>& )) );
- connect( mMonitor, SIGNAL(error(int , const QString&)), this, SLOT(slotMonitorError(int , const QString&)) );
+ connect( mMonitor, TQT_SIGNAL(notify( const TQValueList<long>& , const TQValueList<KURL>& )), this, TQT_SLOT(slotMonitorNotify( const TQValueList<long>& , const TQValueList<KURL>& )) );
+ connect( mMonitor, TQT_SIGNAL(error(int , const TQString&)), this, TQT_SLOT(slotMonitorError(int , const TQString&)) );
mMonitor->addWatch( mAccount->calendarURL(), ExchangeMonitor::UpdateNewMember, 1 );
#endif
- QWidgetList* widgets = QApplication::topLevelWidgets();
+ TQWidgetList* widgets = TQApplication::topLevelWidgets();
if ( !widgets->isEmpty() )
mClient->setWindow( widgets->first() );
delete widgets;
mDates = new DateSet();
- mEventDates = new QMap<Event,QDateTime>();
- mCacheDates = new QMap<QDate, QDateTime>();
+ mEventDates = new TQMap<Event,TQDateTime>();
+ mCacheDates = new TQMap<TQDate, TQDateTime>();
mCache = new CalendarLocal( mTimeZoneId );
// mOldestDate = 0L;
@@ -207,20 +207,20 @@ KABC::Lock *ResourceExchange::lock()
return mLock;
}
-void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QValueList<KURL>& urls )
+void ResourceExchange::slotMonitorNotify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls )
{
kdDebug() << "ResourceExchange::slotMonitorNotify()" << endl;
- QString result;
+ TQString result;
KPIM::ExchangeMonitor::IDList::ConstIterator it;
for ( it = IDs.begin(); it != IDs.end(); ++it ) {
if ( it == IDs.begin() )
- result += QString::number( (*it) );
+ result += TQString::number( (*it) );
else
- result += "," + QString::number( (*it) );
+ result += "," + TQString::number( (*it) );
}
kdDebug() << "Got signals for " << result << endl;
- QValueList<KURL>::ConstIterator it2;
+ TQValueList<KURL>::ConstIterator it2;
for ( it2 = urls.begin(); it2 != urls.end(); ++it2 ) {
kdDebug() << "URL: " << (*it2).prettyURL() << endl;
}
@@ -242,7 +242,7 @@ void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QVa
*/
}
-void ResourceExchange::slotMonitorError( int errorCode, const QString& moreInfo )
+void ResourceExchange::slotMonitorError( int errorCode, const TQString& moreInfo )
{
kdError() << "Ignoring error from Exchange monitor, code=" << errorCode << "; more info: " << moreInfo << endl;
}
@@ -295,7 +295,7 @@ void ResourceExchange::changeIncidence( Incidence *incidence )
}
}
-Event *ResourceExchange::event( const QString &uid )
+Event *ResourceExchange::event( const TQString &uid )
{
kdDebug(5800) << "ResourceExchange::event(): " << uid << endl;
@@ -306,7 +306,7 @@ Event *ResourceExchange::event( const QString &uid )
return event;
}
-void ResourceExchange::subscribeEvents( const QDate &start, const QDate &end )
+void ResourceExchange::subscribeEvents( const TQDate &start, const TQDate &end )
{
kdDebug(5800) << "ResourceExchange::subscribeEvents()" << endl;
// FIXME: possible race condition if several subscribe events are run close
@@ -325,7 +325,7 @@ void ResourceExchange::downloadedEvent( KCal::Event *event, const KURL &url )
}
void ResourceExchange::slotDownloadFinished( int result,
- const QString &moreinfo )
+ const TQString &moreinfo )
{
kdDebug() << "ResourceExchange::downloadFinished" << endl;
@@ -336,7 +336,7 @@ void ResourceExchange::slotDownloadFinished( int result,
}
}
-void ResourceExchange::unsubscribeEvents( const QDate &/*start*/, const QDate &/*end*/ )
+void ResourceExchange::unsubscribeEvents( const TQDate &/*start*/, const TQDate &/*end*/ )
{
kdDebug() << "ResourceExchange::unsubscribeEvents()" << endl;
}
@@ -376,7 +376,7 @@ Todo::List ResourceExchange::rawTodos( TodoSortField /*sortField*/, SortDirectio
return list;*/
}
-Todo *ResourceExchange::todo( const QString &/*uid*/ )
+Todo *ResourceExchange::todo( const TQString &/*uid*/ )
{
// We don't handle todos yet
return 0;
@@ -386,7 +386,7 @@ Todo *ResourceExchange::todo( const QString &/*uid*/ )
return mCache->todo( uid );*/
}
-Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
+Todo::List ResourceExchange::rawTodosForDate( const TQDate &/*date*/ )
{
Todo::List list;
// We don't handle todos yet
@@ -395,7 +395,7 @@ Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
return list;
}
-Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
+Alarm::List ResourceExchange::alarmsTo( const TQDateTime &to )
{
Alarm::List list;
if ( mCache )
@@ -404,13 +404,13 @@ Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
}
/* Invoked by korgac when checking alarms. Always updates the cache. */
-Alarm::List ResourceExchange::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceExchange::alarms( const TQDateTime &from, const TQDateTime &to )
{
kdDebug(5800) << "ResourceExchange::alarms(" << from.toString() << " - " << to.toString() << ")\n";
Alarm::List list;
- QDate start = from.date();
- QDate end = to.date();
+ TQDate start = from.date();
+ TQDate end = to.date();
if ( mCache ) {
@@ -453,22 +453,22 @@ void ResourceExchange::insertEvent(const Event *anEvent)
}
*/
-// taking a QDate, this function will look for an eventlist in the dict
+// taking a TQDate, this function will look for an eventlist in the dict
// with that date attached -
-Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
+Event::List ResourceExchange::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
if (!mCache) return Event::List();
// If the events for this date are not in the cache, or if they are old,
// get them again
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// kdDebug() << "Now is " << now.toString() << endl;
// kdDebug() << "mDates: " << mDates << endl;
- QDate start = QDate( qd.year(), qd.month(), 1 ); // First day of month
+ TQDate start = TQDate( qd.year(), qd.month(), 1 ); // First day of month
if ( mDates && ( !mDates->contains( start ) ||
(*mCacheDates)[start].secsTo( now ) > mCachedSeconds ) ) {
- QDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
+ TQDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
// Get events that occur in this period from the cache
Event::List oldEvents = mCache->rawEvents( start, end, false );
// And remove them all
@@ -509,7 +509,7 @@ Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
}
-Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceExchange::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
kdDebug() << "ResourceExchange::rawEvents(start,end,inclusive)" << endl;
@@ -517,7 +517,7 @@ Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
return mCache->rawEvents( start, end, inclusive );
}
-Event::List ResourceExchange::rawEventsForDate(const QDateTime &qdt)
+Event::List ResourceExchange::rawEventsForDate(const TQDateTime &qdt)
{
kdDebug() << "ResourceExchange::rawEventsForDate(qdt)" << endl;
return rawEventsForDate( qdt.date() );
@@ -556,7 +556,7 @@ bool ResourceExchange::deleteJournal(Journal */*journal*/)
// setModified( true );
}
-Journal::List ResourceExchange::journals(const QDate &/*date*/)
+Journal::List ResourceExchange::journals(const TQDate &/*date*/)
{
// We don't handle journals yet
return Journal::List();
@@ -566,7 +566,7 @@ Journal::List ResourceExchange::journals(const QDate &/*date*/)
return list;*/
}
-Journal *ResourceExchange::journal(const QString &/*uid*/)
+Journal *ResourceExchange::journal(const TQString &/*uid*/)
{
// We don't handle journals yet
return 0;
@@ -585,7 +585,7 @@ Journal::List ResourceExchange::rawJournals( JournalSortField /*sortField*/, Sor
return list;*/
}
-Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
+Journal::List ResourceExchange::rawJournalsForDate( const TQDate &/*date*/ )
{
// We don't handle journals yet
return Journal::List();
@@ -595,7 +595,7 @@ Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
return list;*/
}
-void ResourceExchange::setTimeZoneId( const QString &tzid )
+void ResourceExchange::setTimeZoneId( const TQString &tzid )
{
mTimeZoneId = tzid;
if ( mCache ) mCache->setTimeZoneId( tzid );