summaryrefslogtreecommitdiffstats
path: root/libkcal/resourcecached.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkcal/resourcecached.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/resourcecached.cpp')
-rw-r--r--libkcal/resourcecached.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 09862b25a..22fa79bb9 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,14 +43,14 @@
using namespace KCal;
ResourceCached::ResourceCached( const KConfig* config )
- : ResourceCalendar( config ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mReloadPolicy( ReloadNever ), mReloadInterval( 10 ),
mReloadTimer( 0, "mReloadTimer" ), mReloaded( false ),
mSavePolicy( SaveNever ), mSaveInterval( 10 ),
mSaveTimer( 0, "mSaveTimer" ), mIdMapper( "kcal/uidmaps/" )
{
- connect( &mReloadTimer, SIGNAL( timeout() ), SLOT( slotReload() ) );
- connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( slotSave() ) );
+ connect( &mReloadTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotReload() ) );
+ connect( &mSaveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSave() ) );
}
ResourceCached::~ResourceCached()
@@ -164,12 +164,12 @@ bool ResourceCached::deleteEvent( Event *event )
}
-Event *ResourceCached::event( const QString &uid )
+Event *ResourceCached::event( const TQString &uid )
{
return mCalendar.event( uid );
}
-Event::List ResourceCached::rawEventsForDate( const QDate &qd,
+Event::List ResourceCached::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -178,13 +178,13 @@ Event::List ResourceCached::rawEventsForDate( const QDate &qd,
return list;
}
-Event::List ResourceCached::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceCached::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
}
-Event::List ResourceCached::rawEventsForDate( const QDateTime &qdt )
+Event::List ResourceCached::rawEventsForDate( const TQDateTime &qdt )
{
return mCalendar.rawEventsForDate( qdt.date() );
}
@@ -215,12 +215,12 @@ Todo::List ResourceCached::rawTodos( TodoSortField sortField, SortDirection sort
return mCalendar.rawTodos( sortField, sortDirection );
}
-Todo *ResourceCached::todo( const QString &uid )
+Todo *ResourceCached::todo( const TQString &uid )
{
return mCalendar.todo( uid );
}
-Todo::List ResourceCached::rawTodosForDate( const QDate &date )
+Todo::List ResourceCached::rawTodosForDate( const TQDate &date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -233,7 +233,7 @@ bool ResourceCached::addJournal( Journal *journal )
return mCalendar.addJournal( journal );
}
-Journal *ResourceCached::journal( const QString &uid )
+Journal *ResourceCached::journal( const TQString &uid )
{
return mCalendar.journal( uid );
}
@@ -243,30 +243,30 @@ Journal::List ResourceCached::rawJournals( JournalSortField sortField, SortDirec
return mCalendar.rawJournals( sortField, sortDirection );
}
-Journal::List ResourceCached::rawJournalsForDate( const QDate &date )
+Journal::List ResourceCached::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
-Alarm::List ResourceCached::alarmsTo( const QDateTime &to )
+Alarm::List ResourceCached::alarmsTo( const TQDateTime &to )
{
return mCalendar.alarmsTo( to );
}
-Alarm::List ResourceCached::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceCached::alarms( const TQDateTime &from, const TQDateTime &to )
{
// kdDebug(5800) << "ResourceCached::alarms(" << from.toString() << " - " << to.toString() << ")\n";
return mCalendar.alarms( from, to );
}
-void ResourceCached::setTimeZoneId( const QString& tzid )
+void ResourceCached::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
}
-QString ResourceCached::timeZoneId() const
+TQString ResourceCached::timeZoneId() const
{
return mCalendar.timeZoneId();
}
@@ -317,7 +317,7 @@ void ResourceCached::clearCache()
void ResourceCached::cleanUpEventCache( const Event::List &eventList )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
@@ -346,7 +346,7 @@ void ResourceCached::cleanUpEventCache( const Event::List &eventList )
void ResourceCached::cleanUpTodoCache( const Todo::List &todoList )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
@@ -379,22 +379,22 @@ KPIM::IdMapper& ResourceCached::idMapper()
return mIdMapper;
}
-QString ResourceCached::cacheFile() const
+TQString ResourceCached::cacheFile() const
{
return locateLocal( "cache", "kcal/kresources/" + identifier() );
}
-QString ResourceCached::changesCacheFile( const QString &type ) const
+TQString ResourceCached::changesCacheFile( const TQString &type ) const
{
return locateLocal( "cache", "kcal/changescache/" + identifier() + "_" + type );
}
-void ResourceCached::saveChangesCache( const QMap<Incidence*, bool> &map, const QString &type )
+void ResourceCached::saveChangesCache( const TQMap<Incidence*, bool> &map, const TQString &type )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
bool isEmpty = true;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for ( it = map.begin(); it != map.end(); ++it ) {
isEmpty = false;
calendar.addIncidence( it.key()->clone() );
@@ -403,7 +403,7 @@ void ResourceCached::saveChangesCache( const QMap<Incidence*, bool> &map, const
if ( !isEmpty ) {
calendar.save( changesCacheFile( type ) );
} else {
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
file.remove();
}
@@ -417,9 +417,9 @@ void ResourceCached::saveChangesCache()
saveChangesCache( mChangedIncidences, "changed" );
}
-void ResourceCached::loadChangesCache( QMap<Incidence*, bool> &map, const QString &type )
+void ResourceCached::loadChangesCache( TQMap<Incidence*, bool> &map, const TQString &type )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( changesCacheFile( type ) ) )
calendar.load( changesCacheFile( type ) );
@@ -448,7 +448,7 @@ void ResourceCached::calendarIncidenceAdded( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mAddedIncidences.find( i );
if ( it == mAddedIncidences.end() ) {
mAddedIncidences.insert( i, true );
@@ -464,7 +464,7 @@ void ResourceCached::calendarIncidenceChanged( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mChangedIncidences.find( i );
// FIXME: If you modify an added incidence, there's no need to add it to mChangedIncidences!
if ( it == mChangedIncidences.end() ) {
@@ -481,7 +481,7 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mDeletedIncidences.find( i );
if ( it == mDeletedIncidences.end() ) {
mDeletedIncidences.insert( i, true );
@@ -493,7 +493,7 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i )
Incidence::List ResourceCached::addedIncidences() const
{
Incidence::List added;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it ) {
added.append( it.key() );
}
@@ -503,7 +503,7 @@ Incidence::List ResourceCached::addedIncidences() const
Incidence::List ResourceCached::changedIncidences() const
{
Incidence::List changed;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mChangedIncidences.begin(); it != mChangedIncidences.end(); ++it ) {
changed.append( it.key() );
}
@@ -513,7 +513,7 @@ Incidence::List ResourceCached::changedIncidences() const
Incidence::List ResourceCached::deletedIncidences() const
{
Incidence::List deleted;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mDeletedIncidences.begin(); it != mDeletedIncidences.end(); ++it ) {
deleted.append( it.key() );
}
@@ -523,7 +523,7 @@ Incidence::List ResourceCached::deletedIncidences() const
Incidence::List ResourceCached::allChanges() const
{
Incidence::List changes;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it ) {
changes.append( it.key() );
}
@@ -547,9 +547,9 @@ void ResourceCached::clearChange( Incidence *incidence )
clearChange( incidence->uid() );
}
-void ResourceCached::clearChange( const QString &uid )
+void ResourceCached::clearChange( const TQString &uid )
{
- QMap<Incidence*, bool>::Iterator it;
+ TQMap<Incidence*, bool>::Iterator it;
for ( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it )
if ( it.key()->uid() == uid ) {
@@ -623,7 +623,7 @@ bool ResourceCached::checkForSave()
return true;
}
-void ResourceCached::addInfoText( QString &txt ) const
+void ResourceCached::addInfoText( TQString &txt ) const
{
if ( mLastLoad.isValid() ) {
txt += "<br>";