summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index c4c0081..2c78ea3 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -417,28 +417,29 @@ void KDateEdit::lineEnterPressed()
417 setDate(date); 417 setDate(date);
418 emit(dateChanged(date)); 418 emit(dateChanged(date));
419 emit returnPressed(); 419 emit returnPressed();
420 } 420 }
421 else 421 else
422 { 422 {
423 if ( withoutDp ) { 423 if ( withoutDp ) {
424 KNotifyClient::beep(); 424 KNotifyClient::beep();
425 } else { 425 } else {
426 if ( !mDateEdit->text().isEmpty() ) { 426 if ( !mDateEdit->text().isEmpty() ) {
427 mTextChanged = false; 427 mTextChanged = false;
428 QString text = i18n( "You entered an invalid date!\n Will use current date instead." ); 428 QString text = i18n( "You entered an invalid date!\n Will use current date instead." );
429 if ( KMessageBox::warningContinueCancel( 0, text ) == KMessageBox::Continue ) { 429 if ( isVisible() )
430 setDate( QDate::currentDate() ); 430 if ( KMessageBox::warningContinueCancel( 0, text ) == KMessageBox::Continue ) {
431 emit dateChanged( QDate::currentDate() ); 431 setDate( QDate::currentDate() );
432 } 432 emit dateChanged( QDate::currentDate() );
433 }
433 } 434 }
434 } 435 }
435 } 436 }
436} 437}
437 438
438bool KDateEdit::inputIsValid() 439bool KDateEdit::inputIsValid()
439{ 440{
440 return readDate().isValid(); 441 return readDate().isValid();
441} 442}
442 443
443QDate KDateEdit::readDate() const 444QDate KDateEdit::readDate() const
444{ 445{