-rw-r--r-- | korganizer/koeditorgeneral.cpp | 13 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 3 | ||||
-rw-r--r-- | korganizer/koeventeditor.cpp | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index abc80d4..f54660f 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -61,2 +61,3 @@ KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : { + mNextFocus = 0; } @@ -107,4 +108,9 @@ void KOEditorGeneral::setFocusOn( int i ) { - qApp->processEvents(); - if ( i == 1 ) { + mNextFocus = i; + QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); +} +void KOEditorGeneral::slotSetFocusOn() +{ + mNextFocus; + if ( mNextFocus == 1 ) { mDescriptionEdit->setFocus(); @@ -112,6 +118,5 @@ void KOEditorGeneral::setFocusOn( int i ) } - if ( i == 2 ) { + if ( mNextFocus == 2 ) { mSummaryEdit->setFocus(); } - } diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index f4728c7..2069e9c 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -83,3 +83,3 @@ class KOEditorGeneral : public QObject void pickAlarmProgram(); - + void slotSetFocusOn(); signals: @@ -89,2 +89,3 @@ class KOEditorGeneral : public QObject protected: + int mNextFocus; //QLineEdit *mSummaryEdit; diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 337db9b..e23e680 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -188,3 +188,2 @@ void KOEventEditor::editEvent(Event *event, bool showDescription) readEvent(mEvent); - qApp->processEvents(); if ( showDescription ) { |