summaryrefslogtreecommitdiffabout
path: root/libkcal/recurrence.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/recurrence.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/recurrence.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp
index 5181eaf..8a175c9 100644
--- a/libkcal/recurrence.cpp
+++ b/libkcal/recurrence.cpp
@@ -182,43 +182,49 @@ bool Recurrence::compareLists( const QPtrList<int> &l1 ,const QPtrList<int> &l2
int count = l1.count();
int i;
for ( i = 0; i < count ; ++i ) {
// if ( l1.at(i) != l2.at(i) )
return false;
qDebug("compüare ");
}
return true;
}
*/
QString Recurrence::recurrenceText() const
{
- QString recurText = i18n("No");
+ QString recurText;
if ( recurs == Recurrence::rMinutely )
recurText = i18n("minutely");
else if ( recurs == Recurrence::rHourly )
recurText = i18n("hourly");
else if ( recurs == Recurrence::rDaily )
recurText = i18n("daily");
else if ( recurs == Recurrence::rWeekly )
recurText = i18n("weekly");
else if ( recurs == Recurrence::rMonthlyPos )
recurText = i18n("monthly");
else if ( recurs == Recurrence::rMonthlyDay )
- recurText = i18n("day-monthly");
+ recurText = i18n("monthly");
else if ( recurs == Recurrence::rYearlyMonth )
- recurText = i18n("month-yearly");
+ recurText = i18n("yearly");
else if ( recurs == Recurrence::rYearlyDay )
recurText = i18n("day-yearly");
else if ( recurs == Recurrence::rYearlyPos )
recurText = i18n("position-yearly");
+ if ( !recurText.isEmpty() ) {
+ if ( rFreq > 1 ){
+ recurText = i18n("(%1) ").arg(rFreq ) + recurText;
+ }
+ } else
+ recurText = i18n("No");
return recurText;
}
void Recurrence::setCompatVersion(int version)
{
mCompatVersion = version ? version : INT_MAX;
}
ushort Recurrence::doesRecur() const
{
return recurs;
}