summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 10a9b59..07d7164 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -187,16 +187,18 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
187 channel = new QCopChannel( "QPE/Datebook", this ); 187 channel = new QCopChannel( "QPE/Datebook", this );
188 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); 188 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) );
189 qDebug("olle\n"); 189 qDebug("olle\n");
190#endif 190#endif
191#endif 191#endif
192 192
193 qDebug("done t=%d", t.elapsed() ); 193 qDebug("done t=%d", t.elapsed() );
194 194
195 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
196 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
195 /* 197 /*
196 * Here is a problem description: 198 * Here is a problem description:
197 * When Weekview is the default view 199 * When Weekview is the default view
198 * a DateBookWeekView get's created 200 * a DateBookWeekView get's created
199 * redraw() get's called. So what? 201 * redraw() get's called. So what?
200 * Remember that we're still in the c'tor 202 * Remember that we're still in the c'tor
201 * and no final layout has happened? Ok 203 * and no final layout has happened? Ok
202 * now all Events get arranged. Their x 204 * now all Events get arranged. Their x
@@ -397,16 +399,18 @@ void DateBook::viewWeekLst() {
397 399
398void DateBook::viewMonth() { 400void DateBook::viewMonth() {
399 view(MONTH,currentDate()); 401 view(MONTH,currentDate());
400} 402}
401 403
402void DateBook::insertEvent( const Event &e ) 404void DateBook::insertEvent( const Event &e )
403{ 405{
404 Event dupEvent=e; 406 Event dupEvent=e;
407 if(!dupEvent.isValidUid() ) // tkcRom seems to be different
408 dupEvent.assignUid();
405 dupEvent.setLocation(defaultLocation); 409 dupEvent.setLocation(defaultLocation);
406 dupEvent.setCategories(defaultCategories); 410 dupEvent.setCategories(defaultCategories);
407 db->addEvent(dupEvent); 411 db->addEvent(dupEvent);
408 emit newEvent(); 412 emit newEvent();
409} 413}
410 414
411void DateBook::duplicateEvent( const Event &e ) 415void DateBook::duplicateEvent( const Event &e )
412{ 416{
@@ -447,16 +451,18 @@ void DateBook::duplicateEvent( const Event &e )
447 * The problem: 451 * The problem:
448 * DateBookDB does remove repeating events not by uid but by the time 452 * DateBookDB does remove repeating events not by uid but by the time
449 * the recurrence was created 453 * the recurrence was created
450 * so we need to update that time as well 454 * so we need to update that time as well
451 */ 455 */
452 Event::RepeatPattern rp = newEv.repeatPattern(); 456 Event::RepeatPattern rp = newEv.repeatPattern();
453 rp.createTime = ::time( NULL ); 457 rp.createTime = ::time( NULL );
454 newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... 458 newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern...
459 if( newEv.uid() == e.uid() || !newEv.isValidUid() )
460 newEv.assignUid();
455 461
456 db->addEvent(newEv); 462 db->addEvent(newEv);
457 emit newEvent(); 463 emit newEvent();
458 break; 464 break;
459 } 465 }
460} 466}
461 467
462void DateBook::editEvent( const Event &e ) 468void DateBook::editEvent( const Event &e )