summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Side-by-side diff
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
@@ -189,12 +189,14 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
qDebug("olle\n");
#endif
#endif
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
* a DateBookWeekView get's created
* redraw() get's called. So what?
* Remember that we're still in the c'tor
@@ -399,12 +401,14 @@ void DateBook::viewMonth() {
view(MONTH,currentDate());
}
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);
emit newEvent();
}
@@ -449,12 +453,14 @@ void DateBook::duplicateEvent( const Event &e )
* 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();
break;
}
}