Bug 101093 - during kpim startup imap password is asked but cannot be entered because focus is missing
Summary: during kpim startup imap password is asked but cannot be entered because focu...
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 101786 102330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-08 12:40 UTC by Axel Roebel
Modified: 2005-03-27 01:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Roebel 2005-03-08 12:40:08 UTC
Version:           unknown (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:                Linux (i686) release 2.4.26

when starting kontact having selected an imap email server
the program asks for a password for that server during startup.
The problem is that the dialog never receives focus 
such that I cannot enter the password. The program effectively
is blocked - cancel and ok button do not react the only way out I found is to click the close button of the authorization dialog window, then kontact wil initializae the kmail modul
and ask for authorization again. This time the focus is correct and the procedure works.


Kind regards
Comment 1 Andre Woebbeking 2005-03-17 13:33:06 UTC
I can confirm this with SuSE 9.1 KDE 3.4.0 packages and with CVS HEAD. This only occurs in Kontact, not if I start KMail as single application.


André
Comment 2 Tobias Koenig 2005-03-23 11:06:20 UTC
CVS commit by tokoe: 

Remove layzy loading and the keypresseater hack which caused a lot of other bugs.

BUGS:101093


  M +7 -43     mainwindow.cpp   1.169
  M +0 -3      mainwindow.h   1.67


--- kdepim/kontact/src/mainwindow.cpp  #1.168:1.169
@@ -74,32 +74,9 @@
 #include "broadcaststatus.h"
 
-class KeyPressEater : public QObject
-{
-  public:
-    KeyPressEater( QObject *parent )
-      : QObject( parent, "KeyPressEater" )
-    {
-    }
-
-  protected:
-    bool eventFilter( QObject*, QEvent *event )
-    {
-      if ( event->type() == QEvent::KeyPress ||
-           event->type() == QEvent::KeyRelease ||
-           event->type() == QEvent::MouseButtonPress ||
-           event->type() == QEvent::MouseButtonRelease ||
-           event->type() == QEvent::MouseButtonDblClick )
-        return true;
-      else
-        return false;
-    }
-};
-
 using namespace Kontact;
 
 MainWindow::MainWindow()
   : Kontact::Core(), mTopWidget( 0 ), mSplitter( 0 ),
-    mCurrentPlugin( 0 ), mAboutDialog( 0 ), mReallyClose( false ),
-    mStartupCompleted( false )
+    mCurrentPlugin( 0 ), mAboutDialog( 0 ), mReallyClose( false )
 {
   // Set this to be the group leader for all subdialogs - this means
@@ -107,10 +84,6 @@ MainWindow::MainWindow()
   setWFlags( getWFlags() | WGroupLeader );
 
-  // Prevent user input during loading the plugins
-  mKeyPressEater = new KeyPressEater( this );
-  kapp->installEventFilter( mKeyPressEater );
-
   initGUI();
-  QTimer::singleShot( 0, this, SLOT( initObject() ) );
+  initObject();
 }
 
@@ -157,6 +130,5 @@ void MainWindow::initObject()
   loadPlugins();
 
-  if ( mSidePane )
-  {
+  if ( mSidePane ) {
       mSidePane->updatePlugins();
       plugActionList( "navigator_actionlist", mSidePane->actions() );
@@ -184,7 +156,4 @@ void MainWindow::initObject()
   activatePluginModule();
 
-  // keep this above the lastVersionSeen check!
-  mStartupCompleted = true;
-
   if ( Prefs::lastVersionSeen() == kapp->aboutData()->version() ) {
     selectPlugin( mCurrentPlugin );
@@ -193,7 +162,4 @@ void MainWindow::initObject()
   paintAboutScreen( introductionString() );
   Prefs::setLastVersionSeen( kapp->aboutData()->version() );
-
-  kapp->removeEventFilter( mKeyPressEater );
-  delete mKeyPressEater;
 }
 
@@ -578,8 +544,6 @@ void MainWindow::selectPlugin( Kontact::
 
   if ( view ) {
-    if ( mStartupCompleted ) {
       mPartsStack->raiseWidget( view );
       view->show();
-    }
 
     if ( mFocusWidgets.contains( plugin->identifier() ) ) {

--- kdepim/kontact/src/mainwindow.h  #1.66:1.67
@@ -151,7 +151,4 @@ class MainWindow : public Kontact::Core,
     AboutDialog *mAboutDialog;
     bool mReallyClose;
-    bool mStartupCompleted;
-
-    KeyPressEater *mKeyPressEater;
 };
 
Comment 3 Ingo Klöcker 2005-03-26 23:46:32 UTC
*** Bug 102330 has been marked as a duplicate of this bug. ***
Comment 4 Ingo Klöcker 2005-03-27 01:23:21 UTC
*** Bug 101786 has been marked as a duplicate of this bug. ***