-rw-r--r-- | library/password.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/library/password.cpp b/library/password.cpp index 6d126c4..25fb1b8 100644 --- a/library/password.cpp +++ b/library/password.cpp | |||
@@ -81,7 +81,7 @@ PasswordDialog::PasswordDialog( QWidget* parent, const char* name, WFlags fl ) | |||
81 | f.setPointSize( 12 ); | 81 | f.setPointSize( 12 ); |
82 | prompt->setFont( f ); | 82 | prompt->setFont( f ); |
83 | } | 83 | } |
84 | 84 | ||
85 | button_0->installEventFilter( this ); | 85 | button_0->installEventFilter( this ); |
86 | button_1->installEventFilter( this ); | 86 | button_1->installEventFilter( this ); |
87 | button_2->installEventFilter( this ); | 87 | button_2->installEventFilter( this ); |
@@ -216,12 +216,13 @@ public: | |||
216 | 216 | ||
217 | class OwnerDlg : public QDialog | 217 | class OwnerDlg : public QDialog |
218 | { | 218 | { |
219 | Q_OBJECT | ||
219 | public: | 220 | public: |
220 | 221 | ||
221 | OwnerDlg( QWidget *parent, const char * name, Contact c, | 222 | OwnerDlg( QWidget *parent, const char * name, Contact c, |
222 | bool modal, bool fullscreen = FALSE ) | 223 | bool modal, bool fullscreen = FALSE ) |
223 | : QDialog( parent, name, modal, | 224 | : QDialog( parent, name, modal, |
224 | fullscreen ? | 225 | fullscreen ? |
225 | WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ) | 226 | WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ) |
226 | { | 227 | { |
227 | if ( fullscreen ) { | 228 | if ( fullscreen ) { |
@@ -242,7 +243,7 @@ public: | |||
242 | { | 243 | { |
243 | tv->resize( size() ); | 244 | tv->resize( size() ); |
244 | } | 245 | } |
245 | 246 | ||
246 | bool eventFilter(QObject *o, QEvent *e) | 247 | bool eventFilter(QObject *o, QEvent *e) |
247 | { | 248 | { |
248 | if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) { | 249 | if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) { |
@@ -289,7 +290,7 @@ QString Password::getPassword( const QString& prompt ) | |||
289 | 290 | ||
290 | If \a at_poweron is TRUE, the dialog is only used if the user's | 291 | If \a at_poweron is TRUE, the dialog is only used if the user's |
291 | preference request it at poweron | 292 | preference request it at poweron |
292 | 293 | ||
293 | Opie extension to speed up suspend/resume. | 294 | Opie extension to speed up suspend/resume. |
294 | */ | 295 | */ |
295 | 296 | ||
@@ -298,7 +299,7 @@ bool Password::needToAuthenticate(bool at_poweron) | |||
298 | Config cfg("Security"); | 299 | Config cfg("Security"); |
299 | cfg.setGroup("Passcode"); | 300 | cfg.setGroup("Passcode"); |
300 | QString passcode = cfg.readEntry("passcode"); | 301 | QString passcode = cfg.readEntry("passcode"); |
301 | 302 | ||
302 | return ( !passcode.isEmpty() | 303 | return ( !passcode.isEmpty() |
303 | && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) ); | 304 | && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) ); |
304 | } | 305 | } |
@@ -324,7 +325,7 @@ void Password::authenticate(bool at_poweron) | |||
324 | 325 | ||
325 | // see if there is contact information. | 326 | // see if there is contact information. |
326 | OwnerDlg *oi = 0; | 327 | OwnerDlg *oi = 0; |
327 | QString vfilename = Global::applicationFileName("addressbook", | 328 | QString vfilename = Global::applicationFileName("addressbook", |
328 | "businesscard.vcf"); | 329 | "businesscard.vcf"); |
329 | if (QFile::exists(vfilename)) { | 330 | if (QFile::exists(vfilename)) { |
330 | Contact c; | 331 | Contact c; |