From 3a1684894efb2106f957469b94350abf754a404e Mon Sep 17 00:00:00 2001 From: hakan Date: Fri, 29 Mar 2002 16:33:34 +0000 Subject: Editing an event will no longer clears it's uid --- diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 2deb96f..97c305c 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -210,6 +210,7 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) channel = new QCopChannel( "QPE/Datebook", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); + qDebug("olle\n"); #endif #endif @@ -230,12 +231,10 @@ void DateBook::receive( const QCString &msg, const QByteArray &data ) viewMonth(); } else if (msg == "editEvent(int)") { - /* Not yet working... - int uid; - stream >> uid; - Event e=db->getEvent(uid); - editEvent(e); - */ + int uid; + stream >> uid; + Event e=db->getEvent(uid); + editEvent(e); } } @@ -401,6 +400,7 @@ void DateBook::editEvent( const Event &e ) #endif while (editDlg.exec() ) { Event newEv = entry->event(); + newEv.setUid(e.uid()); // FIXME: Hack not to clear uid QString error = checkEvent(newEv); if (!error.isNull()) { if (QMessageBox::warning(this, "error box", diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 1c43363..e563db0 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -113,8 +113,10 @@ void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) endDate = e.date(); startTime = s.time(); endTime = e.time(); + startDateChanged( s.date().year(), s.date().month(), s.date().day() ); endDateChanged( e.date().year(), e.date().month(), e.date().day() ); + updateTimeEdit(true,true); } diff --git a/core/pim/datebook/timepicker.cpp b/core/pim/datebook/timepicker.cpp index 5f08a05..9097e1b 100644 --- a/core/pim/datebook/timepicker.cpp +++ b/core/pim/datebook/timepicker.cpp @@ -5,6 +5,7 @@ #include #include "clickablelabel.h" #include +#include TimePicker::TimePicker(QWidget* parent = 0, const char* name = 0, WFlags fl = 0) : -- cgit v0.9.0.2