-rw-r--r-- | pwmanager/pwmanager/main.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index 70df15d..6e449c6 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp @@ -9,48 +9,49 @@ * * ***************************************************************************/ /*************************************************************************** * copyright (C) 2004 by Ulf Schenk * This file is originaly based on version 1.0.1 of pwmanager * and was modified to run on embedded devices that run microkde * * $Id$ **************************************************************************/ #ifndef PWM_EMBEDDED #include <kcmdlineargs.h> #include <kaboutdata.h> #else #include <qdir.h> #include <kpimglobalprefs.h> #endif #include <klocale.h> #include <kstandarddirs.h> #include "pwmexception.h" #include "pwminit.h" +void dumpMissing(); #define LICENSE_FILE (::locate("data", "pwmanager/pwmanager_license_text")) int PwMApplication::newInstance() { static bool initial = true; if (initial) { initial = false; init = new PwMInit(this); init->initializeApp(); } else { BUG_ON(!init); printInfo("passing parameters to old instance."); init->handleCmdLineArgs(false); } return EXIT_SUCCESS; } static const char *description = I18N_NOOP("PwManager\n" "The convenient way of managing passwords"); #ifndef PWM_EMBEDDED static KCmdLineOptions options[] = @@ -190,31 +191,32 @@ int main(int argc, char *argv[]) fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); QApplication::addLibraryPath ( qApp->applicationDirPath () ); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); KPimGlobalPrefs::instance()->setGlobalConfig(); a.newInstance(); //US KAddressBookMain m ; //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); /*US #ifndef DESKTOP_VERSION a.showMainWidget( &m ); #else a.setMainWidget( &m ); m.resize (640, 480 ); m.show(); #endif */ QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit())); a.exec(); + dumpMissing(); KPimGlobalPrefs::instance()->writeConfig(); } qDebug("PWMPI: Bye! "); #endif } diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index 68f3637..0cf248c 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp @@ -166,50 +166,51 @@ void PwMInit::initializeApp() createMainWnd(conf()->confGlobAutoStart(), openDeeplocked, true, 0, savedCmd.minimized); // } } else { createMainWnd(conf()->confGlobAutoStart(), openDeeplocked, true, 0, savedCmd.minimized); } runStatus = running; } void PwMInit::shutdownApp(int exitStatus) { - PwM * iii; - while ( iii = _mainWndList.first() ) { + PwM * iii;; + while ( _mainWndList.count() ) { + iii = _mainWndList.first(); disconnect(iii, SIGNAL(closed(PwM *)), this, SLOT(mainWndClosed(PwM *))); mainWndClosed((iii)); } printDebug(string("PwMInit::shutdownApp(") + tostr(exitStatus) + ") called."); PWM_ASSERT((runStatus == running) || (runStatus == init)); runStatus = shutdown; QApplication::exit(exitStatus); /* The destructor of PwMInit is called when control * leaves main() */ } void PwMInit::initPosixSignalHandler() { signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); } void PwMInit::initDCOP() { #ifndef PWM_EMBEDDED |