summaryrefslogtreecommitdiffstats
path: root/karm/karmstorage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch)
tree766a8ad7939fcf3eec534184c36bd0e0f80489e2 /karm/karmstorage.cpp
parent469cc56a805bd3d6940d54adbef554877c29853c (diff)
downloadtdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz
tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/karmstorage.cpp')
-rw-r--r--karm/karmstorage.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp
index 6211deb84..1231113b6 100644
--- a/karm/karmstorage.cpp
+++ b/karm/karmstorage.cpp
@@ -189,12 +189,12 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt
// Load each task under it's tqparent task.
for( todo = todoList.begin(); todo != todoList.end(); ++todo )
{
- Task* task = map.tqfind( (*todo)->uid() );
+ Task* task = map.find( (*todo)->uid() );
// No relatedTo incident just means this is a top-level task.
if ( (*todo)->relatedTo() )
{
- Task* newParent = map.tqfind( (*todo)->relatedToUid() );
+ Task* newParent = map.find( (*todo)->relatedToUid() );
// Complete the loading but return a message
if ( !newParent )
@@ -258,12 +258,12 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
// 1.1. Load each task under it's tqparent task.
for( todo = todoList.begin(); todo != todoList.end(); ++todo )
{
- Task* task = map.tqfind( (*todo)->uid() );
+ Task* task = map.find( (*todo)->uid() );
// No relatedTo incident just means this is a top-level task.
if ( (*todo)->relatedTo() )
{
- Task* newParent = map.tqfind( (*todo)->relatedToUid() );
+ Task* newParent = map.find( (*todo)->relatedToUid() );
// Complete the loading but return a message
if ( !newParent )
@@ -482,12 +482,12 @@ TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
int *level, DesktopList* desktopList)
{
- if (line.tqfind('#') == 0) {
+ if (line.find('#') == 0) {
// A comment line
return false;
}
- int index = line.tqfind('\t');
+ int index = line.find('\t');
if (index == -1) {
// This doesn't seem like a valid record
return false;
@@ -496,7 +496,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
TQString levelStr = line.left(index);
TQString rest = line.remove(0,index+1);
- index = rest.tqfind('\t');
+ index = rest.find('\t');
if (index == -1) {
// This doesn't seem like a valid record
return false;
@@ -507,7 +507,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
bool ok;
- index = rest.tqfind('\t'); // check for optional desktops string
+ index = rest.find('\t'); // check for optional desktops string
if (index >= 0) {
*name = rest.left(index);
TQString deskLine = rest.remove(0,index+1);
@@ -516,7 +516,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
// an DesktopList
TQString ds;
int d;
- int commaIdx = deskLine.tqfind(',');
+ int commaIdx = deskLine.find(',');
while (commaIdx >= 0) {
ds = deskLine.left(commaIdx);
d = ds.toInt(&ok);
@@ -525,7 +525,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
desktopList->push_back(d);
deskLine.remove(0,commaIdx+1);
- commaIdx = deskLine.tqfind(',');
+ commaIdx = deskLine.find(',');
}
d = deskLine.toInt(&ok);
@@ -627,9 +627,9 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
/*
// CSV compliance
- // Surround the field with quotes if the field tqcontains
+ // Surround the field with quotes if the field contains
// a comma (delim) or a double quote
- if (task->name().tqcontains(delim) || task->name().tqcontains(dquote))
+ if (task->name().contains(delim) || task->name().contains(dquote))
to_quote = true;
else
to_quote = false;
@@ -640,7 +640,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
retval += dquote;
// Double quotes replaced by a pair of consecutive double quotes
- retval += task->name().tqreplace( dquote, double_dquote );
+ retval += task->name().replace( dquote, double_dquote );
if (to_quote)
retval += dquote;
@@ -661,7 +661,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
}
// save, either locally or remote
- if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/")))
+ if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
@@ -812,14 +812,14 @@ long KarmStorage::printTaskHistory (
.tqarg(daykey)
.tqarg(task->uid());
- if (taskdaytotals.tqcontains(daytaskkey))
+ if (taskdaytotals.contains(daytaskkey))
{
cell.push_back(TQString::tqfromLatin1("%1")
.tqarg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes)));
sum += taskdaytotals[daytaskkey]; // in seconds
- if (daytotals.tqcontains(daykey))
- daytotals.tqreplace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]);
+ if (daytotals.contains(daykey))
+ daytotals.replace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]);
else
daytotals.insert(daykey, taskdaytotals[daytaskkey]);
}
@@ -842,16 +842,16 @@ long KarmStorage::printTaskHistory (
/*
// CSV compliance
- // Surround the field with quotes if the field tqcontains
+ // Surround the field with quotes if the field contains
// a comma (delim) or a double quote
- to_quote = task->name().tqcontains(delim) || task->name().tqcontains(dquote);
+ to_quote = task->name().contains(delim) || task->name().contains(dquote);
*/
to_quote = true;
if ( to_quote) cell.push_back(dquote);
// Double quotes replaced by a pair of consecutive double quotes
- cell.push_back(task->name().tqreplace( dquote, double_dquote ));
+ cell.push_back(task->name().replace( dquote, double_dquote ));
if ( to_quote) cell.push_back(dquote);
@@ -941,8 +941,8 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
.tqarg(daykey)
.tqarg((*event).todoUid());
- if (taskdaytotals.tqcontains(daytaskkey))
- taskdaytotals.tqreplace(daytaskkey,
+ if (taskdaytotals.contains(daytaskkey))
+ taskdaytotals.replace(daytaskkey,
taskdaytotals[daytaskkey] + (*event).duration());
else
taskdaytotals.insert(daytaskkey, (*event).duration());
@@ -995,7 +995,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
{
daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
- if (daytotals.tqcontains(daykey))
+ if (daytotals.contains(daykey))
{
retval += TQString::tqfromLatin1("%1")
.tqarg(formatTime(daytotals[daykey]/60, rc.decimalMinutes));
@@ -1015,7 +1015,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
// save, either locally or remote
- if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/")))
+ if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
@@ -1166,7 +1166,7 @@ TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from,
{
// KArm events have the custom property X-KDE-Karm-duration
- if (! processed.tqcontains( (*event)->uid()))
+ if (! processed.contains( (*event)->uid()))
{
// If an event spans multiple days, CalendarLocal::rawEventsForDate
// will return the same event on both days. To avoid double-counting