author | hakan <hakan> | 2002-03-29 16:33:34 (UTC) |
---|---|---|
committer | hakan <hakan> | 2002-03-29 16:33:34 (UTC) |
commit | 3a1684894efb2106f957469b94350abf754a404e (patch) (side-by-side diff) | |
tree | 22e475a3dd11da80fa4f3735b479102715ba7eb3 | |
parent | d31e0363e905aae78034626896b0d6620ffbc8fc (diff) | |
download | opie-3a1684894efb2106f957469b94350abf754a404e.zip opie-3a1684894efb2106f957469b94350abf754a404e.tar.gz opie-3a1684894efb2106f957469b94350abf754a404e.tar.bz2 |
Editing an event will no longer clears it's uid
-rw-r--r-- | core/pim/datebook/datebook.cpp | 4 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 2 | ||||
-rw-r--r-- | core/pim/datebook/timepicker.cpp | 1 |
3 files changed, 5 insertions, 2 deletions
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 @@ -205,16 +205,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); 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 qDebug("done t=%d", t.elapsed() ); } void DateBook::receive( const QCString &msg, const QByteArray &data ) @@ -225,22 +226,20 @@ void DateBook::receive( const QCString &msg, const QByteArray &data ) if ( dayAction->isOn() ) viewDay(); else if ( weekAction->isOn() ) viewWeek(); else if ( monthAction->isOn() ) viewMonth(); } else if (msg == "editEvent(int)") { - /* Not yet working... int uid; stream >> uid; Event e=db->getEvent(uid); editEvent(e); - */ } } DateBook::~DateBook() { } void DateBook::slotSettings() @@ -396,16 +395,17 @@ void DateBook::editEvent( const Event &e ) entry->timezone->setEnabled( FALSE ); sv->addChild( entry ); #if defined(Q_WS_QWS) || defined(_WS_QWS_) editDlg.showMaximized(); #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", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; } db->editEvent(e, newEv); 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 @@ -108,18 +108,20 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, } void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) { startDate = s.date(); 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); } void DateEntry::updateTimeEdit(bool s, bool e) { // Comboboxes QString strStart, strEnd; int shour, ehour; 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 @@ -1,15 +1,16 @@ #include "timepicker.h" #include <qbuttongroup.h> #include <qtoolbutton.h> #include <qlayout.h> #include "clickablelabel.h" #include <qstring.h> +#include <stdio.h> TimePicker::TimePicker(QWidget* parent = 0, const char* name = 0, WFlags fl = 0) : QWidget(parent,name,fl) { QVBoxLayout *vbox=new QVBoxLayout(this); ClickableLabel *r; |