From 475c11d442a03d8e53b220923626c4bb7350831f Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 27 Jun 2002 12:42:37 +0000 Subject: Fix for bug 81. It's now like in todolist If neither description nor note is inserted it'll be discarded --- (limited to 'core/pim') diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index e10842a..76260e2 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -429,6 +429,8 @@ void DateBook::editEvent( const Event &e ) #endif while (editDlg.exec() ) { Event newEv = entry->event(); + if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) + break; newEv.setUid(e.uid()); // FIXME: Hack not to clear uid QString error = checkEvent(newEv); if (!error.isNull()) { diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index dab3375..2cdda9d 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -93,7 +93,7 @@ bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) comboStart->setText(s); } } - + return false; } @@ -186,7 +186,7 @@ void DateEntry::updateTimeEdit(bool s, bool e) { strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); } - + if (s) comboStart->setText(strStart); if (e) comboEnd->setText(strEnd); } @@ -211,7 +211,7 @@ void DateEntry::init() this, SLOT( slotChangeClock( bool ) ) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotChangeStartOfWeek(bool)) ); - + connect( editNote, SIGNAL(clicked()), this, SLOT(slotEditNote()) ); @@ -246,7 +246,7 @@ void DateEntry::slotEditNote() { QString s; s.sprintf("%d/%d ", startDate.day(), startDate.month()); NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, - this,0,TRUE); + this,0,TRUE); #if defined(Q_WS_QWS) || defined(_WS_QWS_) noteDlg.showMaximized(); @@ -421,7 +421,7 @@ Event DateEntry::event() endDate = startDate; startDate = tmp; } - + // This is now done in the changed slots // startTime = parseTime( comboStart->text(), ampm ); //endTime = parseTime( comboEnd->text(), ampm ); @@ -570,3 +570,4 @@ void DateEntry::slotChangeClock( bool whichClock ) initCombos(); setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); } + -- cgit v0.9.0.2