From kde-bugs-dist Sat Sep 30 20:54:50 2006 From: Mart Kelder Date: Sat, 30 Sep 2006 20:54:50 +0000 To: kde-bugs-dist Subject: [Bug 129547] korn sometimes fails to open the passwords wallet Message-Id: <20060930205450.30736.qmail () ktown ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=115964969923656 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=129547 ------- Additional Comments From mart kelder31 nl 2006-09-30 22:54 ------- SVN commit 590788 by mkelder: Delay startup in certain circumstances for bug 129547 CCBUG: 129547 M +29 -4 kornshell.cpp M +3 -3 kornshell.h --- branches/KDE/3.5/kdepim/korn/kornshell.cpp #590787:590788 @ -1,5 +1,5 @ /* - * Copyright (C) 2004, Mart Kelder (mart.kde hccnet nl) + * Copyright (C) 2004-2006, Mart Kelder (mart kelder31 nl) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @ -26,17 +26,32 @ #include #include +#include #include #include +#include + KornShell::KornShell( QWidget * parent, const char * name ) : QWidget( parent, name ), _config( new KConfig( "kornrc" ) ), _box( 0 ), - _configDialog( 0 ) + _configDialog( 0 ), + _show( false ) { _config->checkUpdate( "korn_kde_3_4_config_change", "korn-3-4-config_change.upd" ); - readConfig(); + if( kapp->isRestored() ) + { + _config->setGroup( "korn" ); + QTimer::singleShot( _config->readNumEntry( "session_startup_delay", 200 ), this, SLOT(readConfig()) ); + kdDebug() << "startup delayed" << endl; + } + else + { + kdDebug() << "Startup not delayed" << endl; + readConfig(); + } + } KornShell::~KornShell() @ -49,7 +64,10 @ void KornShell::show() { - _box->showBox(); + if( _box ) + _box->showBox(); + else + _show = true; } void KornShell::optionDlg() @ -103,6 +121,13 @ { kapp->quit(); } + + if( _show ) + { + // Show is called, but _box wasn't available at that time + show(); + _show = false; + } } void KornShell::slotDialogClosed() --- branches/KDE/3.5/kdepim/korn/kornshell.h #590787:590788 @ -1,5 +1,5 @ /* - * Copyright (C) 2004, Mart Kelder (mart.kde hccnet nl) + * Copyright (C) 2004-2006, Mart Kelder (mart kelder31 nl) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @ -45,13 +45,13 @ private slots: void slotDialogClosed(); void slotApply(); + void readConfig(); private: - void readConfig(); - KConfig *_config; BoxContainer *_box; KDialogBase *_configDialog; + bool _show; }; #endif //MK_KORNSHELL_H