Diffstat (limited to 'libopie2/opiesecurity/multiauthcommon.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiesecurity/multiauthcommon.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiesecurity/multiauthcommon.cpp b/libopie2/opiesecurity/multiauthcommon.cpp index b72b9b1..d8e26d5 100644 --- a/libopie2/opiesecurity/multiauthcommon.cpp +++ b/libopie2/opiesecurity/multiauthcommon.cpp | |||
@@ -7,24 +7,26 @@ | |||
7 | 7 | ||
8 | /* Qt */ | 8 | /* Qt */ |
9 | #include <qpe/qpeapplication.h> | 9 | #include <qpe/qpeapplication.h> |
10 | #include <qpe/qlibrary.h> | 10 | #include <qpe/qlibrary.h> |
11 | #include <qpe/qcom.h> | 11 | #include <qpe/qcom.h> |
12 | #include <qtextview.h> | 12 | #include <qtextview.h> |
13 | #include <qdir.h> | 13 | #include <qdir.h> |
14 | 14 | ||
15 | /* UNIX */ | 15 | /* UNIX */ |
16 | #include <unistd.h> | 16 | #include <unistd.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | 18 | ||
19 | namespace Opie { | ||
20 | namespace Security { | ||
19 | 21 | ||
20 | SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c, | 22 | SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c, |
21 | bool modal, bool fullscreen = FALSE ) | 23 | bool modal, bool fullscreen = FALSE ) |
22 | : QDialog( parent, name, modal, | 24 | : QDialog( parent, name, modal, |
23 | fullscreen ? | 25 | fullscreen ? |
24 | WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ) | 26 | WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ) |
25 | { | 27 | { |
26 | if ( fullscreen ) { | 28 | if ( fullscreen ) { |
27 | QRect desk = qApp->desktop()->geometry(); | 29 | QRect desk = qApp->desktop()->geometry(); |
28 | setGeometry( 0, 0, desk.width(), desk.height() ); | 30 | setGeometry( 0, 0, desk.width(), desk.height() ); |
29 | } | 31 | } |
30 | // set up contents. | 32 | // set up contents. |
@@ -44,24 +46,25 @@ void SecOwnerDlg::resizeEvent( QResizeEvent * ) | |||
44 | bool SecOwnerDlg::eventFilter(QObject *o, QEvent *e) | 46 | bool SecOwnerDlg::eventFilter(QObject *o, QEvent *e) |
45 | { | 47 | { |
46 | if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) { | 48 | if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) { |
47 | accept(); | 49 | accept(); |
48 | return TRUE; | 50 | return TRUE; |
49 | } | 51 | } |
50 | return QWidget::eventFilter(o, e); | 52 | return QWidget::eventFilter(o, e); |
51 | } | 53 | } |
52 | 54 | ||
53 | void SecOwnerDlg::mousePressEvent( QMouseEvent * ) { accept(); } | 55 | void SecOwnerDlg::mousePressEvent( QMouseEvent * ) { accept(); } |
54 | 56 | ||
55 | 57 | ||
58 | namespace Internal { | ||
56 | /// run plugins until we reach nbSuccessMin successes | 59 | /// run plugins until we reach nbSuccessMin successes |
57 | int runPlugins() { | 60 | int runPlugins() { |
58 | 61 | ||
59 | SecOwnerDlg *oi = 0; | 62 | SecOwnerDlg *oi = 0; |
60 | // see if there is contact information. | 63 | // see if there is contact information. |
61 | QString vfilename = Global::applicationFileName("addressbook", | 64 | QString vfilename = Global::applicationFileName("addressbook", |
62 | "businesscard.vcf"); | 65 | "businesscard.vcf"); |
63 | if (QFile::exists(vfilename)) { | 66 | if (QFile::exists(vfilename)) { |
64 | Contact c; | 67 | Contact c; |
65 | c = Contact::readVCard( vfilename )[0]; | 68 | c = Contact::readVCard( vfilename )[0]; |
66 | 69 | ||
67 | oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE); | 70 | oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE); |
@@ -168,12 +171,16 @@ int runPlugins() { | |||
168 | if(oi) delete oi; | 171 | if(oi) delete oi; |
169 | // we have reached the required number of successes, we can exit the plugin loop | 172 | // we have reached the required number of successes, we can exit the plugin loop |
170 | return 0; | 173 | return 0; |
171 | } | 174 | } |
172 | } else { | 175 | } else { |
173 | owarn << "Could not recognize plugin " << QString( path + "/" + *libIt ) << oendl; | 176 | owarn << "Could not recognize plugin " << QString( path + "/" + *libIt ) << oendl; |
174 | delete lib; | 177 | delete lib; |
175 | } // end if plugin recognized | 178 | } // end if plugin recognized |
176 | } //end for | 179 | } //end for |
177 | if(oi) delete oi; | 180 | if(oi) delete oi; |
178 | return 1; | 181 | return 1; |
179 | } | 182 | } |
183 | |||
184 | } | ||
185 | } | ||
186 | } | ||