summaryrefslogtreecommitdiff
path: root/library/password.cpp
Unidiff
Diffstat (limited to 'library/password.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/password.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/library/password.cpp b/library/password.cpp
index 4b22b65..6d126c4 100644
--- a/library/password.cpp
+++ b/library/password.cpp
@@ -28,5 +28,5 @@
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qwindowsystem_qws.h> 30//#include <qwindowsystem_qws.h>
31 31
32#include <qdialog.h> 32#include <qdialog.h>
@@ -286,4 +286,23 @@ QString Password::getPassword( const QString& prompt )
286 286
287/*! 287/*!
288 Return if a prompt for the user's passcode is needed.
289
290 If \a at_poweron is TRUE, the dialog is only used if the user's
291 preference request it at poweron
292
293 Opie extension to speed up suspend/resume.
294*/
295
296bool Password::needToAuthenticate(bool at_poweron)
297{
298 Config cfg("Security");
299 cfg.setGroup("Passcode");
300 QString passcode = cfg.readEntry("passcode");
301
302 return ( !passcode.isEmpty()
303 && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) );
304}
305
306/*!
288 Prompt, fullscreen, for the user's passcode until they get it right. 307 Prompt, fullscreen, for the user's passcode until they get it right.
289 308
@@ -325,5 +344,6 @@ void Password::authenticate(bool at_poweron)
325 } else if ( at_poweron ) { 344 } else if ( at_poweron ) {
326 // refresh screen #### should probably be in caller 345 // refresh screen #### should probably be in caller
327 // Not needed (we took away the screen blacking) 346 // Not needed (we took away the screen blacking) TT
347 // Not needed (we have intelligent screen blacking) sandman
328 //if ( qwsServer ) 348 //if ( qwsServer )
329 //qwsServer->refresh(); 349 //qwsServer->refresh();