summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.cpp
Unidiff
Diffstat (limited to 'libkcal/incidencebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/incidencebase.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 9aa517c..7525a4a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -213,14 +213,23 @@ void IncidenceBase::setFloats(bool f)
213} 213}
214 214
215 215
216void IncidenceBase::addAttendee(Attendee *a, bool doupdate) 216bool IncidenceBase::addAttendee(Attendee *a, bool doupdate)
217{ 217{
218 if (mReadOnly) return; 218 if (mReadOnly) return false;
219 if (a->name().left(7).upper() == "MAILTO:") 219 if (a->name().left(7).upper() == "MAILTO:")
220 a->setName(a->name().remove(0,7)); 220 a->setName(a->name().remove(0,7));
221 221
222 QPtrListIterator<Attendee> qli(mAttendees);
223
224 qli.toFirst();
225 while (qli) {
226 if (*qli.current() == *a)
227 return false;
228 ++qli;
229 }
222 mAttendees.append(a); 230 mAttendees.append(a);
223 if (doupdate) updated(); 231 if (doupdate) updated();
232 return true;
224} 233}
225 234
226#if 0 235#if 0