summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-21 14:42:01 (UTC)
committer zautrix <zautrix>2005-03-21 14:42:01 (UTC)
commit6e5a0c6cff04fff115e63b62537c5274dc7a5564 (patch) (side-by-side diff)
tree5d40aadc33768fa31036aefdf965462248358361
parent3bd97904e69bf586122ad82d279c37db0861eefb (diff)
downloadkdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.zip
kdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.tar.gz
kdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp5
-rw-r--r--korganizer/koeventviewer.cpp4
-rw-r--r--libkcal/kincidenceformatter.cpp4
3 files changed, 7 insertions, 6 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 493382d..a776cb6 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -190,31 +190,32 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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( '<' , "&lt;" );
mToolTipText.replace( '>' , "&gt;" );
#else
- if ( mToolTipText.find ('<') > 0 ) {
+ if ( mToolTipText.find ('<') >= 0 ) {
mToolTipText.replace( QRegExp("<") , "&lt;" );
}
- if ( mToolTipText.find ('>') > 0 ) {
+ if ( mToolTipText.find ('>') >= 0 ) {
mToolTipText.replace( QRegExp(">") , "&gt;" );
}
#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();
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 135ca73..1508638 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -689,28 +689,28 @@ void KOEventViewer::clearEvents(bool now)
void KOEventViewer::addText(QString text)
{
mText.append(text);
setText(mText);
}
QString KOEventViewer::deTag(QString text)
{
#if QT_VERSION >= 0x030000
text.replace( '<' , "&lt;" );
text.replace( '>' , "&gt;" );
#else
- if ( text.find ('<') > 0 ) {
+ if ( text.find ('<') >= 0 ) {
text.replace( QRegExp("<") , "&lt;" );
}
- if ( text.find ('>') > 0 ) {
+ if ( text.find ('>') >= 0 ) {
text.replace( QRegExp(">") , "&gt;" );
}
#endif
return text;
}
void KOEventViewer::keyPressEvent ( QKeyEvent * e )
{
switch ( e->key() ) {
case Qt::Key_Return:
case Qt::Key_Enter :
e->ignore();
break;
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 57a9ede..e506a96 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -373,21 +373,21 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
void KIncidenceFormatter::formatReadOnly(Incidence *event)
{
if (event->isReadOnly()) {
addTag("p","<em>(" + i18n("read-only") + ")</em>");
}
}
QString KIncidenceFormatter::deTag(QString text)
{
#if QT_VERSION >= 0x030000
text.replace( '<' , "&lt;" );
text.replace( '>' , "&gt;" );
#else
- if ( text.find ('<') > 0 ) {
+ if ( text.find ('<') >= 0 ) {
text.replace( QRegExp("<") , "&lt;" );
}
- if ( text.find ('>') > 0 ) {
+ if ( text.find ('>') >= 0 ) {
text.replace( QRegExp(">") , "&gt;" );
}
#endif
return text;
}