summaryrefslogtreecommitdiff
authorzecke <zecke>2004-07-17 20:33:12 (UTC)
committer zecke <zecke>2004-07-17 20:33:12 (UTC)
commitbe9bc01f6cec2a5a2316cfc8d4cbc0e0310141d6 (patch) (unidiff)
tree14ec7c67ecab948642faa630cc5b3442c85cbe04
parent872d24ff104d9ea9a7ea8ef68c8b3f98531ed677 (diff)
downloadopie-be9bc01f6cec2a5a2316cfc8d4cbc0e0310141d6.zip
opie-be9bc01f6cec2a5a2316cfc8d4cbc0e0310141d6.tar.gz
opie-be9bc01f6cec2a5a2316cfc8d4cbc0e0310141d6.tar.bz2
Use the MultiauthPassword::authenticate method instead of the handcrafting
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/demo/main.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/core/settings/security/demo/main.cpp b/core/settings/security/demo/main.cpp
index 4ae76e4..df91250 100644
--- a/core/settings/security/demo/main.cpp
+++ b/core/settings/security/demo/main.cpp
@@ -1,34 +1,23 @@
1#include <opie2/multiauthmainwindow.h> 1#include <opie2/multiauthmainwindow.h>
2#include <opie2/multiauthcommon.h> 2#include <opie2/multiauthcommon.h>
3 3
4#include <opie2/oapplication.h> 4#include <opie2/oapplication.h>
5 5
6/// main() function of the opie-multiauth-standalone demonstration application 6/// main() function of the opie-multiauth-standalone demonstration application
7/** 7/**
8 * Calls each plugin one after the other, and asks them to perform one authentication. 8 * Calls each plugin one after the other, and asks them to perform one authentication.
9 * It loads the plugins one after another through the MultiauthPluginInterface, 9 * It loads the plugins one after another through the MultiauthPluginInterface,
10 * then calls MultiauthPluginObject::authenticate(). 10 * then calls MultiauthPluginObject::authenticate().
11 * \em Note: calls are not parsed by doxygen since they are done via a QInterfacePtr: 11 * \em Note: calls are not parsed by doxygen since they are done via a QInterfacePtr:
12 * \see http://dudu.dyn.2-h.org/nist/doxydoc/allOpie//classQInterfacePtr.html 12 * \see http://dudu.dyn.2-h.org/nist/doxydoc/allOpie//classQInterfacePtr.html
13 */ 13 */
14int main( int argc, char ** argv ) 14int main( int argc, char ** argv )
15{ 15{
16 Opie::Core::OApplication app(argc, argv, "Multi-authentication demo"); 16 Opie::Core::OApplication app(argc, argv, "Multi-authentication demo");
17 17
18 /* Constructs the main window, which displays messages and blocks 18 /*
19 * access to the desktop 19 * Run authentication and retursn if successfull
20 * This uses the global settings
20 */ 21 */
21 Opie::Security::MultiauthMainWindow win; 22 Opie::Security::MultiauthPassword::authenticate();
22
23 app.showMainWidget(&win);
24
25 // resize the QDialog object so it fills all the screen
26 QRect desk = qApp->desktop()->geometry();
27 win.setGeometry( 0, 0, desk.width(), desk.height() );
28
29 // the authentication has already succeeded (without win interactions)
30 if ( win.isAlreadyDone() )
31 return 0;
32
33 return app.exec();
34} 23}