author | mickeyl <mickeyl> | 2005-01-23 21:35:29 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-23 21:35:29 (UTC) |
commit | dd410f1eb69e68f04cf26b6d3e6bca88f0987f71 (patch) (unidiff) | |
tree | 0f2b59bae4c326011783e9cdea0754e180ae0e27 /core/launcher/main.cpp | |
parent | 78e658cecc7521cf3932f5eb44d3f551d73f3181 (diff) | |
download | opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.zip opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.gz opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.bz2 |
remove setSoftSuspend() from ODevice. this is a left-over from the old days
-rw-r--r-- | core/launcher/main.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 734d072..5bbed59 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -137,89 +137,82 @@ static bool firstUse() | |||
137 | FirstUse *fu = new FirstUse(); | 137 | FirstUse *fu = new FirstUse(); |
138 | fu->exec(); | 138 | fu->exec(); |
139 | bool rs = fu->restartNeeded(); | 139 | bool rs = fu->restartNeeded(); |
140 | delete fu; | 140 | delete fu; |
141 | return rs; | 141 | return rs; |
142 | } | 142 | } |
143 | 143 | ||
144 | int initApplication( int argc, char ** argv ) | 144 | int initApplication( int argc, char ** argv ) |
145 | { | 145 | { |
146 | cleanup(); | 146 | cleanup(); |
147 | initEnvironment(); | 147 | initEnvironment(); |
148 | 148 | ||
149 | #ifdef QWS | 149 | #ifdef QWS |
150 | QWSServer::setDesktopBackground( QImage() ); | 150 | QWSServer::setDesktopBackground( QImage() ); |
151 | #endif | 151 | #endif |
152 | ServerApplication a( argc, argv, QApplication::GuiServer ); | 152 | ServerApplication a( argc, argv, QApplication::GuiServer ); |
153 | initKeyboard(); | 153 | initKeyboard(); |
154 | 154 | ||
155 | if ( firstUse() ) | 155 | if ( firstUse() ) |
156 | { | 156 | { |
157 | a.restart(); | 157 | a.restart(); |
158 | return 0; | 158 | return 0; |
159 | } | 159 | } |
160 | 160 | ||
161 | #ifndef Q_OS_MACX | ||
162 | ODevice::inst()->setSoftSuspend( true ); | ||
163 | #endif | ||
164 | { | 161 | { |
165 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); | 162 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); |
166 | e << -3; // Forced on | 163 | e << -3; // Forced on |
167 | } | 164 | } |
168 | 165 | ||
169 | AlarmServer::initialize(); | 166 | AlarmServer::initialize(); |
170 | Server *s = new Server(); | 167 | Server *s = new Server(); |
171 | new SysFileMonitor(s); | 168 | new SysFileMonitor(s); |
172 | #ifdef QWS | 169 | #ifdef QWS |
173 | Network::createServer(s); | 170 | Network::createServer(s); |
174 | #endif | 171 | #endif |
175 | s->show(); | 172 | s->show(); |
176 | 173 | ||
177 | #if 0 | 174 | #if 0 |
178 | if ( QDate::currentDate().year() < 2005 ) | 175 | if ( QDate::currentDate().year() < 2005 ) |
179 | { | 176 | { |
180 | if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), | 177 | if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), |
181 | ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ) | 178 | ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ) |
182 | .arg( TimeString::dateString( QDate::currentDate())), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 179 | .arg( TimeString::dateString( QDate::currentDate())), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
183 | { | 180 | { |
184 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); | 181 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); |
185 | e << QString ( ); | 182 | e << QString ( ); |
186 | } | 183 | } |
187 | } | 184 | } |
188 | #endif | 185 | #endif |
189 | 186 | ||
190 | create_pidfile(); | 187 | create_pidfile(); |
191 | odebug << "--> mainloop in" << oendl; | 188 | odebug << "--> mainloop in" << oendl; |
192 | int rv = a.exec(); | 189 | int rv = a.exec(); |
193 | odebug << "<-- mainloop out" << oendl; | 190 | odebug << "<-- mainloop out" << oendl; |
194 | remove_pidfile(); | 191 | remove_pidfile(); |
195 | odebug << "removing server object..." << oendl; | 192 | odebug << "removing server object..." << oendl; |
196 | delete s; | 193 | delete s; |
197 | 194 | ||
198 | #ifndef Q_OS_MACX | ||
199 | ODevice::inst()->setSoftSuspend( false ); | ||
200 | #endif | ||
201 | |||
202 | odebug << "returning from qpe/initapplication..." << oendl; | 195 | odebug << "returning from qpe/initapplication..." << oendl; |
203 | return rv; | 196 | return rv; |
204 | } | 197 | } |
205 | 198 | ||
206 | static const char *pidfile_path = "/var/run/opie.pid"; | 199 | static const char *pidfile_path = "/var/run/opie.pid"; |
207 | 200 | ||
208 | void create_pidfile() | 201 | void create_pidfile() |
209 | { | 202 | { |
210 | FILE *f; | 203 | FILE *f; |
211 | 204 | ||
212 | if (( f = ::fopen( pidfile_path, "w" ))) { | 205 | if (( f = ::fopen( pidfile_path, "w" ))) { |
213 | ::fprintf( f, "%d", getpid ( )); | 206 | ::fprintf( f, "%d", getpid ( )); |
214 | ::fclose( f ); | 207 | ::fclose( f ); |
215 | } | 208 | } |
216 | else | 209 | else |
217 | { | 210 | { |
218 | odebug << "couldn't create pidfile: " << strerror( errno ) << oendl; | 211 | odebug << "couldn't create pidfile: " << strerror( errno ) << oendl; |
219 | } | 212 | } |
220 | } | 213 | } |
221 | 214 | ||
222 | void remove_pidfile() | 215 | void remove_pidfile() |
223 | { | 216 | { |
224 | ::unlink( pidfile_path ); | 217 | ::unlink( pidfile_path ); |
225 | } | 218 | } |