-rw-r--r-- | core/pim/datebook/datebook.cpp | 2 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
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 | |||
@@ -426,12 +426,14 @@ void DateBook::editEvent( const Event &e ) | |||
426 | 426 | ||
427 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 427 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
428 | editDlg.showMaximized(); | 428 | editDlg.showMaximized(); |
429 | #endif | 429 | #endif |
430 | while (editDlg.exec() ) { | 430 | while (editDlg.exec() ) { |
431 | Event newEv = entry->event(); | 431 | Event newEv = entry->event(); |
432 | if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) | ||
433 | break; | ||
432 | newEv.setUid(e.uid()); // FIXME: Hack not to clear uid | 434 | newEv.setUid(e.uid()); // FIXME: Hack not to clear uid |
433 | QString error = checkEvent(newEv); | 435 | QString error = checkEvent(newEv); |
434 | if (!error.isNull()) { | 436 | if (!error.isNull()) { |
435 | if (QMessageBox::warning(this, "error box", | 437 | if (QMessageBox::warning(this, "error box", |
436 | error, "Fix it", "Continue", | 438 | error, "Fix it", "Continue", |
437 | 0, 0, 1) == 0) | 439 | 0, 0, 1) == 0) |
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 | |||
@@ -90,13 +90,13 @@ bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) | |||
90 | else if( obj == comboStart ){ | 90 | else if( obj == comboStart ){ |
91 | QString s; | 91 | QString s; |
92 | s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); | 92 | s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); |
93 | comboStart->setText(s); | 93 | comboStart->setText(s); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | return false; | 97 | return false; |
98 | } | 98 | } |
99 | 99 | ||
100 | static void addOrPick( QComboBox* combo, const QString& t ) | 100 | static void addOrPick( QComboBox* combo, const QString& t ) |
101 | { | 101 | { |
102 | // Pick an item if one excists | 102 | // Pick an item if one excists |
@@ -183,13 +183,13 @@ void DateEntry::updateTimeEdit(bool s, bool e) { | |||
183 | strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); | 183 | strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); |
184 | } | 184 | } |
185 | } else { | 185 | } else { |
186 | strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); | 186 | strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); |
187 | strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); | 187 | strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); |
188 | } | 188 | } |
189 | 189 | ||
190 | if (s) comboStart->setText(strStart); | 190 | if (s) comboStart->setText(strStart); |
191 | if (e) comboEnd->setText(strEnd); | 191 | if (e) comboEnd->setText(strEnd); |
192 | } | 192 | } |
193 | 193 | ||
194 | void DateEntry::init() | 194 | void DateEntry::init() |
195 | { | 195 | { |
@@ -208,13 +208,13 @@ void DateEntry::init() | |||
208 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), | 208 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), |
209 | this, SLOT( endDateChanged( int, int, int ) ) ); | 209 | this, SLOT( endDateChanged( int, int, int ) ) ); |
210 | connect( qApp, SIGNAL( clockChanged( bool ) ), | 210 | connect( qApp, SIGNAL( clockChanged( bool ) ), |
211 | this, SLOT( slotChangeClock( bool ) ) ); | 211 | this, SLOT( slotChangeClock( bool ) ) ); |
212 | connect( qApp, SIGNAL(weekChanged(bool)), | 212 | connect( qApp, SIGNAL(weekChanged(bool)), |
213 | this, SLOT(slotChangeStartOfWeek(bool)) ); | 213 | this, SLOT(slotChangeStartOfWeek(bool)) ); |
214 | 214 | ||
215 | connect( editNote, SIGNAL(clicked()), | 215 | connect( editNote, SIGNAL(clicked()), |
216 | this, SLOT(slotEditNote()) ); | 216 | this, SLOT(slotEditNote()) ); |
217 | 217 | ||
218 | QPopupMenu *m2 = new QPopupMenu( this ); | 218 | QPopupMenu *m2 = new QPopupMenu( this ); |
219 | endPicker = new DateBookMonth( m2, 0, TRUE ); | 219 | endPicker = new DateBookMonth( m2, 0, TRUE ); |
220 | m2->insertItem( endPicker ); | 220 | m2->insertItem( endPicker ); |
@@ -243,13 +243,13 @@ DateEntry::~DateEntry() | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | void DateEntry::slotEditNote() { | 245 | void DateEntry::slotEditNote() { |
246 | QString s; | 246 | QString s; |
247 | s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); | 247 | s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); |
248 | NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, | 248 | NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, |
249 | this,0,TRUE); | 249 | this,0,TRUE); |
250 | 250 | ||
251 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 251 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
252 | noteDlg.showMaximized(); | 252 | noteDlg.showMaximized(); |
253 | #endif | 253 | #endif |
254 | if (noteDlg.exec() ) { | 254 | if (noteDlg.exec() ) { |
255 | noteStr=noteDlg.note->text(); | 255 | noteStr=noteDlg.note->text(); |
@@ -418,13 +418,13 @@ Event DateEntry::event() | |||
418 | ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal ); | 418 | ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal ); |
419 | if ( startDate > endDate ) { | 419 | if ( startDate > endDate ) { |
420 | QDate tmp = endDate; | 420 | QDate tmp = endDate; |
421 | endDate = startDate; | 421 | endDate = startDate; |
422 | startDate = tmp; | 422 | startDate = tmp; |
423 | } | 423 | } |
424 | 424 | ||
425 | // This is now done in the changed slots | 425 | // This is now done in the changed slots |
426 | // startTime = parseTime( comboStart->text(), ampm ); | 426 | // startTime = parseTime( comboStart->text(), ampm ); |
427 | //endTime = parseTime( comboEnd->text(), ampm ); | 427 | //endTime = parseTime( comboEnd->text(), ampm ); |
428 | 428 | ||
429 | if ( startTime > endTime && endDate == startDate ) { | 429 | if ( startTime > endTime && endDate == startDate ) { |
430 | QTime tmp = endTime; | 430 | QTime tmp = endTime; |
@@ -567,6 +567,7 @@ void DateEntry::initCombos() | |||
567 | void DateEntry::slotChangeClock( bool whichClock ) | 567 | void DateEntry::slotChangeClock( bool whichClock ) |
568 | { | 568 | { |
569 | ampm = whichClock; | 569 | ampm = whichClock; |
570 | initCombos(); | 570 | initCombos(); |
571 | setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); | 571 | setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); |
572 | } | 572 | } |
573 | |||