summaryrefslogtreecommitdiffstats
path: root/karm
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
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')
-rw-r--r--karm/desktoptracker.cpp2
-rw-r--r--karm/kaccelmenuwatch.cpp4
-rw-r--r--karm/karmstorage.cpp50
-rw-r--r--karm/karmutility.cpp2
-rw-r--r--karm/taskview.cpp6
-rw-r--r--karm/timekard.cpp12
6 files changed, 38 insertions, 38 deletions
diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp
index 773f6aea9..deab87548 100644
--- a/karm/desktoptracker.cpp
+++ b/karm/desktoptracker.cpp
@@ -1,4 +1,4 @@
-#include <algorithm> // std::tqfind
+#include <algorithm> // std::find
#include <tqtimer.h>
#include <kdebug.h>
diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp
index 18a0f5110..75e4854e7 100644
--- a/karm/kaccelmenuwatch.cpp
+++ b/karm/kaccelmenuwatch.cpp
@@ -25,7 +25,7 @@ void KAccelMenuWatch::setMenu( TQPopupMenu *menu )
// we use _menuList to ensure that the signal is
// connected only once per menu.
- if ( !_menuList.tqfindRef( menu ) ) {
+ if ( !_menuList.findRef( menu ) ) {
_menuList.append( menu );
connect( menu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(removeDeadMenu()) );
}
@@ -74,7 +74,7 @@ void KAccelMenuWatch::removeDeadMenu()
TQPopupMenu *sdr = (TQPopupMenu *) sender();
assert( sdr );
- if ( !_menuList.tqfindRef( sdr ) )
+ if ( !_menuList.findRef( sdr ) )
return;
// remove all accels
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
diff --git a/karm/karmutility.cpp b/karm/karmutility.cpp
index d13a3f6ed..8a2de530a 100644
--- a/karm/karmutility.cpp
+++ b/karm/karmutility.cpp
@@ -12,7 +12,7 @@ TQString formatTime( long minutes, bool decimal )
TQString time;
if ( decimal ) {
time.sprintf("%.2f", minutes / 60.0);
- time.tqreplace( '.', KGlobal::locale()->decimalSymbol() );
+ time.replace( '.', KGlobal::locale()->decimalSymbol() );
}
else time.sprintf("%s%ld:%02ld",
(minutes < 0) ? KGlobal::locale()->negativeSign().utf8().data() : "",
diff --git a/karm/taskview.cpp b/karm/taskview.cpp
index 6a8f6e051..95dfc8569 100644
--- a/karm/taskview.cpp
+++ b/karm/taskview.cpp
@@ -154,7 +154,7 @@ void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
if ( e->pos().y() >= task->itemPos() && // doubleclick was onto current_item()
e->pos().y() < task->itemPos()+task->height() )
{
- if ( activeTasks.tqfindRef(task) == -1 ) // task is active
+ if ( activeTasks.findRef(task) == -1 ) // task is active
{
stopAllTimers();
startCurrentTimer();
@@ -388,7 +388,7 @@ void TaskView::startTimerFor(Task* task, TQDateTime startTime )
kdDebug(5970) << "Entering TaskView::startTimerFor" << endl;
if (save()==TQString())
{
- if (task != 0 && activeTasks.tqfindRef(task) == -1)
+ if (task != 0 && activeTasks.findRef(task) == -1)
{
_idleTimeDetector->startIdleDetection();
if (!task->isComplete())
@@ -462,7 +462,7 @@ void TaskView::resetTimeForAllTasks()
void TaskView::stopTimerFor(Task* task)
{
kdDebug(5970) << "Entering stopTimerFor. task = " << task->name() << endl;
- if ( task != 0 && activeTasks.tqfindRef(task) != -1 ) {
+ if ( task != 0 && activeTasks.findRef(task) != -1 ) {
activeTasks.removeRef(task);
task->setRunning(false, _storage);
if ( activeTasks.count() == 0 ) {
diff --git a/karm/timekard.cpp b/karm/timekard.cpp
index c50168574..d9b8d4a76 100644
--- a/karm/timekard.cpp
+++ b/karm/timekard.cpp
@@ -139,7 +139,7 @@ void TimeKard::printTaskHistory(const Task *task,
.tqarg(daykey)
.tqarg(task->uid());
- if (taskdaytotals.tqcontains(daytaskkey))
+ if (taskdaytotals.contains(daytaskkey))
{
if ( !totalsOnly )
{
@@ -148,8 +148,8 @@ void TimeKard::printTaskHistory(const Task *task,
}
sectionsum += 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]);
}
@@ -226,8 +226,8 @@ TQString TimeKard::sectionHistoryAsText(
.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());
@@ -282,7 +282,7 @@ TQString TimeKard::sectionHistoryAsText(
{
TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
- if (daytotals.tqcontains(daykey))
+ if (daytotals.contains(daykey))
{
if ( !totalsOnly )
{