summaryrefslogtreecommitdiffstats
path: root/karm/karmstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'karm/karmstorage.cpp')
-rw-r--r--karm/karmstorage.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp
index e895d263..7a6bfcb9 100644
--- a/karm/karmstorage.cpp
+++ b/karm/karmstorage.cpp
@@ -102,7 +102,7 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt
// If file doesn't exist, create a blank one to avoid ResourceLocal load
// error. We make it user and group read/write, others read. This is
- // masked by the users umask. (See man creat)
+ // tqmasked by the users umask. (See man creat)
if ( ! remoteResource( _icalfile ) )
{
int handle;
@@ -135,7 +135,7 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt
TQObject::connect (_calendar, TQT_SIGNAL(resourceChanged(ResourceCalendar *)),
view, TQT_SLOT(iCalFileModified(ResourceCalendar *)));
_calendar->setTimeZoneId( KPimPrefs::timezone() );
- _calendar->setResourceName( TQString::fromLatin1("KArm") );
+ _calendar->setResourceName( TQString::tqfromLatin1("KArm") );
_calendar->open();
_calendar->load();
@@ -608,7 +608,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
while ( tasknr < taskview->count() && !dialog.wasCancelled() )
{
dialog.progressBar()->advance( 1 );
- if ( tasknr % 15 == 0 ) kapp->processEvents(); // repainting is slow
+ if ( tasknr % 15 == 0 ) kapp->processEvents(); // tqrepainting is slow
if ( taskview->item_at_index(tasknr)->depth() > maxdepth )
maxdepth = taskview->item_at_index(tasknr)->depth();
tasknr++;
@@ -627,9 +627,9 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
/*
// CSV compliance
- // Surround the field with quotes if the field contains
+ // Surround the field with quotes if the field tqcontains
// a comma (delim) or a double quote
- if (task->name().contains(delim) || task->name().contains(dquote))
+ if (task->name().tqcontains(delim) || task->name().tqcontains(dquote))
to_quote = true;
else
to_quote = false;
@@ -639,8 +639,8 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
if (to_quote)
retval += dquote;
- // Double quotes replaced by a pair of consecutive double quotes
- retval += task->name().replace( dquote, double_dquote );
+ // Double quotes tqreplaced by a pair of consecutive double quotes
+ retval += task->name().tqreplace( 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().contains("/")))
+ if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/")))
{
TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
@@ -680,13 +680,13 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
else // use remote file
{
KTempFile tmpFile;
- if ( tmpFile.status() != 0 ) err = TQString::fromLatin1( "Unable to get temporary file" );
+ if ( tmpFile.status() != 0 ) err = TQString::tqfromLatin1( "Unable to get temporary file" );
else
{
TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::tqfromLatin1("Could not upload");
}
}
@@ -794,7 +794,7 @@ long KarmStorage::printTaskHistory (
TQString double_dquote = dquote + dquote;
bool to_quote = true;
- const TQString cr = TQString::fromLatin1("\n");
+ const TQString cr = TQString::tqfromLatin1("\n");
TQString buf;
TQString daytaskkey, daykey;
TQDate day;
@@ -807,19 +807,19 @@ long KarmStorage::printTaskHistory (
while (day <= to)
{
// write the time in seconds for the given task for the given day to s
- daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
- daytaskkey = TQString::fromLatin1("%1_%2")
+ daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
+ daytaskkey = TQString::tqfromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
- if (taskdaytotals.contains(daytaskkey))
+ if (taskdaytotals.tqcontains(daytaskkey))
{
- cell.push_back(TQString::fromLatin1("%1")
+ cell.push_back(TQString::tqfromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes)));
sum += taskdaytotals[daytaskkey]; // in seconds
- if (daytotals.contains(daykey))
- daytotals.replace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]);
+ if (daytotals.tqcontains(daykey))
+ daytotals.tqreplace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]);
else
daytotals.insert(daykey, taskdaytotals[daytaskkey]);
}
@@ -829,7 +829,7 @@ long KarmStorage::printTaskHistory (
}
// Total for task
- cell.push_back(TQString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
+ cell.push_back(TQString::tqfromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
// room for the recursive total time (that cannot be calculated now)
cell.push_back(delim);
@@ -842,16 +842,16 @@ long KarmStorage::printTaskHistory (
/*
// CSV compliance
- // Surround the field with quotes if the field contains
+ // Surround the field with quotes if the field tqcontains
// a comma (delim) or a double quote
- to_quote = task->name().contains(delim) || task->name().contains(dquote);
+ to_quote = task->name().tqcontains(delim) || task->name().tqcontains(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().replace( dquote, double_dquote ));
+ // Double quotes tqreplaced by a pair of consecutive double quotes
+ cell.push_back(task->name().tqreplace( dquote, double_dquote ));
if ( to_quote) cell.push_back(dquote);
@@ -865,7 +865,7 @@ long KarmStorage::printTaskHistory (
add += printTaskHistory( subTask, taskdaytotals, daytotals, from, to , level+1, matrix,
rc );
}
- cell[colrectot]=(TQString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
+ cell[colrectot]=(TQString::tqfromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
for (unsigned int i=0; i < cell.size(); i++) matrix[ownline]+=cell[i];
return add+sum;
}
@@ -890,7 +890,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
const ReportCriteria &rc)
{
TQString delim = rc.delimiter;
- const TQString cr = TQString::fromLatin1("\n");
+ const TQString cr = TQString::tqfromLatin1("\n");
TQString err;
// below taken from timekard.cpp
@@ -910,7 +910,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
// parameter-plausi
if ( from > to )
{
- err = TQString::fromLatin1 (
+ err = TQString::tqfromLatin1 (
"'to' has to be a date later than or equal to 'from'.");
}
@@ -921,7 +921,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()));
retval += cr;
day=from;
@@ -936,13 +936,13 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
// so times are accumulated for each task.
for (event = events.begin(); event != events.end(); ++event)
{
- daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
- daytaskkey = TQString(TQString::fromLatin1("%1_%2"))
+ daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd"));
+ daytaskkey = TQString(TQString::tqfromLatin1("%1_%2"))
.arg(daykey)
.arg((*event).todoUid());
- if (taskdaytotals.contains(daytaskkey))
- taskdaytotals.replace(daytaskkey,
+ if (taskdaytotals.tqcontains(daytaskkey))
+ taskdaytotals.tqreplace(daytaskkey,
taskdaytotals[daytaskkey] + (*event).duration());
else
taskdaytotals.insert(daytaskkey, (*event).duration());
@@ -953,7 +953,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
while ( dayheading <= to )
{
// Use ISO 8601 format for date.
- retval += dayheading.toString(TQString::fromLatin1("yyyy-MM-dd"));
+ retval += dayheading.toString(TQString::tqfromLatin1("yyyy-MM-dd"));
retval += delim;
dayheading=dayheading.addDays(1);
}
@@ -993,11 +993,11 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = from;
while (day<=to)
{
- daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
- if (daytotals.contains(daykey))
+ if (daytotals.tqcontains(daykey))
{
- retval += TQString::fromLatin1("%1")
+ retval += TQString::tqfromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes));
sum += daytotals[daykey]; // in seconds
}
@@ -1005,7 +1005,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = day.addDays(1);
}
- retval += TQString::fromLatin1("%1%2%3%4")
+ retval += TQString::tqfromLatin1("%1%2%3%4")
.arg( formatTime( sum/60, rc.decimalMinutes ) )
.arg( delim ).arg( delim )
.arg( i18n( "Total" ) );
@@ -1015,7 +1015,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
// save, either locally or remote
- if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
+ if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/")))
{
TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
@@ -1036,14 +1036,14 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
KTempFile tmpFile;
if ( tmpFile.status() != 0 )
{
- err = TQString::fromLatin1( "Unable to get temporary file" );
+ err = TQString::tqfromLatin1( "Unable to get temporary file" );
}
else
{
TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::tqfromLatin1("Could not upload");
}
}
return err;
@@ -1166,7 +1166,7 @@ TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from,
{
// KArm events have the custom property X-KDE-Karm-duration
- if (! processed.contains( (*event)->uid()))
+ if (! processed.tqcontains( (*event)->uid()))
{
// If an event spans multiple days, CalendarLocal::rawEventsForDate
// will return the same event on both days. To avoid double-counting