From 87a9d6badcf518ffd14559ef886ff7729b63b73b Mon Sep 17 00:00:00 2001 From: waspe Date: Mon, 03 Nov 2003 18:28:50 +0000 Subject: resolved merge conflict --- (limited to 'core/pim/datebook/datebook.cpp') 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 @@ -192,6 +192,8 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) qDebug("done t=%d", t.elapsed() ); + connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); + connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); /* * Here is a problem description: * When Weekview is the default view @@ -402,6 +404,8 @@ void DateBook::viewMonth() { void DateBook::insertEvent( const Event &e ) { Event dupEvent=e; + if(!dupEvent.isValidUid() ) // tkcRom seems to be different + dupEvent.assignUid(); dupEvent.setLocation(defaultLocation); dupEvent.setCategories(defaultCategories); db->addEvent(dupEvent); @@ -443,15 +447,17 @@ void DateBook::duplicateEvent( const Event &e ) if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) continue; } - /* - * The problem: - * DateBookDB does remove repeating events not by uid but by the time - * the recurrence was created - * so we need to update that time as well - */ - Event::RepeatPattern rp = newEv.repeatPattern(); - rp.createTime = ::time( NULL ); - newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... + /* + * The problem: + * DateBookDB does remove repeating events not by uid but by the time + * the recurrence was created + * so we need to update that time as well + */ + Event::RepeatPattern rp = newEv.repeatPattern(); + rp.createTime = ::time( NULL ); + newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... + if( newEv.uid() == e.uid() || !newEv.isValidUid() ) + newEv.assignUid(); db->addEvent(newEv); emit newEvent(); -- cgit v0.9.0.2