summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 7a685d8..81681df 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -584,3 +584,4 @@ void KOAgendaItem::computeText()
} else {
- mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ;
+ int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() );
+ mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ;
}
@@ -660,3 +661,3 @@ int KOAgendaItem::cellHeight()
// this code is to fix this problem
-int KOAgendaItem::resizeMe( int grid, int wid, int hei )
+int KOAgendaItem::resizeMe( int grid, int wid, int hei, bool invalidWidth )
{
@@ -671,3 +672,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei )
}
- if ( wid == width() || diff >= wid )
+ if ( (!invalidWidth && wid == width() ) || diff >= wid )
resize( wid, hei );
@@ -675,2 +676,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei )
resize( wid - diff, hei );
+ //qDebug("wid %d x %d ", width(), x());
return diff;