Diffstat (limited to 'libopie2/opiesecurity/multiauthmainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiesecurity/multiauthmainwindow.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie2/opiesecurity/multiauthmainwindow.cpp b/libopie2/opiesecurity/multiauthmainwindow.cpp index 2be3473..c6229c7 100644 --- a/libopie2/opiesecurity/multiauthmainwindow.cpp +++ b/libopie2/opiesecurity/multiauthmainwindow.cpp | |||
@@ -1,17 +1,20 @@ | |||
1 | #include "multiauthmainwindow.h" | 1 | #include "multiauthmainwindow.h" |
2 | 2 | ||
3 | #include "multiauthcommon.h" | 3 | #include "multiauthcommon.h" |
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | 5 | ||
6 | namespace Opie { | ||
7 | namespace Security { | ||
8 | |||
6 | /// Initializes widgets according to allowBypass and explanScreens config | 9 | /// Initializes widgets according to allowBypass and explanScreens config |
7 | MultiauthMainWindow::MultiauthMainWindow() | 10 | MultiauthMainWindow::MultiauthMainWindow() |
8 | : QDialog(0, "main Opie multiauth modal dialog", TRUE, | 11 | : QDialog(0, "main Opie multiauth modal dialog", TRUE, |
9 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop) | 12 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop) |
10 | 13 | ||
11 | { | 14 | { |
12 | alreadyDone = false; | 15 | alreadyDone = false; |
13 | // initializes widget pointers which not always point to an object | 16 | // initializes widget pointers which not always point to an object |
14 | quit = 0; | 17 | quit = 0; |
15 | message2 = 0; | 18 | message2 = 0; |
16 | 19 | ||
17 | Config *pcfg = new Config("Security"); | 20 | Config *pcfg = new Config("Security"); |
@@ -66,25 +69,25 @@ MultiauthMainWindow::MultiauthMainWindow() | |||
66 | proceedButton->hide(); | 69 | proceedButton->hide(); |
67 | // let's proceed now | 70 | // let's proceed now |
68 | proceed(); | 71 | proceed(); |
69 | } | 72 | } |
70 | } | 73 | } |
71 | 74 | ||
72 | /// nothing to do | 75 | /// nothing to do |
73 | MultiauthMainWindow::~MultiauthMainWindow() { | 76 | MultiauthMainWindow::~MultiauthMainWindow() { |
74 | } | 77 | } |
75 | 78 | ||
76 | /// launch the authentication | 79 | /// launch the authentication |
77 | void MultiauthMainWindow::proceed() { | 80 | void MultiauthMainWindow::proceed() { |
78 | int result = runPlugins(); | 81 | int result = Internal::runPlugins(); |
79 | 82 | ||
80 | 83 | ||
81 | if ( (result == 0) && !explanScreens ) | 84 | if ( (result == 0) && !explanScreens ) |
82 | { | 85 | { |
83 | // the authentication has succeeded, we can exit directly | 86 | // the authentication has succeeded, we can exit directly |
84 | // this will work if we haven't been called by the constructor of MultiauthMainWindow | 87 | // this will work if we haven't been called by the constructor of MultiauthMainWindow |
85 | close(); | 88 | close(); |
86 | // and if we've been called by this constructor, we use this variable to tell our | 89 | // and if we've been called by this constructor, we use this variable to tell our |
87 | // caller we're already done | 90 | // caller we're already done |
88 | alreadyDone = true; | 91 | alreadyDone = true; |
89 | return; | 92 | return; |
90 | } | 93 | } |
@@ -118,12 +121,15 @@ void MultiauthMainWindow::proceed() { | |||
118 | } | 121 | } |
119 | } | 122 | } |
120 | } | 123 | } |
121 | 124 | ||
122 | /** When we don't show explanatory screens and we succeed authentication, | 125 | /** When we don't show explanatory screens and we succeed authentication, |
123 | * as early as during the proceed() call of the constructor, the caller must know | 126 | * as early as during the proceed() call of the constructor, the caller must know |
124 | * (through this function) authentication has already been succeeded.. | 127 | * (through this function) authentication has already been succeeded.. |
125 | * \todo try to avoid this hack? | 128 | * \todo try to avoid this hack? |
126 | */ | 129 | */ |
127 | bool MultiauthMainWindow::isAlreadyDone() { | 130 | bool MultiauthMainWindow::isAlreadyDone() { |
128 | return alreadyDone; | 131 | return alreadyDone; |
129 | } | 132 | } |
133 | |||
134 | } | ||
135 | } | ||