summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 62d7ede..e8574a0 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -489,14 +489,14 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
bool ok = true;
if ( reply ) {
noc = ev->getNextOccurence( cdt, &ok );
- if (! ok && ev->type() == "Event")
+ if (! ok && ev->typeID() == eventID)
return false;
}
bool bDay = false;
if ( ev->isBirthday() || ev->isAnniversary() )
bDay = true;
tempText += "<tr><td><b>";
- if (ev->type()=="Event") {
+ if (ev->typeID() == eventID ) {
if (reply) {
if (!ev->doesFloat())
tempText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": ";
@@ -620,8 +620,8 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
if ( ev->cancelled() )
tempText += "</font>";
tempText += "<a ";
- if (ev->type()=="Event") tempText += "href=\"event:";
- if (ev->type()=="Todo") tempText += "href=\"todo:";
+ if (ev->typeID() == eventID ) tempText += "href=\"event:";
+ if (ev->typeID() == todoID ) tempText += "href=\"todo:";
tempText += ev->uid() + "\">";
if ( ev->summary().length() > 0 )
tempText += ev->summary();
@@ -631,7 +631,7 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
noc = ev->getNextOccurence( cdt.addDays(-1), &ok );
if ( ok ) {
int years = 0;
- if ( ev->type() =="Todo" ) {
+ if ( ev->typeID() == todoID ) {
years = noc.date().year() -((Todo*)ev)->dtDue().date().year();
} else
years = noc.date().year() - ev->dtStart().date().year();