summaryrefslogtreecommitdiff
authoralwin <alwin>2004-03-02 19:39:28 (UTC)
committer alwin <alwin>2004-03-02 19:39:28 (UTC)
commit65497ae2d9fa41173930748dc104d00706268c41 (patch) (unidiff)
tree0f45ddf8339245f95f788885ad3378f63dc71963
parentdb1615def104b2637d9404ac0f1e3790a8d7731f (diff)
downloadopie-65497ae2d9fa41173930748dc104d00706268c41.zip
opie-65497ae2d9fa41173930748dc104d00706268c41.tar.gz
opie-65497ae2d9fa41173930748dc104d00706268c41.tar.bz2
fix so it will compile with gcc2 toolchain
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 8d0976f..6aa7287 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -143,49 +143,50 @@ int main ( int argc, char **argv )
143 } 143 }
144 144
145 if ( WIFSIGNALED( status )) { 145 if ( WIFSIGNALED( status )) {
146 switch ( WTERMSIG( status )) { 146 switch ( WTERMSIG( status )) {
147 case SIGTERM: 147 case SIGTERM:
148 case SIGINT : 148 case SIGINT :
149 case SIGKILL: 149 case SIGKILL:
150 break; 150 break;
151 151
152 default : 152 default :
153 killedbysig = WTERMSIG( status ); 153 killedbysig = WTERMSIG( status );
154 break; 154 break;
155 } 155 }
156 } 156 }
157 if ( killedbysig ) { // qpe was killed by an uncaught signal 157 if ( killedbysig ) { // qpe was killed by an uncaught signal
158 qApp = 0; 158 qApp = 0;
159 159
160 ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig ); 160 ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig );
161 161
162 QWSServer::setDesktopBackground ( QImage ( )); 162 QWSServer::setDesktopBackground ( QImage ( ));
163 QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer ); 163 QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer );
164 app-> setFont ( QFont ( "Helvetica", 10 )); 164 app-> setFont ( QFont ( "Helvetica", 10 ));
165 app-> setStyle ( new QPEStyle ( )); 165 app-> setStyle ( new QPEStyle ( ));
166 166
167 const char *sig = ::strsignal ( killedbysig ); 167 // const char *sig = ::strsignal ( killedbysig );
168 const char *sig = ::sys_siglist[killedbysig];
168 QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool ); 169 QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
169 l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig )); 170 l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig ));
170 l-> setAlignment ( Qt::AlignCenter ); 171 l-> setAlignment ( Qt::AlignCenter );
171 l-> move ( 0, 0 ); 172 l-> move ( 0, 0 );
172 l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); 173 l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
173 l-> show ( ); 174 l-> show ( );
174 QTimer::singleShot ( 3000, app, SLOT( quit())); 175 QTimer::singleShot ( 3000, app, SLOT( quit()));
175 app-> exec ( ); 176 app-> exec ( );
176 delete app; 177 delete app;
177 qApp = 0; 178 qApp = 0;
178 } 179 }
179 } 180 }
180 else { 181 else {
181 if ( !autolog ) { 182 if ( !autolog ) {
182 QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf"; 183 QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf";
183 Config cfg ( confFile, Config::File ); 184 Config cfg ( confFile, Config::File );
184 cfg. setGroup ( "General" ); 185 cfg. setGroup ( "General" );
185 QString user = cfg. readEntry ( "AutoLogin" ); 186 QString user = cfg. readEntry ( "AutoLogin" );
186 187
187 if ( !user. isEmpty ( )) 188 if ( !user. isEmpty ( ))
188 autolog = ::strdup ( user. latin1 ( )); 189 autolog = ::strdup ( user. latin1 ( ));
189 } 190 }
190 191
191 if ( autolog && !userExited ) { 192 if ( autolog && !userExited ) {