diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /karm/karmstorage.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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 'karm/karmstorage.cpp')
-rw-r--r-- | karm/karmstorage.cpp | 266 |
1 files changed, 133 insertions, 133 deletions
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index 7e150d05..e895d263 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -27,12 +27,12 @@ #include <cassert> -#include <qfile.h> -#include <qsize.h> -#include <qdict.h> -#include <qdatetime.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqsize.h> +#include <tqdict.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "incidence.h" #include "kapplication.h" // kapp @@ -80,7 +80,7 @@ KarmStorage::KarmStorage() _calendar = 0; } -QString KarmStorage::load (TaskView* view, const Preferences* preferences, QString fileName ) +TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQString fileName ) // loads data from filename into view. If no filename is given, filename from preferences is used. // filename might be of use if this program is run as embedded konqueror plugin. { @@ -92,7 +92,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri // Use KDE_CXXFLAGS=$(USE_EXCEPTIONS) in Makefile.am if you want to use // exceptions (David Faure) - QString err; + TQString err; KEMailSettings settings; if ( fileName.isEmpty() ) fileName = preferences->iCalFile(); @@ -107,7 +107,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri { int handle; handle = open ( - QFile::encodeName( fileName ), + TQFile::encodeName( fileName ), O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH ); @@ -132,10 +132,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri } _calendar = resource; - QObject::connect (_calendar, SIGNAL(resourceChanged(ResourceCalendar *)), - view, SLOT(iCalFileModified(ResourceCalendar *))); + TQObject::connect (_calendar, TQT_SIGNAL(resourceChanged(ResourceCalendar *)), + view, TQT_SLOT(iCalFileModified(ResourceCalendar *))); _calendar->setTimeZoneId( KPimPrefs::timezone() ); - _calendar->setResourceName( QString::fromLatin1("KArm") ); + _calendar->setResourceName( TQString::fromLatin1("KArm") ); _calendar->open(); _calendar->load(); @@ -153,10 +153,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri { KCal::Todo::List todoList; KCal::Todo::List::ConstIterator todo; - QDict< Task > map; + TQDict< Task > map; // Build dictionary to look up Task object from Todo uid. Each task is a - // QListViewItem, and is initially added with the view as the parent. + // TQListViewItem, and is initially added with the view as the parent. todoList = _calendar->rawTodos(); kdDebug(5970) << "KarmStorage::load " << "rawTodo count (includes completed todos) =" @@ -213,21 +213,21 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri return err; } -QString KarmStorage::icalfile() +TQString KarmStorage::icalfile() { kdDebug(5970) << "Entering KarmStorage::icalfile" << endl; return _icalfile; } -QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) +TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // makes *view contain the tasks out of *rc. { - QString err; + TQString err; KCal::Todo::List todoList; KCal::Todo::List::ConstIterator todo; - QDict< Task > map; - vector<QString> runningTasks; - vector<QDateTime> startTimes; + TQDict< Task > map; + vector<TQString> runningTasks; + vector<TQDateTime> startTimes; // remember tasks that are running and their start times for ( int i=0; i<view->count(); i++) @@ -245,7 +245,7 @@ QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // 1. insert tasks form rc into taskview // 1.1. Build dictionary to look up Task object from Todo uid. Each task is a - // QListViewItem, and is initially added with the view as the parent. + // TQListViewItem, and is initially added with the view as the parent. todoList = rc->rawTodos(); for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { @@ -305,12 +305,12 @@ void KarmStorage::closeStorage(TaskView* view) } } -QString KarmStorage::save(TaskView* taskview) +TQString KarmStorage::save(TaskView* taskview) { kdDebug(5970) << "entering KarmStorage::save" << endl; - QString err=QString(); + TQString err=TQString(); - QPtrStack< KCal::Todo > parents; + TQPtrStack< KCal::Todo > parents; for (Task* task=taskview->first_child(); task; task = task->nextSibling()) { @@ -336,10 +336,10 @@ QString KarmStorage::save(TaskView* taskview) return err; } -QString KarmStorage::writeTaskAsTodo(Task* task, const int level, - QPtrStack< KCal::Todo >& parents ) +TQString KarmStorage::writeTaskAsTodo(Task* task, const int level, + TQPtrStack< KCal::Todo >& parents ) { - QString err; + TQString err; KCal::Todo* todo; todo = _calendar->todo(task->uid()); @@ -381,15 +381,15 @@ bool KarmStorage::isNewStorage(const Preferences* preferences) const // These only stored total and session times. // -QString KarmStorage::loadFromFlatFile(TaskView* taskview, - const QString& filename) +TQString KarmStorage::loadFromFlatFile(TaskView* taskview, + const TQString& filename) { - QString err; + TQString err; kdDebug(5970) << "KarmStorage::loadFromFlatFile: " << filename << endl; - QFile f(filename); + TQFile f(filename); if( !f.exists() ) err = i18n("File \"%1\" not found.").arg(filename); @@ -402,12 +402,12 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview, if (!err) { - QString line; + TQString line; - QPtrStack<Task> stack; + TQPtrStack<Task> stack; Task *task; - QTextStream stream(&f); + TQTextStream stream(&f); while( !stream.atEnd() ) { // lukas: this breaks for non-latin1 chars!!! @@ -422,7 +422,7 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview, long minutes; int level; - QString name; + TQString name; DesktopList desktopList; if (!parseLine(line, &minutes, &name, &level, &desktopList)) continue; @@ -464,10 +464,10 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview, return err; } -QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, - const QString& filename) +TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, + const TQString& filename) { - QString err = loadFromFlatFile(taskview, filename); + TQString err = loadFromFlatFile(taskview, filename); if (!err) { for (Task* task = taskview->first_child(); task; @@ -479,7 +479,7 @@ QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, return err; } -bool KarmStorage::parseLine(QString line, long *time, QString *name, +bool KarmStorage::parseLine(TQString line, long *time, TQString *name, int *level, DesktopList* desktopList) { if (line.find('#') == 0) { @@ -493,8 +493,8 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name, return false; } - QString levelStr = line.left(index); - QString rest = line.remove(0,index+1); + TQString levelStr = line.left(index); + TQString rest = line.remove(0,index+1); index = rest.find('\t'); if (index == -1) { @@ -502,7 +502,7 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name, return false; } - QString timeStr = rest.left(index); + TQString timeStr = rest.left(index); rest = rest.remove(0,index+1); bool ok; @@ -510,11 +510,11 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name, index = rest.find('\t'); // check for optional desktops string if (index >= 0) { *name = rest.left(index); - QString deskLine = rest.remove(0,index+1); + TQString deskLine = rest.remove(0,index+1); // now transform the ds string (e.g. "3", or "1,4,5") into // an DesktopList - QString ds; + TQString ds; int d; int commaIdx = deskLine.find(','); while (commaIdx >= 0) { @@ -572,22 +572,22 @@ void KarmStorage::adjustFromLegacyFileFormat(Task* task) //---------------------------------------------------------------------------- // Routines that handle Comma-Separated Values export file format. // -QString KarmStorage::exportcsvFile( TaskView *taskview, +TQString KarmStorage::exportcsvFile( TaskView *taskview, const ReportCriteria &rc ) { - QString delim = rc.delimiter; - QString dquote = rc.quote; - QString double_dquote = dquote + dquote; + TQString delim = rc.delimiter; + TQString dquote = rc.quote; + TQString double_dquote = dquote + dquote; bool to_quote = true; - QString err; + TQString err; Task* task; int maxdepth=0; kdDebug(5970) << "KarmStorage::exportcsvFile: " << rc.url << endl; - QString title = i18n("Export Progress"); + TQString title = i18n("Export Progress"); KProgressDialog dialog( taskview, 0, title ); dialog.setAutoClose( true ); dialog.setAllowCancel( true ); @@ -595,13 +595,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview, // The default dialog was not displaying all the text in the title bar. int width = taskview->fontMetrics().width(title) * 3; - QSize dialogsize; + TQSize dialogsize; dialogsize.setWidth(width); dialog.setInitialSize( dialogsize, true ); if ( taskview->count() > 1 ) dialog.show(); - QString retval; + TQString retval; // Find max task depth int tasknr = 0; @@ -663,15 +663,15 @@ QString KarmStorage::exportcsvFile( TaskView *taskview, // save, either locally or remote if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { - QString filename=rc.url.path(); + TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); - QFile f( filename ); + TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { err = i18n( "Could not open \"%1\"." ).arg( filename ); } if (!err) { - QTextStream stream(&f); + TQTextStream stream(&f); // Export to file stream << retval; f.close(); @@ -680,13 +680,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview, else // use remote file { KTempFile tmpFile; - if ( tmpFile.status() != 0 ) err = QString::fromLatin1( "Unable to get temporary file" ); + if ( tmpFile.status() != 0 ) err = TQString::fromLatin1( "Unable to get temporary file" ); else { - QTextStream *stream=tmpFile.textStream(); + TQTextStream *stream=tmpFile.textStream(); *stream << retval; tmpFile.close(); - if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload"); + if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload"); } } @@ -701,10 +701,10 @@ QString KarmStorage::exportcsvFile( TaskView *taskview, // public routines: // -QString KarmStorage::addTask(const Task* task, const Task* parent) +TQString KarmStorage::addTask(const Task* task, const Task* parent) { KCal::Todo* todo; - QString uid; + TQString uid; todo = new KCal::Todo(); if ( _calendar->addTodo( todo ) ) @@ -755,7 +755,7 @@ bool KarmStorage::removeTask(Task* task) return true; } -void KarmStorage::addComment(const Task* task, const QString& comment) +void KarmStorage::addComment(const Task* task, const TQString& comment) { KCal::Todo* todo; @@ -764,7 +764,7 @@ void KarmStorage::addComment(const Task* task, const QString& comment) // Do this to avoid compiler warnings about comment not being used. once we // transition to using the addComment method, we need this second param. - QString s = comment; + TQString s = comment; // TODO: Use libkcal comments // todo->addComment(comment); @@ -776,28 +776,28 @@ void KarmStorage::addComment(const Task* task, const QString& comment) long KarmStorage::printTaskHistory ( const Task *task, - const QMap<QString,long> &taskdaytotals, - QMap<QString,long> &daytotals, - const QDate &from, - const QDate &to, + const TQMap<TQString,long> &taskdaytotals, + TQMap<TQString,long> &daytotals, + const TQDate &from, + const TQDate &to, const int level, - vector <QString> &matrix, + vector <TQString> &matrix, const ReportCriteria &rc) // to>=from is precondition { long ownline=linenr++; // the how many-th instance of this function is this long colrectot=0; // colum where to write the task's total recursive time - vector <QString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total + vector <TQString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total long add; // total recursive time of all subtasks - QString delim = rc.delimiter; - QString dquote = rc.quote; - QString double_dquote = dquote + dquote; + TQString delim = rc.delimiter; + TQString dquote = rc.quote; + TQString double_dquote = dquote + dquote; bool to_quote = true; - const QString cr = QString::fromLatin1("\n"); - QString buf; - QString daytaskkey, daykey; - QDate day; + const TQString cr = TQString::fromLatin1("\n"); + TQString buf; + TQString daytaskkey, daykey; + TQDate day; long sum; if ( !task ) return 0; @@ -807,14 +807,14 @@ long KarmStorage::printTaskHistory ( while (day <= to) { // write the time in seconds for the given task for the given day to s - daykey = day.toString(QString::fromLatin1("yyyyMMdd")); - daytaskkey = QString::fromLatin1("%1_%2") + daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); + daytaskkey = TQString::fromLatin1("%1_%2") .arg(daykey) .arg(task->uid()); if (taskdaytotals.contains(daytaskkey)) { - cell.push_back(QString::fromLatin1("%1") + cell.push_back(TQString::fromLatin1("%1") .arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); sum += taskdaytotals[daytaskkey]; // in seconds @@ -829,7 +829,7 @@ long KarmStorage::printTaskHistory ( } // Total for task - cell.push_back(QString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes))); + cell.push_back(TQString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes))); // room for the recursive total time (that cannot be calculated now) cell.push_back(delim); @@ -865,14 +865,14 @@ long KarmStorage::printTaskHistory ( add += printTaskHistory( subTask, taskdaytotals, daytotals, from, to , level+1, matrix, rc ); } - cell[colrectot]=(QString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes ))); + cell[colrectot]=(TQString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes ))); for (unsigned int i=0; i < cell.size(); i++) matrix[ownline]+=cell[i]; return add+sum; } -QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc ) +TQString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc ) { - QString err; + TQString err; if ( rc.reportType == ReportCriteria::CSVHistoryExport ) err = exportcsvHistory( taskview, rc.from, rc.to, rc ); else if ( rc.reportType == ReportCriteria::CSVTotalsExport ) @@ -884,33 +884,33 @@ QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc ) } // export history report as csv, all tasks X all dates in one block -QString KarmStorage::exportcsvHistory ( TaskView *taskview, - const QDate &from, - const QDate &to, +TQString KarmStorage::exportcsvHistory ( TaskView *taskview, + const TQDate &from, + const TQDate &to, const ReportCriteria &rc) { - QString delim = rc.delimiter; - const QString cr = QString::fromLatin1("\n"); - QString err; + TQString delim = rc.delimiter; + const TQString cr = TQString::fromLatin1("\n"); + TQString err; // below taken from timekard.cpp - QString retval; - QString taskhdr, totalhdr; - QString line, buf; + TQString retval; + TQString taskhdr, totalhdr; + TQString line, buf; long sum; - QValueList<HistoryEvent> events; - QValueList<HistoryEvent>::iterator event; - QMap<QString, long> taskdaytotals; - QMap<QString, long> daytotals; - QString daytaskkey, daykey; - QDate day; - QDate dayheading; + TQValueList<HistoryEvent> events; + TQValueList<HistoryEvent>::iterator event; + TQMap<TQString, long> taskdaytotals; + TQMap<TQString, long> daytotals; + TQString daytaskkey, daykey; + TQDate day; + TQDate dayheading; // parameter-plausi if ( from > to ) { - err = QString::fromLatin1 ( + err = TQString::fromLatin1 ( "'to' has to be a date later than or equal to 'from'."); } @@ -921,7 +921,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, .arg(KGlobal::locale()->formatDate(to)); retval += cr; retval += i18n("Printed on: %1") - .arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime())); + .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())); retval += cr; day=from; @@ -936,8 +936,8 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, // so times are accumulated for each task. for (event = events.begin(); event != events.end(); ++event) { - daykey = (*event).start().date().toString(QString::fromLatin1("yyyyMMdd")); - daytaskkey = QString(QString::fromLatin1("%1_%2")) + daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd")); + daytaskkey = TQString(TQString::fromLatin1("%1_%2")) .arg(daykey) .arg((*event).todoUid()); @@ -953,7 +953,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, while ( dayheading <= to ) { // Use ISO 8601 format for date. - retval += dayheading.toString(QString::fromLatin1("yyyy-MM-dd")); + retval += dayheading.toString(TQString::fromLatin1("yyyy-MM-dd")); retval += delim; dayheading=dayheading.addDays(1); } @@ -962,7 +962,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, retval += line; // the tasks - vector <QString> matrix; + vector <TQString> matrix; linenr=0; for (int i=0; i<=taskview->count()+1; i++) matrix.push_back(""); if (events.empty()) @@ -993,11 +993,11 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, day = from; while (day<=to) { - daykey = day.toString(QString::fromLatin1("yyyyMMdd")); + daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); if (daytotals.contains(daykey)) { - retval += QString::fromLatin1("%1") + retval += TQString::fromLatin1("%1") .arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); sum += daytotals[daykey]; // in seconds } @@ -1005,7 +1005,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, day = day.addDays(1); } - retval += QString::fromLatin1("%1%2%3%4") + retval += TQString::fromLatin1("%1%2%3%4") .arg( formatTime( sum/60, rc.decimalMinutes ) ) .arg( delim ).arg( delim ) .arg( i18n( "Total" ) ); @@ -1017,15 +1017,15 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { - QString filename=rc.url.path(); + TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); - QFile f( filename ); + TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { err = i18n( "Could not open \"%1\"." ).arg( filename ); } if (!err) { - QTextStream stream(&f); + TQTextStream stream(&f); // Export to file stream << retval; f.close(); @@ -1036,20 +1036,20 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview, KTempFile tmpFile; if ( tmpFile.status() != 0 ) { - err = QString::fromLatin1( "Unable to get temporary file" ); + err = TQString::fromLatin1( "Unable to get temporary file" ); } else { - QTextStream *stream=tmpFile.textStream(); + TQTextStream *stream=tmpFile.textStream(); *stream << retval; tmpFile.close(); - if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload"); + if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload"); } } return err; } -void KarmStorage::stopTimer(const Task* task, QDateTime when) +void KarmStorage::stopTimer(const Task* task, TQDateTime when) { kdDebug(5970) << "Entering KarmStorage::stopTimer" << endl; long delta = task->startTime().secsTo(when); @@ -1057,12 +1057,12 @@ void KarmStorage::stopTimer(const Task* task, QDateTime when) } bool KarmStorage::bookTime(const Task* task, - const QDateTime& startDateTime, + const TQDateTime& startDateTime, const long durationInSeconds) { // Ignores preferences setting re: logging history. KCal::Event* e; - QDateTime end; + TQDateTime end; e = baseEvent( task ); e->setDtStart( startDateTime ); @@ -1070,8 +1070,8 @@ bool KarmStorage::bookTime(const Task* task, // Use a custom property to keep a record of negative durations e->setCustomProperty( kapp->instanceName(), - QCString("duration"), - QString::number(durationInSeconds)); + TQCString("duration"), + TQString::number(durationInSeconds)); return _calendar->addEvent(e); } @@ -1080,7 +1080,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds) { kdDebug(5970) << "Entering KarmStorage::changeTime ( " << task->name() << "," << deltaSeconds << " )" << endl; KCal::Event* e; - QDateTime end; + TQDateTime end; // Don't write events (with timer start/stop duration) if user has turned // this off in the settings dialog. @@ -1096,8 +1096,8 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds) // Use a custom property to keep a record of negative durations e->setCustomProperty( kapp->instanceName(), - QCString("duration"), - QString::number(deltaSeconds)); + TQCString("duration"), + TQString::number(deltaSeconds)); _calendar->addEvent(e); @@ -1116,7 +1116,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds) KCal::Event* KarmStorage::baseEvent(const Task * task) { KCal::Event* e; - QStringList categories; + TQStringList categories; e = new KCal::Event; e->setSummary(task->name()); @@ -1138,8 +1138,8 @@ KCal::Event* KarmStorage::baseEvent(const Task * task) return e; } -HistoryEvent::HistoryEvent(QString uid, QString name, long duration, - QDateTime start, QDateTime stop, QString todoUid) +HistoryEvent::HistoryEvent(TQString uid, TQString name, long duration, + TQDateTime start, TQDateTime stop, TQString todoUid) { _uid = uid; _name = name; @@ -1150,16 +1150,16 @@ HistoryEvent::HistoryEvent(QString uid, QString name, long duration, } -QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from, - const QDate& to) +TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from, + const TQDate& to) { - QValueList<HistoryEvent> retval; - QStringList processed; + TQValueList<HistoryEvent> retval; + TQStringList processed; KCal::Event::List events; KCal::Event::List::iterator event; - QString duration; + TQString duration; - for(QDate d = from; d <= to; d = d.addDays(1)) + for(TQDate d = from; d <= to; d = d.addDays(1)) { events = _calendar->rawEventsForDate( d ); for (event = events.begin(); event != events.end(); ++event) @@ -1176,7 +1176,7 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from, processed.append( (*event)->uid()); duration = (*event)->customProperty(kapp->instanceName(), - QCString("duration")); + TQCString("duration")); if ( ! duration.isNull() ) { if ( (*event)->relatedTo() @@ -1206,9 +1206,9 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from, return retval; } -bool KarmStorage::remoteResource( const QString& file ) const +bool KarmStorage::remoteResource( const TQString& file ) const { - QString f = file.lower(); + TQString f = file.lower(); bool rval = f.startsWith( "http://" ) || f.startsWith( "ftp://" ); kdDebug(5970) << "KarmStorage::remoteResource( " << file << " ) returns " << rval << endl; |