-rw-r--r-- | korganizer/kodaymatrix.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 493382d..a776cb6 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -178,55 +178,56 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; else if ( mDate == event->dtEnd().date () ) time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; } text = time + event->summary(); mToolTipText += prefix + text; } else { if (event->doesFloat()) { text = event->summary(); mToolTipText += text; } else { text = KGlobal::locale()->formatTime(event->dtStart().time()); text += " " + event->summary(); mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); } } if ( !event->location().isEmpty() ) mToolTipText += " (" + event->location() + ")"; #if QT_VERSION >= 0x030000 mToolTipText.replace( '<' , "<" ); mToolTipText.replace( '>' , ">" ); #else - if ( mToolTipText.find ('<') > 0 ) { + if ( mToolTipText.find ('<') >= 0 ) { mToolTipText.replace( QRegExp("<") , "<" ); } - if ( mToolTipText.find ('>') > 0 ) { + if ( mToolTipText.find ('>') >= 0 ) { mToolTipText.replace( QRegExp(">") , ">" ); } #endif + //qDebug("TTT: %s ", mToolTipText.latin1()); mToolTip.append( mToolTipText ); } mToolTip.sort(); return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); } void KODayMatrix::setCalendar( Calendar *cal ) { mCalendar = cal; setAcceptDrops( mCalendar ); updateEvents(); } QColor KODayMatrix::getShadedColor(QColor color) { QColor shaded; int h=0; int s=0; int v=0; color.hsv(&h,&s,&v); s = s/4; v = 192+v/4; shaded.setHsv(h,s,v); |