summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp24
1 files changed, 15 insertions, 9 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
@@ -194,2 +194,4 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
+ connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
+ connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
/*
@@ -404,2 +406,4 @@ void DateBook::insertEvent( const Event &e )
Event dupEvent=e;
+ if(!dupEvent.isValidUid() ) // tkcRom seems to be different
+ dupEvent.assignUid();
dupEvent.setLocation(defaultLocation);
@@ -445,11 +449,13 @@ void DateBook::duplicateEvent( const Event &e )
}
- /*
- * 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();