author | zautrix <zautrix> | 2004-10-23 15:37:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-23 15:37:38 (UTC) |
commit | 5415db4a06862b57539de051e2e82c8d8f3a5b48 (patch) (unidiff) | |
tree | a0a5719246aba7d2a5e36b8d8601193ba9e907b3 /pwmanager | |
parent | 54c77b2331f9afe90643c6d1343a7f5543577b71 (diff) | |
download | kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.zip kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.tar.gz kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.tar.bz2 |
compile fixes
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index 9238c8c..d775aa9 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp | |||
@@ -10,112 +10,115 @@ | |||
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 1.0.1 of pwmanager | 14 | * This file is originaly based on version 1.0.1 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "pwminit.h" | 20 | #include "pwminit.h" |
21 | #include "randomizer.h" | 21 | #include "randomizer.h" |
22 | #include <qdir.h> | 22 | #include <qdir.h> |
23 | 23 | ||
24 | #ifndef PWM_EMBEDDED | 24 | #ifndef PWM_EMBEDDED |
25 | #include "selftest.h" | 25 | #include "selftest.h" |
26 | #include "configuration.h" | 26 | #include "configuration.h" |
27 | #else | 27 | #else |
28 | #include "pwmprefs.h" | 28 | #include "pwmprefs.h" |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include "pwm.h" | 31 | #include "pwm.h" |
32 | #include "pwmexception.h" | 32 | #include "pwmexception.h" |
33 | #include "pwmtray.h" | 33 | #include "pwmtray.h" |
34 | #include "pwmdoc.h" | 34 | #include "pwmdoc.h" |
35 | 35 | ||
36 | #ifdef CONFIG_KWALLETIF | 36 | #ifdef CONFIG_KWALLETIF |
37 | # include "kwalletemu.h" | 37 | # include "kwalletemu.h" |
38 | #endif // CONFIG_KWALLETIF | 38 | #endif // CONFIG_KWALLETIF |
39 | #ifdef CONFIG_KEYCARD | 39 | #ifdef CONFIG_KEYCARD |
40 | # include "pwmkeycard.h" | 40 | # include "pwmkeycard.h" |
41 | #endif // CONFIG_KEYCARD | 41 | #endif // CONFIG_KEYCARD |
42 | 42 | ||
43 | #include <qmessagebox.h> | 43 | #include <qmessagebox.h> |
44 | 44 | ||
45 | #include <kmessagebox.h> | 45 | #include <kmessagebox.h> |
46 | #ifndef PWM_EMBEDDED | 46 | #ifndef PWM_EMBEDDED |
47 | #include <kcmdlineargs.h> | 47 | #include <kcmdlineargs.h> |
48 | #include <kwin.h> | 48 | #include <kwin.h> |
49 | #include <dcopclient.h> | 49 | #include <dcopclient.h> |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #include <kapplication.h> | 52 | #include <kapplication.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | 54 | ||
55 | #include <signal.h> | 55 | #include <signal.h> |
56 | 56 | ||
57 | static PwMInit *sig_init_pointer; | 57 | static PwMInit *sig_init_pointer; |
58 | #ifdef _WIN32_ | ||
59 | static void sig_handler(int signum) | ||
60 | #else | ||
58 | static NOREGPARM void sig_handler(int signum) | 61 | static NOREGPARM void sig_handler(int signum) |
62 | #endif | ||
59 | { | 63 | { |
60 | switch (signum) { | 64 | switch (signum) { |
61 | case SIGINT: | 65 | case SIGINT: |
62 | case SIGTERM: | 66 | case SIGTERM: |
63 | sig_init_pointer->shutdownApp(20 + signum); | 67 | sig_init_pointer->shutdownApp(20 + signum); |
64 | break; | 68 | break; |
65 | default: | 69 | default: |
66 | printDebug(string("unhandled signal ") | 70 | printDebug(string("unhandled signal ") |
67 | + tostr(signum)); | 71 | + tostr(signum)); |
68 | } | 72 | } |
69 | } | 73 | } |
70 | 74 | ||
71 | 75 | ||
72 | 76 | ||
73 | |||
74 | PwMInit::PwMInit(PwMApplication *_app) | 77 | PwMInit::PwMInit(PwMApplication *_app) |
75 | : runStatus (unknown) | 78 | : runStatus (unknown) |
76 | , _curWidget (0) | 79 | , _curWidget (0) |
77 | , _dcopClient (0) | 80 | , _dcopClient (0) |
78 | , _kwalletEmu (0) | 81 | , _kwalletEmu (0) |
79 | , _keycard (0) | 82 | , _keycard (0) |
80 | , _tray (0) | 83 | , _tray (0) |
81 | { | 84 | { |
82 | sig_init_pointer = this; | 85 | sig_init_pointer = this; |
83 | app = _app; | 86 | app = _app; |
84 | } | 87 | } |
85 | 88 | ||
86 | PwMInit::~PwMInit() | 89 | PwMInit::~PwMInit() |
87 | { | 90 | { |
88 | #ifndef PWM_EMBEDDED | 91 | #ifndef PWM_EMBEDDED |
89 | SelfTest::cancel(); | 92 | SelfTest::cancel(); |
90 | // close all open mainwnds | 93 | // close all open mainwnds |
91 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 94 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
92 | end = _mainWndList.end(); | 95 | end = _mainWndList.end(); |
93 | 96 | ||
94 | #else | 97 | #else |
95 | // close all open mainwnds | 98 | // close all open mainwnds |
96 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 99 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
97 | end = _mainWndList.end(); | 100 | end = _mainWndList.end(); |
98 | #endif | 101 | #endif |
99 | while (i != end) { | 102 | while (i != end) { |
100 | disconnect(*i, SIGNAL(closed(PwM *)), | 103 | disconnect(*i, SIGNAL(closed(PwM *)), |
101 | this, SLOT(mainWndClosed(PwM *))); | 104 | this, SLOT(mainWndClosed(PwM *))); |
102 | delete *i; | 105 | delete *i; |
103 | ++i; | 106 | ++i; |
104 | } | 107 | } |
105 | _mainWndList.clear(); | 108 | _mainWndList.clear(); |
106 | // close all remaining open documents | 109 | // close all remaining open documents |
107 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 110 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
108 | vector<PwMDocList::listItem> dl = *(_dl->getList()); | 111 | vector<PwMDocList::listItem> dl = *(_dl->getList()); |
109 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), | 112 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), |
110 | end2 = dl.end(); | 113 | end2 = dl.end(); |
111 | while (i2 != end2) { | 114 | while (i2 != end2) { |
112 | delete (*i2).doc; | 115 | delete (*i2).doc; |
113 | ++i2; | 116 | ++i2; |
114 | } | 117 | } |
115 | 118 | ||
116 | #ifdef CONFIG_KWALLETIF | 119 | #ifdef CONFIG_KWALLETIF |
117 | delete_ifnot_null(_kwalletEmu); | 120 | delete_ifnot_null(_kwalletEmu); |
118 | #endif // CONFIG_KWALLETIF | 121 | #endif // CONFIG_KWALLETIF |
119 | #ifdef CONFIG_KEYCARD | 122 | #ifdef CONFIG_KEYCARD |
120 | delete_ifnot_null(_keycard); | 123 | delete_ifnot_null(_keycard); |
121 | #endif // CONFIG_KEYCARD | 124 | #endif // CONFIG_KEYCARD |