summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp12
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
@@ -43,8 +43,9 @@
43#include <qpe/qpeapplication.h> 43#include <qpe/qpeapplication.h>
44#include <qpe/qcopenvelope_qws.h> 44#include <qpe/qcopenvelope_qws.h>
45#include <qpe/qpestyle.h> 45#include <qpe/qpestyle.h>
46#include <qpe/power.h> 46#include <qpe/power.h>
47#include <qpe/config.h>
47 48
48#include <opie/odevice.h> 49#include <opie/odevice.h>
49 50
50#include <qwindowsystem_qws.h> 51#include <qwindowsystem_qws.h>
@@ -163,17 +164,26 @@ int main ( int argc, char **argv )
163 qApp = 0; 164 qApp = 0;
164 } 165 }
165 } 166 }
166 else { 167 else {
168 if ( !autolog ) {
169 Config cfg ( "opie-login" );
170 cfg. setGroup ( "General" );
171 QString user = cfg. readEntry ( "AutoLogin" );
172
173 if ( !user. isEmpty ( ))
174 autolog = ::strdup ( user. latin1 ( ));
175 }
176
167 if ( autolog ) { 177 if ( autolog ) {
168 LoginApplication::setLoginAs ( autolog ); 178 LoginApplication::setLoginAs ( autolog );
169 179
170 if ( LoginApplication::changeIdentity ( )) 180 if ( LoginApplication::changeIdentity ( ))
171 ::exit ( LoginApplication::login ( )); 181 ::exit ( LoginApplication::login ( ));
172 else 182 else
173 ::exit ( 0 ); 183 ::exit ( 0 );
174 } 184 }
175 else 185 else
176 ::exit ( login_main ( argc, argv )); 186 ::exit ( login_main ( argc, argv ));
177 } 187 }
178 } 188 }
179 return 0; 189 return 0;