diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbdatetimeedit.cpp --- a/src/hbwidgets/editors/hbdatetimeedit.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbdatetimeedit.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -30,6 +30,7 @@ #include "hbdatetimevalidator_p.h" #include "hbdatetimeedit.h" #include "hbdatetimeedit_p.h" +#include "hbevent.h" /*! @alpha @@ -234,26 +235,14 @@ /*! \reimp */ -void HbDateTimeEdit::focusOutEvent(QFocusEvent *event) +bool HbDateTimeEdit::event(QEvent* event) { Q_D(HbDateTimeEdit); - if(d->validator->fixDate(&d->cursor, true)) { - // fixing so restore focus to editor - // do it asynchronously by private slot: - int metodIndex = metaObject()->indexOfMethod("_q_regainFocus()"); - if (metodIndex<0) { - qWarning("HbDateTimeEdit::focusOutEvent private method " - "_q_regainFocus() NOT FOUND"); - } else { - if (!metaObject()->method(metodIndex).invoke(this, Qt::QueuedConnection)) { - qWarning("HbDateTimeEdit::focusOutEvent failed to call " - "private method _q_regainFocus()"); - } - } - // prevent emmiting signal editingFinished so omnit HbLineEdit - HbAbstractEdit::focusOutEvent(event); - } else { - HbLineEdit::focusOutEvent(event); + if (event->type() == HbEvent::InputMethodFocusOut) { + d->validator->fixDate(&d->cursor, true); } + + return HbLineEdit::event(event); } +