From f6f9c296c3f9d39a8c3d0ee64a542a47f450be28 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 00:37:32 +0000 Subject: TQt4 port kpilot This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpilot@1238903 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/pilotDateEntry.cc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'lib/pilotDateEntry.cc') diff --git a/lib/pilotDateEntry.cc b/lib/pilotDateEntry.cc index bae18ef..42becf2 100644 --- a/lib/pilotDateEntry.cc +++ b/lib/pilotDateEntry.cc @@ -160,23 +160,23 @@ PilotDateEntry & PilotDateEntry::operator = (const PilotDateEntry & e) } // end of assignment operator -TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) +TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) { TQString text, tmp; - TQString par = (richText==Qt::RichText) ?CSL1("

"):TQString::null; - TQString ps = (richText==Qt::RichText) ?CSL1("

"):CSL1("\n"); - TQString br = (richText==Qt::RichText) ?CSL1("
"):CSL1("\n"); + TQString par = (richText==TQt::RichText) ?CSL1("

"):TQString(); + TQString ps = (richText==TQt::RichText) ?CSL1("

"):CSL1("\n"); + TQString br = (richText==TQt::RichText) ?CSL1("
"):CSL1("\n"); // title + name text += par; tmp=richText?CSL1("%1"):CSL1("%1"); - text += tmp.arg(rtExpand(getDescription(), richText)); + text += tmp.tqarg(rtExpand(getDescription(), richText)); text += ps; TQDateTime dt(readTm(getEventStart())); TQString startDate(dt.toString(Qt::LocalDate)); text+=par; - text+=i18n("Start date: %1").arg(startDate); + text+=i18n("Start date: %1").tqarg(startDate); text+=ps; if (isEvent()) @@ -190,7 +190,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) dt=readTm(getEventEnd()); TQString endDate(dt.toString(Qt::LocalDate)); text+=par; - text+=i18n("End date: %1").arg(endDate); + text+=i18n("End date: %1").tqarg(endDate); text+=ps; } @@ -201,10 +201,10 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) arg(getAdvance()); switch (getAdvanceUnits()) { - case advMinutes: tmp=tmp.arg(i18n("minutes")); break; - case advHours: tmp=tmp.arg(i18n("hours")); break; - case advDays: tmp=tmp.arg(i18n("days")); break; - default: tmp=tmp.arg(TQString::null); break;; + case advMinutes: tmp=tmp.tqarg(i18n("minutes")); break; + case advHours: tmp=tmp.tqarg(i18n("hours")); break; + case advDays: tmp=tmp.tqarg(i18n("days")); break; + default: tmp=tmp.tqarg(TQString()); break;; } text+=tmp; text+=ps; @@ -215,16 +215,16 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) text+=par; tmp=i18n("Recurrence: every %1 %2"); int freq = getRepeatFrequency(); - tmp=tmp.arg(freq); + tmp=tmp.tqarg(freq); switch(getRepeatType()) { - case repeatDaily: tmp=tmp.arg(i18n("day(s)")); break; - case repeatWeekly: tmp=tmp.arg(i18n("week(s)")); break; + case repeatDaily: tmp=tmp.tqarg(i18n("day(s)")); break; + case repeatWeekly: tmp=tmp.tqarg(i18n("week(s)")); break; case repeatMonthlyByDay: - case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break; - case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break; - default: tmp=tmp.arg(TQString::null); break; + case repeatMonthlyByDate: tmp=tmp.tqarg(i18n("month(s)")); break; + case repeatYearly: tmp=tmp.tqarg(i18n("year(s)")); break; + default: tmp=tmp.tqarg(TQString()); break; } text+=tmp; text+=br; @@ -237,7 +237,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) else { dt = readTm(getRepeatEnd()).date(); - text+=i18n("Until %1").arg(dt.toString(Qt::LocalDate)); + text+=i18n("Until %1").tqarg(dt.toString(Qt::LocalDate)); } text+=br; @@ -245,7 +245,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br; // TODO: show the dayArray when repeating weekly /*TQBitArray dayArray(7); - if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays + if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").tqarg(getRepeatDays const int *days = dateEntry->getRepeatDays(); // Rotate the days of the week, since day numbers on the Pilot and // in vCal / Events are different. @@ -421,7 +421,7 @@ void PilotDateEntry::setLocation(const TQString &s) else { TQString location = "Location: " + s + "\n"; - int pos = note.find(rxp); + int pos = note.tqfind(rxp); if(pos >= 0) { @@ -441,7 +441,7 @@ TQString PilotDateEntry::getLocation() const // one from PilotDateEntry::getNote(); TQString note = Pilot::fromPilot(getNoteP()); TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); - int pos = note.find(rxp, 0); + int pos = note.tqfind(rxp, 0); if(pos >= 0) { -- cgit v1.2.1