summaryrefslogtreecommitdiffabout
path: root/korganizer/outgoingdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/outgoingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/outgoingdialog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 0fc90c4..7253c8e 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -52,22 +52,22 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
mIncidence = ev;
mMethod = method;
mRecipients = recipients;
// kdDebug() << "ScheduleItemOut: setting the summary" << endl;
//Set the summary
- if(ev->type() != "FreeBusy") {
+ if(ev->typeID() != freebusyID ) {
Incidence *incidence = static_cast<Incidence *>(ev);
setText(0,incidence->summary());
} else {
setText(0,i18n("Free Busy Object"));
}
// kdDebug() << "ScheduleItemOut: checking if the object is an event" << endl;
//If the object is an event
- if(ev->type()=="Event") {
+ if(ev->typeID()== eventID ) {
Event *event = static_cast<Event *>(ev);
setText(1,event->dtStartDateStr());
if (event->doesFloat()) { //If the event floats set the start and end times to no time
setText(2,i18n("no time"));
setText(4,i18n("no time"));
@@ -85,13 +85,13 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
else {
setText(3,i18n("no time"));
}
}
//If the object is an Todo
- if(ev->type()=="Todo") {
+ if(ev->typeID() == todoID ) {
Todo *event = static_cast<Todo *>(ev);
if (event->hasStartDate()) {
setText(1,event->dtStartDateStr());
if (!event->doesFloat()) {
setText(2,event->dtStartTimeStr());
}
@@ -103,13 +103,13 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
}
}
}
// kdDebug() << "ScheduleItemOut: checking if the object is a FreeBusy object" << endl;
//If the object is a freebusy object
- if(ev->type() == "FreeBusy") {
+ if(ev->typeID() == freebusyID ) {
FreeBusy *freebusy = static_cast<FreeBusy *>(ev);
setText(1,freebusy->dtStartDateStr());
setText(2,freebusy->dtStartTimeStr());
//Must try and get this to the users local settings
setText(3,KGlobal::locale()->formatDate( freebusy->dtEnd().date() ) );
@@ -238,16 +238,16 @@ void OutgoingDialog::deleteItem()
void OutgoingDialog::showEvent(QListViewItem *qitem)
{
ScheduleItemOut *item = (ScheduleItemOut *)qitem;
Event *event = 0;
Todo *todo = 0;
- if ( item->event()->type()=="Event" ) {
+ if ( item->event()->typeID() == eventID ) {
event = static_cast<Event *>(item->event());
}
- if ( item->event()->type()=="Todo" ) {
+ if ( item->event()->typeID() == todoID ) {
todo = static_cast<Todo *>(item->event());
}
QString sendText;
if (event || todo) {
KOEventViewerDialog *eventViewer = new KOEventViewerDialog(this);
if (event) eventViewer->setEvent(event);