-rw-r--r-- | korganizer/komonthview.cpp | 24 | ||||
-rw-r--r-- | korganizer/komonthview.h | 2 |
2 files changed, 14 insertions, 12 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4bf9dea..004ff50 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -493,6 +493,6 @@ void MonthViewCell::startUpdateCell() #ifdef DESKTOP_VERSION QToolTip::remove(this); -#endif - mToolTip = ""; +#endif + mToolTip.clear(); //qApp->processEvents(); if ( !mHolidayString.isEmpty() ) { @@ -500,5 +500,5 @@ void MonthViewCell::startUpdateCell() item->setPalette( mHolidayPalette ); mItemList->insertItem( item ); - mToolTip += mHolidayString+"\n"; + mToolTip.append ( mHolidayString ); } } @@ -506,5 +506,5 @@ void MonthViewCell::startUpdateCell() void MonthViewCell::insertEvent(Event *event) { - + QString mToolTipText; mItemList->setFocusPolicy(WheelFocus); if ( !(event->doesRecur() == Recurrence::rNone) ) { @@ -553,14 +553,14 @@ void MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); - mToolTip += prefix + text; + mToolTipText += prefix + text; } else { if (event->doesFloat()) { text = event->summary(); - mToolTip += text; + mToolTipText += text; } else { text = KGlobal::locale()->formatTime(event->dtStart().time()); text += " " + event->summary(); - mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); + mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); } } @@ -607,5 +607,5 @@ void MonthViewCell::insertEvent(Event *event) item->setMultiDay( multiday ); mItemList->insertItem( item ); - mToolTip += "\n"; + mToolTip.append( mToolTipText ); } void MonthViewCell::insertTodo(Todo *todo) @@ -651,11 +651,13 @@ void MonthViewCell::insertTodo(Todo *todo) item->setMoreInfo( todo->description().length() > 0 ); mItemList->insertItem( item ); - mToolTip += text+"\n"; + mToolTip.append( text ); } void MonthViewCell::finishUpdateCell() { #ifdef DESKTOP_VERSION - if (mToolTip != "") - QToolTip::add(this,mToolTip,toolTipGroup(),""); + if (mToolTip.count() > 0 ) { + mToolTip.sort(); + QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); + } #endif mItemList->sort(); diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index fd8cbf2..a92421b 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -168,5 +168,5 @@ class MonthViewCell : public QWidget protected: - QString mToolTip; + QStringList mToolTip; void resizeEvent( QResizeEvent * ); |