-rw-r--r-- | core/opie-login/main.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 8f795e3..579a93a 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp @@ -45,4 +45,5 @@ #include <qpe/qpestyle.h> #include <qpe/power.h> +#include <qpe/config.h> #include <opie/odevice.h> @@ -165,4 +166,13 @@ int main ( int argc, char **argv ) } else { + if ( !autolog ) { + Config cfg ( "opie-login" ); + cfg. setGroup ( "General" ); + QString user = cfg. readEntry ( "AutoLogin" ); + + if ( !user. isEmpty ( )) + autolog = ::strdup ( user. latin1 ( )); + } + if ( autolog ) { LoginApplication::setLoginAs ( autolog ); @@ -173,5 +183,5 @@ int main ( int argc, char **argv ) ::exit ( 0 ); } - else + else ::exit ( login_main ( argc, argv )); } |