diff options
Diffstat (limited to 'karm/karmstorage.cpp')
-rw-r--r-- | karm/karmstorage.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index e895d2639..1e4f92a1f 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -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(); @@ -199,8 +199,8 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt // Complete the loading but return a message if ( !newParent ) err = i18n("Error loading \"%1\": could not find parent (uid=%2)") - .arg(task->name()) - .arg((*todo)->relatedToUid()); + .tqarg(task->name()) + .tqarg((*todo)->relatedToUid()); if (!err) task->move( newParent); } @@ -268,8 +268,8 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // Complete the loading but return a message if ( !newParent ) err = i18n("Error loading \"%1\": could not find parent (uid=%2)") - .arg(task->name()) - .arg((*todo)->relatedToUid()); + .tqarg(task->name()) + .tqarg((*todo)->relatedToUid()); if (!err) task->move( newParent); } @@ -391,12 +391,12 @@ TQString KarmStorage::loadFromFlatFile(TaskView* taskview, TQFile f(filename); if( !f.exists() ) - err = i18n("File \"%1\" not found.").arg(filename); + err = i18n("File \"%1\" not found.").tqarg(filename); if (!err) { if( !f.open( IO_ReadOnly ) ) - err = i18n("Could not open \"%1\".").arg(filename); + err = i18n("Could not open \"%1\".").tqarg(filename); } if (!err) @@ -667,7 +667,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, if (filename.isEmpty()) filename=rc.url.url(); TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { - err = i18n( "Could not open \"%1\"." ).arg( filename ); + err = i18n( "Could not open \"%1\"." ).tqarg( filename ); } if (!err) { @@ -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,15 +807,15 @@ 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") - .arg(daykey) - .arg(task->uid()); + daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); + daytaskkey = TQString::tqfromLatin1("%1_%2") + .tqarg(daykey) + .tqarg(task->uid()); if (taskdaytotals.contains(daytaskkey)) { - cell.push_back(TQString::fromLatin1("%1") - .arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); + cell.push_back(TQString::tqfromLatin1("%1") + .tqarg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); sum += taskdaytotals[daytaskkey]; // in seconds if (daytotals.contains(daykey)) @@ -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").tqarg(formatTime(sum/60, rc.decimalMinutes))); // room for the recursive total time (that cannot be calculated now) cell.push_back(delim); @@ -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").tqarg(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,18 +910,18 @@ 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'."); } // header retval += i18n("Task History\n"); retval += i18n("From %1 to %2") - .arg(KGlobal::locale()->formatDate(from)) - .arg(KGlobal::locale()->formatDate(to)); + .tqarg(KGlobal::locale()->formatDate(from)) + .tqarg(KGlobal::locale()->formatDate(to)); retval += cr; retval += i18n("Printed on: %1") - .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())); + .tqarg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime())); retval += cr; day=from; @@ -936,10 +936,10 @@ 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")) - .arg(daykey) - .arg((*event).todoUid()); + daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd")); + daytaskkey = TQString(TQString::tqfromLatin1("%1_%2")) + .tqarg(daykey) + .tqarg((*event).todoUid()); if (taskdaytotals.contains(daytaskkey)) taskdaytotals.replace(daytaskkey, @@ -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,22 +993,22 @@ 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)) { - retval += TQString::fromLatin1("%1") - .arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); + retval += TQString::tqfromLatin1("%1") + .tqarg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); sum += daytotals[daykey]; // in seconds } retval += delim; day = day.addDays(1); } - retval += TQString::fromLatin1("%1%2%3%4") - .arg( formatTime( sum/60, rc.decimalMinutes ) ) - .arg( delim ).arg( delim ) - .arg( i18n( "Total" ) ); + retval += TQString::tqfromLatin1("%1%2%3%4") + .tqarg( formatTime( sum/60, rc.decimalMinutes ) ) + .tqarg( delim ).tqarg( delim ) + .tqarg( i18n( "Total" ) ); } // above taken from timekard.cpp @@ -1021,7 +1021,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, if (filename.isEmpty()) filename=rc.url.url(); TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { - err = i18n( "Could not open \"%1\"." ).arg( filename ); + err = i18n( "Could not open \"%1\"." ).tqarg( filename ); } if (!err) { @@ -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; |