summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
committer mickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
commit4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (unidiff)
tree59b4879b1065086c9a2e28f16f7d48540c8a9456
parent8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff)
downloadopie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2
use Opie debugging framework
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/applauncher.cpp83
-rw-r--r--core/launcher/documentlist.cpp46
-rw-r--r--core/launcher/firstuse.cpp44
-rw-r--r--core/launcher/inputmethods.cpp34
-rw-r--r--core/launcher/irserver.cpp16
-rw-r--r--core/launcher/launcher.cpp37
-rw-r--r--core/launcher/launcherview.cpp9
-rw-r--r--core/launcher/main.cpp42
-rw-r--r--core/launcher/packageslave.cpp26
-rw-r--r--core/launcher/qcopbridge.cpp23
-rw-r--r--core/launcher/qprocess.cpp14
-rw-r--r--core/launcher/qprocess_unix.cpp93
-rw-r--r--core/launcher/runningappbar.cpp24
-rw-r--r--core/launcher/screensaver.cpp2
-rw-r--r--core/launcher/server.cpp32
-rw-r--r--core/launcher/serverapp.cpp26
-rw-r--r--core/launcher/suspendmonitor.cpp2
-rw-r--r--core/launcher/systray.cpp18
-rw-r--r--core/launcher/taskbar.cpp7
-rw-r--r--core/launcher/transferserver.cpp107
20 files changed, 334 insertions, 351 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp
index 5a5517c..7000346 100644
--- a/core/launcher/applauncher.cpp
+++ b/core/launcher/applauncher.cpp
@@ -28,7 +28,22 @@
28#define QTOPIA_PROGRAM_MONITOR 28#define QTOPIA_PROGRAM_MONITOR
29#endif 29#endif
30
31#include "applauncher.h"
32#include "documentlist.h"
33
34/* OPIE */
35#include <opie2/odebug.h>
30#include <opie2/oglobal.h> 36#include <opie2/oglobal.h>
37#include <qtopia/qcopenvelope_qws.h>
38#include <qtopia/qpeapplication.h>
39using namespace Opie::Core;
31 40
32#ifndef Q_OS_WIN32 41/* QT */
42#include <qtimer.h>
43#include <qwindowsystem_qws.h>
44#include <qmessagebox.h>
45#include <qfileinfo.h>
46
47/* STD */
33#include <sys/stat.h> 48#include <sys/stat.h>
34#include <sys/wait.h> 49#include <sys/wait.h>
@@ -38,26 +53,8 @@
38#include <sys/resource.h> 53#include <sys/resource.h>
39#include <errno.h> 54#include <errno.h>
40#else
41#include <process.h>
42#include <windows.h>
43#include <winbase.h>
44#endif
45
46#include <signal.h> 55#include <signal.h>
47#include <sys/types.h> 56#include <sys/types.h>
48#include <stdlib.h> 57#include <stdlib.h>
49 58
50#include <qtimer.h>
51#include <qwindowsystem_qws.h>
52#include <qmessagebox.h>
53#include <qfileinfo.h>
54
55#include <qtopia/qcopenvelope_qws.h>
56#include <qtopia/qpeapplication.h>
57
58#include "applauncher.h"
59#include "documentlist.h"
60
61using namespace Opie::Core;
62const int AppLauncher::RAISE_TIMEOUT_MS = 5000; 59const int AppLauncher::RAISE_TIMEOUT_MS = 5000;
63 60
@@ -128,5 +125,5 @@ AppLauncher::~AppLauncher()
128void AppLauncher::newQcopChannel(const QString& channelName) 125void AppLauncher::newQcopChannel(const QString& channelName)
129{ 126{
130// qDebug("channel %s added", channelName.data() ); 127// odebug << "channel " << channelName.data() << " added" << oendl;
131 QString prefix("QPE/Application/"); 128 QString prefix("QPE/Application/");
132 if (channelName.startsWith(prefix)) { 129 if (channelName.startsWith(prefix)) {
@@ -142,5 +139,5 @@ void AppLauncher::newQcopChannel(const QString& channelName)
142 } 139 }
143 } else if (channelName.startsWith("QPE/QuickLauncher-")) { 140 } else if (channelName.startsWith("QPE/QuickLauncher-")) {
144 qDebug("Registered %s", channelName.latin1()); 141 odebug << "Registered " << channelName << "" << oendl;
145 int pid = channelName.mid(18).toInt(); 142 int pid = channelName.mid(18).toInt();
146 if (pid == qlPid) 143 if (pid == qlPid)
@@ -181,5 +178,5 @@ void AppLauncher::received(const QCString& msg, const QByteArray& data)
181 if ( !executeBuiltin( appName, QString::null ) ) { 178 if ( !executeBuiltin( appName, QString::null ) ) {
182 if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) { 179 if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) {
183 //qDebug( "Raising: %s", appName.latin1() ); 180 //odebug << "Raising: " << appName << "" << oendl;
184 QCString channel = "QPE/Application/"; 181 QCString channel = "QPE/Application/";
185 channel += appName.latin1(); 182 channel += appName.latin1();
@@ -218,5 +215,5 @@ void AppLauncher::received(const QCString& msg, const QByteArray& data)
218 QString appName; 215 QString appName;
219 stream >> appName; 216 stream >> appName;
220 qDebug("Got a heartbeat from %s", appName.latin1()); 217 odebug << "Got a heartbeat from " << appName << "" << oendl;
221 QMap<QString,int>::Iterator it = waitingHeartbeat.find(appName); 218 QMap<QString,int>::Iterator it = waitingHeartbeat.find(appName);
222 if ( it != waitingHeartbeat.end() ) { 219 if ( it != waitingHeartbeat.end() ) {
@@ -241,10 +238,10 @@ void AppLauncher::signalHandler(int)
241 pid_t pid = waitpid(-1, &status, WNOHANG); 238 pid_t pid = waitpid(-1, &status, WNOHANG);
242/* if (pid == 0 || &status == 0 ) { 239/* if (pid == 0 || &status == 0 ) {
243 qDebug("hmm, could not get return value from signal"); 240 odebug << "hmm, could not get return value from signal" << oendl;
244 } 241 }
245*/ 242*/
246 QApplication::postEvent(appLauncherPtr, new AppStoppedEvent(pid, status) ); 243 QApplication::postEvent(appLauncherPtr, new AppStoppedEvent(pid, status) );
247#else 244#else
248 qDebug("Unhandled signal see by AppLauncher::signalHandler(int)"); 245 odebug << "Unhandled signal see by AppLauncher::signalHandler(int)" << oendl;
249#endif 246#endif
250} 247}
@@ -274,5 +271,5 @@ void AppLauncher::timerEvent( QTimerEvent *e )
274 waitingHeartbeat.remove( it ); 271 waitingHeartbeat.remove( it );
275 272
276 // qDebug("Checking in on %s", appKillerName.latin1()); 273 // odebug << "Checking in on " << appKillerName << "" << oendl;
277 274
278 // We store this incase the application responds while we're 275 // We store this incase the application responds while we're
@@ -285,5 +282,5 @@ void AppLauncher::timerEvent( QTimerEvent *e )
285 QMessageBox::NoButton); 282 QMessageBox::NoButton);
286 if (appKillerBox->exec() == QMessageBox::Yes) { 283 if (appKillerBox->exec() == QMessageBox::Yes) {
287 // qDebug("Killing the app!!! Bwuhahahaha!"); 284 // odebug << "Killing the app!!! Bwuhahahaha!" << oendl;
288 int pid = pidForName(appKillerName); 285 int pid = pidForName(appKillerName);
289 if ( pid > 0 ) 286 if ( pid > 0 )
@@ -316,5 +313,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
316 if ( it == runningApps.end() ) { 313 if ( it == runningApps.end() ) {
317 if ( sigPid == qlPid ) { 314 if ( sigPid == qlPid ) {
318 qDebug( "quicklauncher stopped" ); 315 odebug << "quicklauncher stopped" << oendl;
319 qlPid = 0; 316 qlPid = 0;
320 qlReady = FALSE; 317 qlReady = FALSE;
@@ -324,7 +321,7 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
324/* 321/*
325 if ( sigPid == -1 ) 322 if ( sigPid == -1 )
326 qDebug("non-qtopia application exited (disregarded)"); 323 odebug << "non-qtopia application exited (disregarded)" << oendl;
327 else 324 else
328 qDebug("==== no pid matching %d in list, definite bug", sigPid); 325 odebug << "==== no pid matching " << sigPid << " in list, definite bug" << oendl;
329*/ 326*/
330 return; 327 return;
@@ -370,5 +367,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
370 // debug info 367 // debug info
371 for (it = runningApps.begin(); it != runningApps.end(); ++it) { 368 for (it = runningApps.begin(); it != runningApps.end(); ++it) {
372 qDebug("running according to internal list: %s, with pid %d", (*it).data(), it.key() ); 369 odebug << "running according to internal list: " << (*it).data() << ", with pid " << it.key() << "" << oendl;
373 } 370 }
374*/ 371*/
@@ -404,5 +401,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
404 if ( fi.exists() && fi.size() ) { 401 if ( fi.exists() && fi.size() ) {
405 emit terminated(sigPid, appName); 402 emit terminated(sigPid, appName);
406 qWarning("Re executing obmitted for %s", appName.latin1() ); 403 owarn << "Re executing obmitted for " << appName << "" << oendl;
407 // execute( appName, QString::null ); 404 // execute( appName, QString::null );
408 return; 405 return;
@@ -418,5 +415,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
418void AppLauncher::sigStopped(int sigPid, int sigStatus) 415void AppLauncher::sigStopped(int sigPid, int sigStatus)
419{ 416{
420 qDebug("Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)"); 417 odebug << "Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)" << oendl;
421} 418}
422#endif // Q_OS_WIN32 419#endif // Q_OS_WIN32
@@ -429,5 +426,5 @@ bool AppLauncher::isRunning(const QString &app)
429 pid_t t = ::__getpgid( it.key() ); 426 pid_t t = ::__getpgid( it.key() );
430 if ( t == -1 ) { 427 if ( t == -1 ) {
431 qDebug("appLauncher bug, %s believed running, but pid %d is not existing", app.data(), it.key() ); 428 odebug << "appLauncher bug, " << app.data() << " believed running, but pid " << it.key() << " is not existing" << oendl;
432 runningApps.remove( it.key() ); 429 runningApps.remove( it.key() );
433 return FALSE; 430 return FALSE;
@@ -482,5 +479,5 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
482bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise) 479bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise)
483{ 480{
484 qWarning("AppLauncher::execute '%s' '%s'", (const char*) c, (const char*) docParam ); 481 owarn << "AppLauncher::execute '" << c << "' '" << docParam << "'" << oendl;
485 // Convert the command line in to a list of arguments 482 // Convert the command line in to a list of arguments
486 QStringList list = QStringList::split(QRegExp(" *"),c); 483 QStringList list = QStringList::split(QRegExp(" *"),c);
@@ -549,5 +546,5 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
549 if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) { 546 if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) {
550#endif /* Q_OS_MACX */ 547#endif /* Q_OS_MACX */
551 qDebug( "Quick launching: %s", args[0] ); 548 odebug << "Quick launching: " << args[0] << "" << oendl;
552 if ( getuid() == 0 ) 549 if ( getuid() == 0 )
553 setpriority( PRIO_PROCESS, qlPid, 0 ); 550 setpriority( PRIO_PROCESS, qlPid, 0 );
@@ -585,5 +582,5 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
585 connect(proc, SIGNAL(processExited()), this, SLOT(processExited())); 582 connect(proc, SIGNAL(processExited()), this, SLOT(processExited()));
586 if (!proc->start()){ 583 if (!proc->start()){
587 qDebug("Unable to start application %s", args[0]); 584 odebug << "Unable to start application " << args[0] << "" << oendl;
588 }else{ 585 }else{
589 PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier(); 586 PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier();
@@ -595,9 +592,9 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
595 QCopEnvelope e("QPE/System", "busy()"); 592 QCopEnvelope e("QPE/System", "busy()");
596 }else{ 593 }else{
597 qDebug("Unable to read process inforation #1 for %s", args[0]); 594 odebug << "Unable to read process inforation #1 for " << args[0] << "" << oendl;
598 } 595 }
599 } 596 }
600 }else{ 597 }else{
601 qDebug("Unable to create process for application %s", args[0]); 598 odebug << "Unable to create process for application " << args[0] << "" << oendl;
602 return FALSE; 599 return FALSE;
603 } 600 }
@@ -679,14 +676,14 @@ void AppLauncher::processExited()
679{ 676{
680#ifdef Q_OS_WIN32 677#ifdef Q_OS_WIN32
681 qDebug("AppLauncher::processExited()"); 678 odebug << "AppLauncher::processExited()" << oendl;
682 bool found = FALSE; 679 bool found = FALSE;
683 QProcess *proc = (QProcess *) sender(); 680 QProcess *proc = (QProcess *) sender();
684 if (!proc){ 681 if (!proc){
685 qDebug("Interanl error NULL proc"); 682 odebug << "Interanl error NULL proc" << oendl;
686 return; 683 return;
687 } 684 }
688 685
689 QString appName = proc->arguments()[0]; 686 QString appName = proc->arguments()[0];
690 qDebug("Removing application %s", appName.latin1()); 687 odebug << "Removing application " << appName << "" << oendl;
691 runningAppsProc.remove(proc); 688 runningAppsProc.remove(proc);
692 689
@@ -715,5 +712,5 @@ void AppLauncher::processExited()
715 runningApps.remove(it.key()); 712 runningApps.remove(it.key());
716 }else{ 713 }else{
717 qDebug("Internal error application %s not listed as running", appName.latin1()); 714 odebug << "Internal error application " << appName << " not listed as running" << oendl;
718 } 715 }
719 716
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index 3e0a96c..92b8c25 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -22,6 +22,7 @@
22#include "mediadlg.h" 22#include "mediadlg.h"
23 23
24/* OPIE */
24#include <opie2/oglobal.h> 25#include <opie2/oglobal.h>
25 26#include <opie2/odebug.h>
26#include <qtopia/config.h> 27#include <qtopia/config.h>
27#include <qtopia/mimetype.h> 28#include <qtopia/mimetype.h>
@@ -34,5 +35,7 @@
34#include <qtopia/qcopenvelope_qws.h> 35#include <qtopia/qcopenvelope_qws.h>
35#endif 36#endif
37using namespace Opie::Core;
36 38
39/* QT */
37#include <qtimer.h> 40#include <qtimer.h>
38#include <qfileinfo.h> 41#include <qfileinfo.h>
@@ -48,5 +51,4 @@
48 51
49 52
50using namespace Opie::Core;
51AppLnkSet *DocumentList::appLnkSet = 0; 53AppLnkSet *DocumentList::appLnkSet = 0;
52 54
@@ -109,5 +111,5 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/,
109 cfg.setGroup( "DocTab" ); 111 cfg.setGroup( "DocTab" );
110 d->scanDocs = cfg.readBoolEntry( "Enable", true ); 112 d->scanDocs = cfg.readBoolEntry( "Enable", true );
111 qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs ); 113 odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl;
112 114
113 QTimer::singleShot( 10, this, SLOT( startInitialScan() ) ); 115 QTimer::singleShot( 10, this, SLOT( startInitialScan() ) );
@@ -142,5 +144,5 @@ void DocumentList::start()
142void DocumentList::pause() 144void DocumentList::pause()
143{ 145{
144 //qDebug("pause %i", d->tid); 146 //odebug << "pause " << d->tid << "" << oendl;
145 killTimer( d->tid ); 147 killTimer( d->tid );
146 d->tid = 0; 148 d->tid = 0;
@@ -152,5 +154,5 @@ void DocumentList::resume()
152 if ( d->tid == 0 ) { 154 if ( d->tid == 0 ) {
153 d->tid = startTimer( 20 ); 155 d->tid = startTimer( 20 );
154 //qDebug("resumed %i", d->tid); 156 //odebug << "resumed " << d->tid << "" << oendl;
155 } 157 }
156} 158}
@@ -178,5 +180,5 @@ void DocumentList::resendWorker()
178void DocumentList::rescan() 180void DocumentList::rescan()
179{ 181{
180 //qDebug("rescan"); 182 //odebug << "rescan" << oendl;
181 pause(); 183 pause();
182 d->initialize(); 184 d->initialize();
@@ -233,5 +235,5 @@ void DocumentList::reloadAppLnks()
233 } 235 }
234 236
235 //qDebug("adding type %s", (*ittypes).latin1()); 237 //odebug << "adding type " << (*ittypes) << "" << oendl;
236 238
237 // ### our current launcher expects docs tab to be last 239 // ### our current launcher expects docs tab to be last
@@ -242,5 +244,5 @@ void DocumentList::reloadAppLnks()
242 } 244 }
243 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { 245 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
244 //qDebug("removing type %s", (*ittypes).latin1()); 246 //odebug << "removing type " << (*ittypes) << "" << oendl;
245 d->serverGui->typeRemoved(*ittypes); 247 d->serverGui->typeRemoved(*ittypes);
246 } 248 }
@@ -275,5 +277,5 @@ void DocumentList::reloadDocLnks()
275void DocumentList::linkChanged( QString arg ) 277void DocumentList::linkChanged( QString arg )
276{ 278{
277 //qDebug( "linkchanged( %s )", arg.latin1() ); 279 //odebug << "linkchanged( " << arg << " )" << oendl;
278 280
279 if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) { 281 if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) {
@@ -288,5 +290,5 @@ void DocumentList::linkChanged( QString arg )
288 if ( ( doc->linkFileKnown() && doc->linkFile() == arg ) 290 if ( ( doc->linkFileKnown() && doc->linkFile() == arg )
289 || ( doc->fileKnown() && doc->file() == arg ) ) { 291 || ( doc->fileKnown() && doc->file() == arg ) ) {
290 //qDebug( "found old link" ); 292 //odebug << "found old link" << oendl;
291 DocLnk* dl = new DocLnk( arg ); 293 DocLnk* dl = new DocLnk( arg );
292 // add new one if it exists and matches the mimetype 294 // add new one if it exists and matches the mimetype
@@ -294,5 +296,5 @@ void DocumentList::linkChanged( QString arg )
294 // Existing link has been changed, send old link ref and a ref 296 // Existing link has been changed, send old link ref and a ref
295 // to the new link 297 // to the new link
296 //qDebug( "change case" ); 298 //odebug << "change case" << oendl;
297 if ( d->serverGui ) 299 if ( d->serverGui )
298 d->serverGui->documentChanged( *doc, *dl ); 300 d->serverGui->documentChanged( *doc, *dl );
@@ -301,5 +303,5 @@ void DocumentList::linkChanged( QString arg )
301 // Link has been removed or doesn't match the mimetypes any more 303 // Link has been removed or doesn't match the mimetypes any more
302 // so we aren't interested in it, so take it away from the list 304 // so we aren't interested in it, so take it away from the list
303 //qDebug( "removal case" ); 305 //odebug << "removal case" << oendl;
304 if ( d->serverGui ) 306 if ( d->serverGui )
305 d->serverGui->documentRemoved( *doc ); 307 d->serverGui->documentRemoved( *doc );
@@ -315,5 +317,5 @@ void DocumentList::linkChanged( QString arg )
315 if ( d->store( dl ) ) { 317 if ( d->store( dl ) ) {
316 // Add if it's a link we are interested in 318 // Add if it's a link we are interested in
317 //qDebug( "add case" ); 319 //odebug << "add case" << oendl;
318 add( *dl ); 320 add( *dl );
319 } 321 }
@@ -379,10 +381,10 @@ void DocumentList::sendAllDocLinks()
379 } 381 }
380 382
381 //qDebug( "sending length %d", contents.length() ); 383 //odebug << "sending length " << contents.length() << "" << oendl;
382#ifndef QT_NO_COP 384#ifndef QT_NO_COP
383 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); 385 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" );
384 e << contents; 386 e << contents;
385#endif 387#endif
386 //qDebug( "================ \n\n%s\n\n===============", contents.latin1() ); 388 //odebug << "================ \n\n" << contents << "\n\n===============" << oendl;
387 389
388 d->needToSendAllDocLinks = false; 390 d->needToSendAllDocLinks = false;
@@ -537,5 +539,5 @@ void DocumentListPrivate::estimatedPercentScanned()
537 } 539 }
538 540
539 // qDebug( "overallProgress: %f", overallProgress ); 541 // odebug << "overallProgress: " << overallProgress << "" << oendl;
540 542
541 if ( serverGui ) 543 if ( serverGui )
@@ -554,5 +556,5 @@ const QString DocumentListPrivate::nextFile()
554 } else { 556 } else {
555 QDir dir( docPaths[docPathsSearched] ); 557 QDir dir( docPaths[docPathsSearched] );
556 // qDebug("now using base path: %s", docPaths[docPathsSearched].latin1() ); 558 // odebug << "now using base path: " << docPaths[docPathsSearched] << "" << oendl;
557 docPathsSearched++; 559 docPathsSearched++;
558 if ( !dir.exists( ".Qtopia-ignore" ) ) { 560 if ( !dir.exists( ".Qtopia-ignore" ) ) {
@@ -588,5 +590,5 @@ const QString DocumentListPrivate::nextFile()
588 // go down a depth 590 // go down a depth
589 QDir dir( fi->filePath() ); 591 QDir dir( fi->filePath() );
590 // qDebug("now going in to path: %s", bn.latin1() ); 592 // odebug << "now going in to path: " << bn << "" << oendl;
591 if ( !dir.exists( ".Qtopia-ignore" ) ) { 593 if ( !dir.exists( ".Qtopia-ignore" ) ) {
592 if ( searchDepth < MAX_SEARCH_DEPTH - 1) { 594 if ( searchDepth < MAX_SEARCH_DEPTH - 1) {
@@ -629,5 +631,5 @@ const DocLnk *DocumentListPrivate::iterate()
629{ 631{
630 if ( state == Find ) { 632 if ( state == Find ) {
631 //qDebug("state Find"); 633 //odebug << "state Find" << oendl;
632 QString file = nextFile(); 634 QString file = nextFile();
633 while ( !file.isNull() ) { 635 while ( !file.isNull() ) {
@@ -651,5 +653,5 @@ const DocLnk *DocumentListPrivate::iterate()
651 653
652 if ( state == RemoveKnownFiles ) { 654 if ( state == RemoveKnownFiles ) {
653 //qDebug("state RemoveKnownFiles"); 655 //odebug << "state RemoveKnownFiles" << oendl;
654 const QList<DocLnk> &list = dls.children(); 656 const QList<DocLnk> &list = dls.children();
655 for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) { 657 for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) {
@@ -665,5 +667,5 @@ const DocLnk *DocumentListPrivate::iterate()
665 667
666 if ( state == MakeUnknownFiles ) { 668 if ( state == MakeUnknownFiles ) {
667 //qDebug("state MakeUnknownFiles"); 669 //odebug << "state MakeUnknownFiles" << oendl;
668 for (void* c; (c=dit->current()); ++(*dit) ) { 670 for (void* c; (c=dit->current()); ++(*dit) ) {
669 if ( c == MAGIC_NUMBER ) { 671 if ( c == MAGIC_NUMBER ) {
@@ -688,5 +690,5 @@ const DocLnk *DocumentListPrivate::iterate()
688 } 690 }
689 691
690 //qDebug("state Done"); 692 //odebug << "state Done" << oendl;
691 return NULL; 693 return NULL;
692} 694}
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index 4316648..e9e2d83 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -30,14 +30,16 @@
30#include "applauncher.h" 30#include "applauncher.h"
31#include "serverapp.h" 31#include "serverapp.h"
32//#include <qtopia/custom.h>
33
34#include "calibrate.h" 32#include "calibrate.h"
35#include "documentlist.h" 33#include "documentlist.h"
36 34
35/* OPIE */
36#include <opie2/odebug.h>
37#include <qtopia/resource.h> 37#include <qtopia/resource.h>
38#include <qtopia/qcopenvelope_qws.h> 38#include <qtopia/qcopenvelope_qws.h>
39#include <qtopia/config.h> 39#include <qtopia/config.h>
40#include <qtopia/fontmanager.h> 40#include <qtopia/fontmanager.h>
41using namespace Opie::Core;
41 42
43/* QT */
42#include <qfile.h> 44#include <qfile.h>
43#include <qpainter.h> 45#include <qpainter.h>
@@ -52,5 +54,5 @@
52#endif 54#endif
53 55
54 56/* STD */
55#include <stdlib.h> 57#include <stdlib.h>
56#include <sys/types.h> 58#include <sys/types.h>
@@ -156,5 +158,5 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
156 158
157#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 159#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
158 qDebug("Setting up QCop to QPE/System"); 160 odebug << "Setting up QCop to QPE/System" << oendl;
159 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 161 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
160 connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), 162 connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
@@ -224,5 +226,5 @@ void FirstUse::nextDialog()
224 do { 226 do {
225 currApp++; 227 currApp++;
226 qDebug( "currApp = %d", currApp ); 228 odebug << "currApp = " << currApp << "" << oendl;
227 if ( settingsTable[currApp].app == 0 ) { 229 if ( settingsTable[currApp].app == 0 ) {
228 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) { 230 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
@@ -230,10 +232,10 @@ void FirstUse::nextDialog()
230 // Tell it to stop, and when its done we'll come back 232 // Tell it to stop, and when its done we'll come back
231 // to nextDialog and exit. 233 // to nextDialog and exit.
232 qDebug( "Waiting for %s to exit", settingsTable[prevApp].app ); 234 odebug << "Waiting for " << settingsTable[prevApp].app << " to exit" << oendl;
233 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 235 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
234 settingsTable[prevApp].stop ); 236 settingsTable[prevApp].stop );
235 currApp = prevApp; 237 currApp = prevApp;
236 } else { 238 } else {
237 qDebug( "Done!" ); 239 odebug << "Done!" << oendl;
238 Config config( "qpe" ); 240 Config config( "qpe" );
239 config.setGroup( "Startup" ); 241 config.setGroup( "Startup" );
@@ -259,10 +261,10 @@ void FirstUse::nextDialog()
259 261
260 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) { 262 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
261 qDebug( "Shutdown: %s", settingsTable[prevApp].app ); 263 odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
262 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 264 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
263 settingsTable[prevApp].stop ); 265 settingsTable[prevApp].stop );
264 waitForExit = prevApp; 266 waitForExit = prevApp;
265 } else { 267 } else {
266 qDebug( "Startup: %s", settingsTable[currApp].app ); 268 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
267 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app, 269 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
268 settingsTable[currApp].start ); 270 settingsTable[currApp].start );
@@ -286,5 +288,5 @@ void FirstUse::previousDialog()
286 288
287 if ( prevApp >= 0 ) { 289 if ( prevApp >= 0 ) {
288 qDebug( "Shutdown: %s", settingsTable[prevApp].app ); 290 odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
289 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 291 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
290 settingsTable[prevApp].stop ); 292 settingsTable[prevApp].stop );
@@ -295,5 +297,5 @@ void FirstUse::previousDialog()
295 waitForExit = prevApp; 297 waitForExit = prevApp;
296 } else { 298 } else {
297 qDebug( "Startup: %s", settingsTable[currApp].app ); 299 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
298 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app, 300 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
299 settingsTable[currApp].start ); 301 settingsTable[currApp].start );
@@ -319,7 +321,7 @@ void FirstUse::message(const QCString &msg, const QByteArray &data)
319void FirstUse::terminated( int, const QString &app ) 321void FirstUse::terminated( int, const QString &app )
320{ 322{
321 qDebug( "--- terminated: %s", app.latin1() ); 323 odebug << "--- terminated: " << app << "" << oendl;
322 if ( waitForExit != -1 && settingsTable[waitForExit].app == app ) { 324 if ( waitForExit != -1 && settingsTable[waitForExit].app == app ) {
323 qDebug( "Startup: %s", settingsTable[currApp].app ); 325 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
324 if ( settingsTable[waitForExit].app == "language" ) { // No tr 326 if ( settingsTable[waitForExit].app == "language" ) { // No tr
325 Config config("locale"); 327 Config config("locale");
@@ -348,10 +350,10 @@ void FirstUse::terminated( int, const QString &app )
348void FirstUse::newQcopChannel(const QString& channelName) 350void FirstUse::newQcopChannel(const QString& channelName)
349{ 351{
350 qDebug("channel %s added", channelName.data() ); 352 odebug << "channel " << channelName.data() << " added" << oendl;
351 QString prefix("QPE/Application/"); 353 QString prefix("QPE/Application/");
352 if (channelName.startsWith(prefix)) { 354 if (channelName.startsWith(prefix)) {
353 QString appName = channelName.mid(prefix.length()); 355 QString appName = channelName.mid(prefix.length());
354 if ( currApp >= 0 && appName == settingsTable[currApp].app ) { 356 if ( currApp >= 0 && appName == settingsTable[currApp].app ) {
355 qDebug( "Application: %s started", settingsTable[currApp].app ); 357 odebug << "Application: " << settingsTable[currApp].app << " started" << oendl;
356 waitingForLaunch = FALSE; 358 waitingForLaunch = FALSE;
357 updateButtons(); 359 updateButtons();
@@ -371,10 +373,10 @@ void FirstUse::reloadLanguages()
371 QString l = config.readEntry( "Language", "en"); 373 QString l = config.readEntry( "Language", "en");
372 QString cl = getenv("LANG"); 374 QString cl = getenv("LANG");
373 qWarning("language message - " + l); 375 owarn << "language message - " + l << oendl;
374 // setting anyway... 376 // setting anyway...
375 if (l.isNull() ) 377 if (l.isNull() )
376 unsetenv( "LANG" ); 378 unsetenv( "LANG" );
377 else { 379 else {
378 qWarning("and its not null"); 380 owarn << "and its not null" << oendl;
379 setenv( "LANG", l.latin1(), 1 ); 381 setenv( "LANG", l.latin1(), 1 );
380 } 382 }
@@ -393,7 +395,7 @@ void FirstUse::reloadLanguages()
393 transApp = new QTranslator(qApp); 395 transApp = new QTranslator(qApp);
394 QString tfn = QPEApplication::qpeDir() + "i18n/"+l+"/qpe.qm"; 396 QString tfn = QPEApplication::qpeDir() + "i18n/"+l+"/qpe.qm";
395 qWarning("loading " + tfn); 397 owarn << "loading " + tfn << oendl;
396 if ( transApp->load(tfn) ) { 398 if ( transApp->load(tfn) ) {
397 qWarning("installing translator"); 399 owarn << "installing translator" << oendl;
398 qApp->installTranslator( transApp ); 400 qApp->installTranslator( transApp );
399 } else { 401 } else {
@@ -404,7 +406,7 @@ void FirstUse::reloadLanguages()
404 transLib = new QTranslator(qApp); 406 transLib = new QTranslator(qApp);
405 tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm"; 407 tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm";
406 qWarning("loading " + tfn); 408 owarn << "loading " + tfn << oendl;
407 if ( transLib->load(tfn) ) { 409 if ( transLib->load(tfn) ) {
408 qWarning("installing translator library"); 410 owarn << "installing translator library" << oendl;
409 qApp->installTranslator( transLib ); 411 qApp->installTranslator( transLib );
410 } else { 412 } else {
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 19e799a..cef16bf 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -22,7 +22,11 @@
22#include "inputmethods.h" 22#include "inputmethods.h"
23 23
24/* OPIE */
25#include <opie2/odebug.h>
24#include <qtopia/config.h> 26#include <qtopia/config.h>
25#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
28using namespace Opie::Core;
26 29
30/* QT */
27#include <qpopupmenu.h> 31#include <qpopupmenu.h>
28#include <qtoolbutton.h> 32#include <qtoolbutton.h>
@@ -30,7 +34,5 @@
30#include <qlayout.h> 34#include <qlayout.h>
31#include <qdir.h> 35#include <qdir.h>
32#include <stdlib.h>
33#include <qtl.h> 36#include <qtl.h>
34
35#ifdef Q_WS_QWS 37#ifdef Q_WS_QWS
36#include <qwindowsystem_qws.h> 38#include <qwindowsystem_qws.h>
@@ -39,12 +41,6 @@
39#endif 41#endif
40 42
41/* ### SingleFloppy if someone is interested? */ 43/* STD */
42#if 0 44#include <stdlib.h>
43#ifdef QT_NO_COMPONENT
44#include "../plugins/inputmethods/handwriting/handwritingimpl.h"
45#include "../plugins/inputmethods/keyboard/keyboardimpl.h"
46#include "../3rdparty/plugins/inputmethods/pickboard/pickboardimpl.h"
47#endif
48#endif
49 45
50/* XPM */ 46/* XPM */
@@ -263,5 +259,5 @@ void InputMethods::setPreferedHandlers() {
263 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) 259 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
264 if ( (*it).name() == current ) { 260 if ( (*it).name() == current ) {
265 qWarning("preferred keyboard is %s", current.latin1() ); 261 owarn << "preferred keyboard is " << current << "" << oendl;
266 mkeyboard = &(*it); 262 mkeyboard = &(*it);
267 kbdButton->setPixmap( *mkeyboard->icon() ); 263 kbdButton->setPixmap( *mkeyboard->icon() );
@@ -306,11 +302,11 @@ void InputMethods::loadInputMethods()
306 // may be either a simple, or advanced. 302 // may be either a simple, or advanced.
307 if (input.widget) { 303 if (input.widget) {
308 //qDebug("its a keyboard"); 304 //odebug << "its a keyboard" << oendl;
309 inputMethodList.append( input ); 305 inputMethodList.append( input );
310 } else { 306 } else {
311 //qDebug("its a real im"); 307 //odebug << "its a real im" << oendl;
312 input.widget = input.extInterface->statusWidget( 0, 0 ); 308 input.widget = input.extInterface->statusWidget( 0, 0 );
313 if (input.widget) { 309 if (input.widget) {
314 //qDebug("blah"); 310 //odebug << "blah" << oendl;
315 inputModifierList.append( input ); 311 inputModifierList.append( input );
316 imButton->addWidget(input.widget, inputModifierList.count()); 312 imButton->addWidget(input.widget, inputModifierList.count());
@@ -542,5 +538,5 @@ void InputMethods::showKbd( bool on )
542 if ( inputWidgetStyle & QWidget::WStyle_DialogBorder ) 538 if ( inputWidgetStyle & QWidget::WStyle_DialogBorder )
543 { 539 {
544 qDebug( "InputMethods: reading geometry." ); 540 odebug << "InputMethods: reading geometry." << oendl;
545 Config cfg( "Launcher" ); 541 Config cfg( "Launcher" );
546 cfg.setGroup( "InputMethods" ); 542 cfg.setGroup( "InputMethods" );
@@ -552,5 +548,5 @@ void InputMethods::showKbd( bool on )
552 if ( l > -1 && t > -1 && w > -1 && h > -1 ) 548 if ( l > -1 && t > -1 && w > -1 && h > -1 )
553 { 549 {
554 qDebug( "InputMethods: config values ( %d, %d, %d, %d ) are ok.", l, t, w, h ); 550 odebug << "InputMethods: config values ( " << l << ", " << t << ", " << w << ", " << h << " ) are ok." << oendl;
555 left = l; 551 left = l;
556 top = t; 552 top = t;
@@ -560,10 +556,10 @@ void InputMethods::showKbd( bool on )
560 else 556 else
561 { 557 {
562 qDebug( "InputMethods: config values are new or not ok." ); 558 odebug << "InputMethods: config values are new or not ok." << oendl;
563 } 559 }
564 } 560 }
565 else 561 else
566 { 562 {
567 qDebug( "InputMethods: no floating selected." ); 563 odebug << "InputMethods: no floating selected." << oendl;
568 } 564 }
569 mkeyboard->widget->resize( width, height ); 565 mkeyboard->widget->resize( width, height );
@@ -578,5 +574,5 @@ void InputMethods::showKbd( bool on )
578 QPoint pos = mkeyboard->widget->pos(); 574 QPoint pos = mkeyboard->widget->pos();
579 QSize siz = mkeyboard->widget->size(); 575 QSize siz = mkeyboard->widget->size();
580 qDebug( "InputMethods: saving geometry." ); 576 odebug << "InputMethods: saving geometry." << oendl;
581 Config cfg( "Launcher" ); 577 Config cfg( "Launcher" );
582 cfg.setGroup( "InputMethods" ); 578 cfg.setGroup( "InputMethods" );
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index a0e9c16..092eb0c 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -19,13 +19,13 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21
22#include "irserver.h" 21#include "irserver.h"
22#include "obexinterface.h"
23 23
24/* OPIE */
25#include <opie2/odebug.h>
24#include <qtopia/qlibrary.h> 26#include <qtopia/qlibrary.h>
25#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
26 28
27 29/* QT */
28#include "obexinterface.h"
29
30#include <qdir.h> 30#include <qdir.h>
31 31
@@ -45,13 +45,13 @@ IrServer::IrServer( QObject *parent, const char *name )
45 for ( it = list.begin(); it != list.end(); ++it ) { 45 for ( it = list.begin(); it != list.end(); ++it ) {
46 QLibrary *trylib = new QLibrary( path + *it ); 46 QLibrary *trylib = new QLibrary( path + *it );
47 //qDebug("trying lib %s", (path + (*it)).latin1() ); 47 //odebug << "trying lib " << (path + (*it)) << "" << oendl;
48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { 48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
49 lib = trylib; 49 lib = trylib;
50 //qDebug("found obex lib" ); 50 //odebug << "found obex lib" << oendl;
51 QString lang = getenv( "LANG" ); 51 QString lang = getenv( "LANG" );
52 QTranslator * trans = new QTranslator(qApp); 52 QTranslator * trans = new QTranslator(qApp);
53 QString type = (*it).left( (*it).find(".") ); 53 QString type = (*it).left( (*it).find(".") );
54 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 54 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
55 //qDebug("tr fpr obex: %s", tfn.latin1() ); 55 //odebug << "tr fpr obex: " << tfn << "" << oendl;
56 if ( trans->load( tfn )) 56 if ( trans->load( tfn ))
57 qApp->installTranslator( trans ); 57 qApp->installTranslator( trans );
@@ -65,5 +65,5 @@ IrServer::IrServer( QObject *parent, const char *name )
65 } 65 }
66 if ( !lib ) 66 if ( !lib )
67 qDebug("could not load IR plugin" ); 67 odebug << "could not load IR plugin" << oendl;
68} 68}
69 69
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 5d0c778..bf2287d 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -19,4 +19,13 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "startmenu.h"
22#include "taskbar.h"
23#include "serverinterface.h"
24#include "launcherview.h"
25#include "launcher.h"
26#include "server.h"
27
28/* OPIE */
29#include <opie2/odebug.h>
21#include <qtopia/global.h> 30#include <qtopia/global.h>
22#ifdef Q_WS_QWS 31#ifdef Q_WS_QWS
@@ -29,8 +38,11 @@
29#include <qtopia/mimetype.h> 38#include <qtopia/mimetype.h>
30#include <qtopia/private/categories.h> 39#include <qtopia/private/categories.h>
31//#include <qtopia/custom.h> 40#define QTOPIA_INTERNAL_FSLP
41#include <qtopia/lnkproperties.h>
32 42
43/* QT */
33#include <qdir.h> 44#include <qdir.h>
34#ifdef Q_WS_QWS 45#ifdef Q_WS_QWS
46#include <qkeyboard_qws.h>
35#include <qwindowsystem_qws.h> 47#include <qwindowsystem_qws.h>
36#endif 48#endif
@@ -51,17 +63,7 @@
51#include <qpopupmenu.h> 63#include <qpopupmenu.h>
52 64
53#include "startmenu.h" 65/* STD */
54#include "taskbar.h"
55
56#include "serverinterface.h"
57#include "launcherview.h"
58#include "launcher.h"
59#include "server.h"
60
61#define QTOPIA_INTERNAL_FSLP
62#include <qtopia/lnkproperties.h>
63#include <stdlib.h> 66#include <stdlib.h>
64#include <assert.h> 67#include <assert.h>
65
66#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 68#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
67#include <unistd.h> 69#include <unistd.h>
@@ -71,9 +73,4 @@
71#endif 73#endif
72 74
73#ifdef Q_WS_QWS
74#include <qkeyboard_qws.h>
75#include <qpe/lnkproperties.h>
76#endif
77
78 75
79static bool isVisibleWindow( int ); 76static bool isVisibleWindow( int );
@@ -229,5 +226,5 @@ LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm,
229 docview = view; 226 docview = view;
230 227
231 qDebug("inserting %s at %d", id.latin1(), n-1 ); 228 odebug << "inserting " << id << " at " << n-1 << "" << oendl;
232 229
233 Config cfg("Launcher"); 230 Config cfg("Launcher");
@@ -414,5 +411,5 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
414 if ( !fam.isEmpty() ) { 411 if ( !fam.isEmpty() ) {
415 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 412 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
416 qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); 413 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
417 } else { 414 } else {
418 view(id)->clearViewFont(); 415 view(id)->clearViewFont();
@@ -685,5 +682,5 @@ void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
685 view->removeLink( app.linkFile() ); 682 view->removeLink( app.linkFile() );
686 else 683 else
687 qWarning("removeAppLnk: No view for %s!", type.latin1() ); 684 owarn << "removeAppLnk: No view for " << type << "!" << oendl;
688} 685}
689 686
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 6c7d487..71e8753 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -21,4 +21,6 @@
21#include "launcherview.h" 21#include "launcherview.h"
22 22
23/* OPIE */
24#include <opie2/odebug.h>
23#include <qtopia/qpeapplication.h> 25#include <qtopia/qpeapplication.h>
24#include <qtopia/private/categories.h> 26#include <qtopia/private/categories.h>
@@ -26,6 +28,7 @@
26#include <qtopia/mimetype.h> 28#include <qtopia/mimetype.h>
27#include <qtopia/resource.h> 29#include <qtopia/resource.h>
28//#include <qtopia/private/palmtoprecord.h> 30using namespace Opie::Core;
29 31
32/* QT */
30#include <qtimer.h> 33#include <qtimer.h>
31#include <qfileinfo.h> 34#include <qfileinfo.h>
@@ -116,5 +119,5 @@ public:
116 while ((l=it.current())) { 119 while ((l=it.current())) {
117 ++it; 120 ++it;
118 //qDebug("%p: hidden (should remove)",l); 121 //odebug << "" << l << ": hidden (should remove)" << oendl;
119 } 122 }
120#endif 123#endif
@@ -1030,5 +1033,5 @@ void LauncherView::paletteChange( const QPalette &p )
1030void LauncherView::fontChanged(const QFont&) 1033void LauncherView::fontChanged(const QFont&)
1031{ 1034{
1032 qDebug("LauncherView::fontChanged()"); 1035 odebug << "LauncherView::fontChanged()" << oendl;
1033 icons->hideOrShowItems( FALSE ); 1036 icons->hideOrShowItems( FALSE );
1034} 1037}
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 3e7e0d2..a86aca6 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -22,4 +22,8 @@
22#define QTOPIA_INTERNAL_FILEOPERATIONS 22#define QTOPIA_INTERNAL_FILEOPERATIONS
23#endif 23#endif
24#ifdef QT_QWS_LOGIN
25#include "../login/qdmdialogimpl.h"
26#endif
27#include "calibrate.h"
24#include "server.h" 28#include "server.h"
25#include "serverapp.h" 29#include "serverapp.h"
@@ -27,17 +31,24 @@
27#include "firstuse.h" 31#include "firstuse.h"
28 32
33/* OPIE */
34#include <opie2/odebug.h>
35#include <opie2/odevice.h>
29#include <opie2/oglobal.h> 36#include <opie2/oglobal.h>
30
31#include <qtopia/network.h> 37#include <qtopia/network.h>
32//#include <qtopia/custom.h> 38#include <qtopia/alarmserver.h>
33 39using namespace Opie::Core;
34 40
41/* QT */
35#include <qdir.h> 42#include <qdir.h>
43#include <qmessagebox.h>
36#ifdef QWS 44#ifdef QWS
37#include <qwindowsystem_qws.h> 45#include <qwindowsystem_qws.h>
38#include <qtopia/qcopenvelope_qws.h> 46#include <qtopia/qcopenvelope_qws.h>
39#endif 47#endif
40#include <qtopia/alarmserver.h> 48#ifdef Q_WS_QWS
49#include <qkeyboard_qws.h>
50#endif
41 51
52/* STD */
42#include <stdlib.h> 53#include <stdlib.h>
43#include <stdio.h> 54#include <stdio.h>
@@ -49,21 +60,4 @@
49#endif 60#endif
50 61
51#include "calibrate.h"
52
53
54#ifdef QT_QWS_LOGIN
55#include "../login/qdmdialogimpl.h"
56#endif
57
58#ifdef Q_WS_QWS
59#include <qkeyboard_qws.h>
60#endif
61
62#include <qmessagebox.h>
63#include <opie2/odevice.h>
64
65using namespace Opie::Core;
66
67
68static void cleanup() 62static void cleanup()
69{ 63{
@@ -122,5 +116,5 @@ static void refreshTimeZoneConfig()
122 curZone = TimeZone( zoneID ); 116 curZone = TimeZone( zoneID );
123 if ( !curZone.isValid() ){ 117 if ( !curZone.isValid() ){
124 qDebug( "initEnvironment() Invalid TimeZone %s", zoneID.latin1() ); 118 odebug << "initEnvironment() Invalid TimeZone " << zoneID << "" << oendl;
125 break; 119 break;
126 } 120 }
@@ -270,5 +264,5 @@ int initApplication( int argc, char ** argv )
270 int rv = a.exec(); 264 int rv = a.exec();
271 265
272 qDebug("exiting..."); 266 odebug << "exiting..." << oendl;
273 delete s; 267 delete s;
274 268
@@ -342,5 +336,5 @@ int main( int argc, char ** argv )
342 336
343 if ( DesktopApplication::doRestart ) { 337 if ( DesktopApplication::doRestart ) {
344 qDebug("Trying to restart"); 338 odebug << "Trying to restart" << oendl;
345 execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); 339 execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 );
346 } 340 }
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp
index 7e61b0e..a11ac86 100644
--- a/core/launcher/packageslave.cpp
+++ b/core/launcher/packageslave.cpp
@@ -20,26 +20,26 @@
20 20
21#include "packageslave.h" 21#include "packageslave.h"
22#include <qtopia/qprocess.h>
23 22
23/* OPIE */
24#include <opie2/odebug.h>
25#include <qtopia/qprocess.h>
24#ifdef Q_WS_QWS 26#ifdef Q_WS_QWS
25#include <qtopia/qcopenvelope_qws.h> 27#include <qtopia/qcopenvelope_qws.h>
26#endif 28#endif
29using namespace Opie::Core;
27 30
31/* QT */
28#ifdef Q_WS_QWS 32#ifdef Q_WS_QWS
29#include <qcopchannel_qws.h> 33#include <qcopchannel_qws.h>
30#endif 34#endif
31
32#include <qtextstream.h> 35#include <qtextstream.h>
33 36
37/* STD */
34#include <stdlib.h> 38#include <stdlib.h>
35#include <sys/stat.h> // mkdir() 39#include <sys/stat.h> // mkdir()
36
37#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 40#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
38#include <unistd.h> 41#include <unistd.h>
39#include <sys/vfs.h> 42#include <sys/vfs.h>
40#include <mntent.h> 43#include <mntent.h>
41#elif defined(Q_OS_WIN32)
42#include <windows.h>
43#include <winbase.h>
44#elif defined(Q_OS_MACX) 44#elif defined(Q_OS_MACX)
45#include <unistd.h> 45#include <unistd.h>
@@ -146,5 +146,5 @@ void PackageHandler::addPackageFiles( const QString &location,
146 QDir d; 146 QDir d;
147 //#### revise 147 //#### revise
148 qDebug("Copy file at %s: %s", __FILE__, __LINE__ ); 148 odebug << "Copy file at " << __FILE__ << ": " << __LINE__ << "" << oendl;
149 d.mkdir(("/usr/lib/ipkg/info/" + location).ascii()); 149 d.mkdir(("/usr/lib/ipkg/info/" + location).ascii());
150 system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii()); 150 system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii());
@@ -160,5 +160,5 @@ void PackageHandler::addPackageFiles( const QString &location,
160 // for s, do link/mkdir. 160 // for s, do link/mkdir.
161 if ( s.right(1) == "/" ) { 161 if ( s.right(1) == "/" ) {
162 qDebug("do mkdir for %s", s.ascii()); 162 odebug << "do mkdir for " << s.ascii() << "" << oendl;
163#ifndef Q_OS_WIN32 163#ifndef Q_OS_WIN32
164 mkdir( s.ascii(), 0777 ); 164 mkdir( s.ascii(), 0777 );
@@ -171,8 +171,8 @@ void PackageHandler::addPackageFiles( const QString &location,
171 } else { 171 } else {
172#ifndef Q_OS_WIN32 172#ifndef Q_OS_WIN32
173 qDebug("do symlink for %s", s.ascii()); 173 odebug << "do symlink for " << s.ascii() << "" << oendl;
174 symlink( (location + s).ascii(), s.ascii() ); 174 symlink( (location + s).ascii(), s.ascii() );
175#else 175#else
176 qDebug("Copy file instead of a symlink for WIN32"); 176 odebug << "Copy file instead of a symlink for WIN32" << oendl;
177 if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE)) 177 if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE))
178 qWarning("Unable to create symlinkfor %s", 178 qWarning("Unable to create symlinkfor %s",
@@ -216,5 +216,5 @@ void PackageHandler::cleanupPackageFiles( const QString &listfile )
216 } else { 216 } else {
217#ifndef Q_OS_WIN32 217#ifndef Q_OS_WIN32
218 qDebug("remove symlink for %s", s.ascii()); 218 odebug << "remove symlink for " << s.ascii() << "" << oendl;
219 //check if it is a symlink first (don't remove /etc/passwd...) 219 //check if it is a symlink first (don't remove /etc/passwd...)
220 char buf[10]; //we don't care about the contents 220 char buf[10]; //we don't care about the contents
@@ -223,5 +223,5 @@ void PackageHandler::cleanupPackageFiles( const QString &listfile )
223 #else 223 #else
224 // ### revise 224 // ### revise
225 qWarning("Unable to remove symlink %s:%s", __FILE__, __LINE__); 225 owarn << "Unable to remove symlink " << __FILE__ << ":" << __LINE__ << "" << oendl;
226#endif 226#endif
227 } 227 }
@@ -267,5 +267,5 @@ void PackageHandler::prepareInstall( const QString& size, const QString& path )
267 if ( statfs( path.latin1(), &fs ) == 0 ) 267 if ( statfs( path.latin1(), &fs ) == 0 )
268 if ( s > fs.f_bsize * fs.f_bavail ) { 268 if ( s > fs.f_bsize * fs.f_bavail ) {
269 //qDebug("############### Not enough space left ###############"); 269 //odebug << "############### Not enough space left ###############" << oendl;
270 mNoSpaceLeft = TRUE; 270 mNoSpaceLeft = TRUE;
271 } 271 }
diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp
index 33df6c4..e339dc7 100644
--- a/core/launcher/qcopbridge.cpp
+++ b/core/launcher/qcopbridge.cpp
@@ -22,13 +22,15 @@
22#include "transferserver.h" 22#include "transferserver.h"
23 23
24/* OPIE */
25#include <opie2/odebug.h>
24#include <opie2/oglobal.h> 26#include <opie2/oglobal.h>
25
26#ifdef Q_WS_QWS 27#ifdef Q_WS_QWS
27#include <qtopia/qcopenvelope_qws.h> 28#include <qtopia/qcopenvelope_qws.h>
28#endif 29#endif
29#include <qtopia/qpeapplication.h> 30#include <qtopia/qpeapplication.h>
30
31#include <qtopia/version.h> 31#include <qtopia/version.h>
32using namespace Opie::Core;
32 33
34/* QT */
33#include <qtextstream.h> 35#include <qtextstream.h>
34#include <qtimer.h> 36#include <qtimer.h>
@@ -37,4 +39,5 @@
37#endif 39#endif
38 40
41/* STD */
39#ifndef _XOPEN_SOURCE 42#ifndef _XOPEN_SOURCE
40#define _XOPEN_SOURCE 43#define _XOPEN_SOURCE
@@ -50,10 +53,6 @@
50#endif 53#endif
51 54
52
53//#define INSECURE
54
55const int block_size = 51200; 55const int block_size = 51200;
56 56
57using namespace Opie::Core;
58QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, 57QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
59 const char* name ) 58 const char* name )
@@ -63,5 +62,5 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
63{ 62{
64 if ( !ok() ) 63 if ( !ok() )
65 qWarning( "Failed to bind to port %d", port ); 64 owarn << "Failed to bind to port " << port << "" << oendl;
66 else { 65 else {
67#ifndef QT_NO_COP 66#ifndef QT_NO_COP
@@ -172,5 +171,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
172 int paren = command.find( "(" ); 171 int paren = command.find( "(" );
173 if ( paren <= 0 ) { 172 if ( paren <= 0 ) {
174 qDebug("DesktopMessage: bad qcop syntax"); 173 odebug << "DesktopMessage: bad qcop syntax" << oendl;
175 return; 174 return;
176 } 175 }
@@ -178,5 +177,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
178 QString params = command.mid( paren + 1 ); 177 QString params = command.mid( paren + 1 );
179 if ( params[params.length()-1] != ')' ) { 178 if ( params[params.length()-1] != ')' ) {
180 qDebug("DesktopMessage: bad qcop syntax"); 179 odebug << "DesktopMessage: bad qcop syntax" << oendl;
181 return; 180 return;
182 } 181 }
@@ -205,5 +204,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
205 str = QString::number( i ); 204 str = QString::number( i );
206 } else { 205 } else {
207 qDebug(" cannot route the argument type %s throught the qcop bridge", (*it).latin1() ); 206 odebug << " cannot route the argument type " << (*it) << " throught the qcop bridge" << oendl;
208 return; 207 return;
209 } 208 }
@@ -333,5 +332,5 @@ void QCopBridgePI::send( const QString& msg )
333 QTextStream os( this ); 332 QTextStream os( this );
334 os << msg << endl; 333 os << msg << endl;
335 //qDebug( "sending qcop message: %s", msg.latin1() ); 334 //odebug << "sending qcop message: " << msg << "" << oendl;
336} 335}
337 336
@@ -346,5 +345,5 @@ void QCopBridgePI::read()
346void QCopBridgePI::process( const QString& message ) 345void QCopBridgePI::process( const QString& message )
347{ 346{
348 //qDebug( "Command: %s", message.latin1() ); 347 //odebug << "Command: " << message << "" << oendl;
349 348
350 // split message using "," as separator 349 // split message using "," as separator
diff --git a/core/launcher/qprocess.cpp b/core/launcher/qprocess.cpp
index 97bd539..3fe1238 100644
--- a/core/launcher/qprocess.cpp
+++ b/core/launcher/qprocess.cpp
@@ -582,5 +582,5 @@ void QProcess::connectNotify( const char * signal )
582{ 582{
583#if defined(QT_QPROCESS_DEBUG) 583#if defined(QT_QPROCESS_DEBUG)
584 qDebug( "QProcess::connectNotify(): signal %s has been connected", signal ); 584 odebug << "QProcess::connectNotify(): signal " << signal << " has been connected" << oendl;
585#endif 585#endif
586 if ( !ioRedirection ) 586 if ( !ioRedirection )
@@ -589,5 +589,5 @@ void QProcess::connectNotify( const char * signal )
589 ) { 589 ) {
590#if defined(QT_QPROCESS_DEBUG) 590#if defined(QT_QPROCESS_DEBUG)
591 qDebug( "QProcess::connectNotify(): set ioRedirection to TRUE" ); 591 odebug << "QProcess::connectNotify(): set ioRedirection to TRUE" << oendl;
592#endif 592#endif
593 setIoRedirection( TRUE ); 593 setIoRedirection( TRUE );
@@ -596,5 +596,5 @@ void QProcess::connectNotify( const char * signal )
596 if ( !notifyOnExit && qstrcmp( signal, SIGNAL(processExited()) )==0 ) { 596 if ( !notifyOnExit && qstrcmp( signal, SIGNAL(processExited()) )==0 ) {
597#if defined(QT_QPROCESS_DEBUG) 597#if defined(QT_QPROCESS_DEBUG)
598 qDebug( "QProcess::connectNotify(): set notifyOnExit to TRUE" ); 598 odebug << "QProcess::connectNotify(): set notifyOnExit to TRUE" << oendl;
599#endif 599#endif
600 setNotifyOnExit( TRUE ); 600 setNotifyOnExit( TRUE );
@@ -603,5 +603,5 @@ void QProcess::connectNotify( const char * signal )
603 if ( !wroteToStdinConnected && qstrcmp( signal, SIGNAL(wroteToStdin()) )==0 ) { 603 if ( !wroteToStdinConnected && qstrcmp( signal, SIGNAL(wroteToStdin()) )==0 ) {
604#if defined(QT_QPROCESS_DEBUG) 604#if defined(QT_QPROCESS_DEBUG)
605 qDebug( "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" ); 605 odebug << "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" << oendl;
606#endif 606#endif
607 setWroteStdinConnected( TRUE ); 607 setWroteStdinConnected( TRUE );
@@ -619,5 +619,5 @@ void QProcess::disconnectNotify( const char * )
619 ) { 619 ) {
620#if defined(QT_QPROCESS_DEBUG) 620#if defined(QT_QPROCESS_DEBUG)
621 qDebug( "QProcess::disconnectNotify(): set ioRedirection to FALSE" ); 621 odebug << "QProcess::disconnectNotify(): set ioRedirection to FALSE" << oendl;
622#endif 622#endif
623 setIoRedirection( FALSE ); 623 setIoRedirection( FALSE );
@@ -625,5 +625,5 @@ void QProcess::disconnectNotify( const char * )
625 if ( notifyOnExit && receivers( SIGNAL(processExited()) ) == 0 ) { 625 if ( notifyOnExit && receivers( SIGNAL(processExited()) ) == 0 ) {
626#if defined(QT_QPROCESS_DEBUG) 626#if defined(QT_QPROCESS_DEBUG)
627 qDebug( "QProcess::disconnectNotify(): set notifyOnExit to FALSE" ); 627 odebug << "QProcess::disconnectNotify(): set notifyOnExit to FALSE" << oendl;
628#endif 628#endif
629 setNotifyOnExit( FALSE ); 629 setNotifyOnExit( FALSE );
@@ -631,5 +631,5 @@ void QProcess::disconnectNotify( const char * )
631 if ( wroteToStdinConnected && receivers( SIGNAL(wroteToStdin()) ) == 0 ) { 631 if ( wroteToStdinConnected && receivers( SIGNAL(wroteToStdin()) ) == 0 ) {
632#if defined(QT_QPROCESS_DEBUG) 632#if defined(QT_QPROCESS_DEBUG)
633 qDebug( "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" ); 633 odebug << "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" << oendl;
634#endif 634#endif
635 setWroteStdinConnected( FALSE ); 635 setWroteStdinConnected( FALSE );
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index 19a8c93..d62e4e6 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -19,6 +19,4 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21//#include "qplatformdefs.h"
22
23// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. 21// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
24#if defined(connect) 22#if defined(connect)
@@ -28,18 +26,21 @@
28#include "qprocess.h" 26#include "qprocess.h"
29 27
30#ifndef QT_NO_PROCESS 28/* OPIE */
29#include <opie2/odebug.h>
30using namespace Opie::Core;
31 31
32#include "qapplication.h" 32/* QT */
33#include "qqueue.h" 33#ifndef QT_NO_PROCESS
34#include "qlist.h" 34#include <qapplication.h>
35#include "qsocketnotifier.h" 35#include <qqueue.h>
36#include "qtimer.h" 36#include <qlist.h>
37#include "qregexp.h" 37#include <qsocketnotifier.h>
38#include <qtimer.h>
39#include <qregexp.h>
38 40
39#include "qcleanuphandler_p.h" 41#include "qcleanuphandler_p.h"
40 42
43/* STD */
41#include <stdlib.h> 44#include <stdlib.h>
42
43// ### FOR Qt 2.3 compat
44#include <unistd.h> 45#include <unistd.h>
45#include <signal.h> 46#include <signal.h>
@@ -48,11 +49,9 @@
48#include <sys/wait.h> 49#include <sys/wait.h>
49#include <sys/fcntl.h> 50#include <sys/fcntl.h>
50 51#include <sys/resource.h>
51#include <errno.h> 52#include <errno.h>
52
53#ifdef Q_OS_MACX 53#ifdef Q_OS_MACX
54#include <sys/time.h> 54#include <sys/time.h>
55#endif 55#endif
56#include <sys/resource.h>
57 56
58#ifdef __MIPSEL__ 57#ifdef __MIPSEL__
@@ -133,5 +132,5 @@ public:
133 { 132 {
134#if defined(QT_QPROCESS_DEBUG) 133#if defined(QT_QPROCESS_DEBUG)
135 qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process ); 134 odebug << "QProc: Constructor for pid " << pid << " and QProcess " << process << "" << oendl;
136#endif 135#endif
137 socketStdin = 0; 136 socketStdin = 0;
@@ -142,5 +141,5 @@ public:
142 { 141 {
143#if defined(QT_QPROCESS_DEBUG) 142#if defined(QT_QPROCESS_DEBUG)
144 qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process ); 143 odebug << "QProc: Destructor for pid " << pid << " and QProcess " << process << "" << oendl;
145#endif 144#endif
146 if ( process != 0 ) { 145 if ( process != 0 ) {
@@ -214,5 +213,5 @@ QProcessManager::QProcessManager()
214 } else { 213 } else {
215#if defined(QT_QPROCESS_DEBUG) 214#if defined(QT_QPROCESS_DEBUG)
216 qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] ); 215 odebug << "QProcessManager: install socket notifier (" << sigchldFd[1] << ")" << oendl;
217#endif 216#endif
218 QSocketNotifier *sn = new QSocketNotifier( sigchldFd[1], 217 QSocketNotifier *sn = new QSocketNotifier( sigchldFd[1],
@@ -227,5 +226,5 @@ QProcessManager::QProcessManager()
227 226
228#if defined(QT_QPROCESS_DEBUG) 227#if defined(QT_QPROCESS_DEBUG)
229 qDebug( "QProcessManager: install a SIGCHLD handler" ); 228 odebug << "QProcessManager: install a SIGCHLD handler" << oendl;
230#endif 229#endif
231 act.sa_handler = qt_C_sigchldHnd; 230 act.sa_handler = qt_C_sigchldHnd;
@@ -237,8 +236,8 @@ QProcessManager::QProcessManager()
237#endif 236#endif
238 if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 ) 237 if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
239 qWarning( "Error installing SIGCHLD handler" ); 238 owarn << "Error installing SIGCHLD handler" << oendl;
240 239
241#if defined(QT_QPROCESS_DEBUG) 240#if defined(QT_QPROCESS_DEBUG)
242 qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" ); 241 odebug << "QProcessManager: install a SIGPIPE handler (SIG_IGN)" << oendl;
243#endif 242#endif
244 /* 243 /*
@@ -253,5 +252,5 @@ QProcessManager::QProcessManager()
253 act.sa_flags = 0; 252 act.sa_flags = 0;
254 if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 ) 253 if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
255 qWarning( "Error installing SIGPIPE handler" ); 254 owarn << "Error installing SIGPIPE handler" << oendl;
256} 255}
257 256
@@ -267,14 +266,14 @@ QProcessManager::~QProcessManager()
267 // restore SIGCHLD handler 266 // restore SIGCHLD handler
268#if defined(QT_QPROCESS_DEBUG) 267#if defined(QT_QPROCESS_DEBUG)
269 qDebug( "QProcessManager: restore old sigchild handler" ); 268 odebug << "QProcessManager: restore old sigchild handler" << oendl;
270#endif 269#endif
271 if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 ) 270 if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
272 qWarning( "Error restoring SIGCHLD handler" ); 271 owarn << "Error restoring SIGCHLD handler" << oendl;
273 272
274#if defined(QT_QPROCESS_DEBUG) 273#if defined(QT_QPROCESS_DEBUG)
275 qDebug( "QProcessManager: restore old sigpipe handler" ); 274 odebug << "QProcessManager: restore old sigpipe handler" << oendl;
276#endif 275#endif
277 if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 ) 276 if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
278 qWarning( "Error restoring SIGPIPE handler" ); 277 owarn << "Error restoring SIGPIPE handler" << oendl;
279} 278}
280 279
@@ -283,5 +282,5 @@ void QProcessManager::append( QProc *p )
283 procList->append( p ); 282 procList->append( p );
284#if defined(QT_QPROCESS_DEBUG) 283#if defined(QT_QPROCESS_DEBUG)
285 qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() ); 284 odebug << "QProcessManager: append process (procList.count(): " << procList->count() << ")" << oendl;
286#endif 285#endif
287} 286}
@@ -291,5 +290,5 @@ void QProcessManager::remove( QProc *p )
291 procList->remove( p ); 290 procList->remove( p );
292#if defined(QT_QPROCESS_DEBUG) 291#if defined(QT_QPROCESS_DEBUG)
293 qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() ); 292 odebug << "QProcessManager: remove process (procList.count(): " << procList->count() << ")" << oendl;
294#endif 293#endif
295 cleanup(); 294 cleanup();
@@ -317,5 +316,5 @@ void QProcessManager::sigchldHnd( int fd )
317 ::read( fd, &tmp, sizeof(tmp) ); 316 ::read( fd, &tmp, sizeof(tmp) );
318#if defined(QT_QPROCESS_DEBUG) 317#if defined(QT_QPROCESS_DEBUG)
319 qDebug( "QProcessManager::sigchldHnd()" ); 318 odebug << "QProcessManager::sigchldHnd()" << oendl;
320#endif 319#endif
321 QProc *proc; 320 QProc *proc;
@@ -330,5 +329,5 @@ void QProcessManager::sigchldHnd( int fd )
330 if ( !process->isRunning() ) { 329 if ( !process->isRunning() ) {
331#if defined(QT_QPROCESS_DEBUG) 330#if defined(QT_QPROCESS_DEBUG)
332 qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid ); 331 odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess available)" << oendl;
333#endif 332#endif
334 // read pending data 333 // read pending data
@@ -336,5 +335,5 @@ void QProcessManager::sigchldHnd( int fd )
336 if ( ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) { 335 if ( ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
337#if defined(QT_QPROCESS_DEBUG) 336#if defined(QT_QPROCESS_DEBUG)
338 qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes ); 337 odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stdout" << oendl;
339#endif 338#endif
340 process->socketRead( proc->socketStdout ); 339 process->socketRead( proc->socketStdout );
@@ -343,5 +342,5 @@ void QProcessManager::sigchldHnd( int fd )
343 if ( ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) { 342 if ( ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
344#if defined(QT_QPROCESS_DEBUG) 343#if defined(QT_QPROCESS_DEBUG)
345 qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes ); 344 odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stderr" << oendl;
346#endif 345#endif
347 process->socketRead( proc->socketStderr ); 346 process->socketRead( proc->socketStderr );
@@ -357,5 +356,5 @@ void QProcessManager::sigchldHnd( int fd )
357 if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) { 356 if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) {
358#if defined(QT_QPROCESS_DEBUG) 357#if defined(QT_QPROCESS_DEBUG)
359 qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid ); 358 odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess not available)" << oendl;
360#endif 359#endif
361 removeProc = TRUE; 360 removeProc = TRUE;
@@ -387,5 +386,5 @@ QProcessPrivate::QProcessPrivate()
387{ 386{
388#if defined(QT_QPROCESS_DEBUG) 387#if defined(QT_QPROCESS_DEBUG)
389 qDebug( "QProcessPrivate: Constructor" ); 388 odebug << "QProcessPrivate: Constructor" << oendl;
390#endif 389#endif
391 stdinBufRead = 0; 390 stdinBufRead = 0;
@@ -404,5 +403,5 @@ QProcessPrivate::~QProcessPrivate()
404{ 403{
405#if defined(QT_QPROCESS_DEBUG) 404#if defined(QT_QPROCESS_DEBUG)
406 qDebug( "QProcessPrivate: Destructor" ); 405 odebug << "QProcessPrivate: Destructor" << oendl;
407#endif 406#endif
408 407
@@ -600,5 +599,5 @@ bool QProcess::start( QStringList *env )
600{ 599{
601#if defined(QT_QPROCESS_DEBUG) 600#if defined(QT_QPROCESS_DEBUG)
602 qDebug( "QProcess::start()" ); 601 odebug << "QProcess::start()" << oendl;
603#endif 602#endif
604 reset(); 603 reset();
@@ -636,5 +635,5 @@ bool QProcess::start( QStringList *env )
636 arglist[i] = arglistQ[i]; 635 arglist[i] = arglistQ[i];
637#if defined(QT_QPROCESS_DEBUG) 636#if defined(QT_QPROCESS_DEBUG)
638 qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] ); 637 odebug << "QProcess::start(): arg " << i << " = " << arglist[i] << "" << oendl;
639#endif 638#endif
640 i++; 639 i++;
@@ -800,5 +799,5 @@ bool QProcess::start( QStringList *env )
800error: 799error:
801#if defined(QT_QPROCESS_DEBUG) 800#if defined(QT_QPROCESS_DEBUG)
802 qDebug( "QProcess::start(): error starting process" ); 801 odebug << "QProcess::start(): error starting process" << oendl;
803#endif 802#endif
804 if ( d->procManager ) 803 if ( d->procManager )
@@ -879,5 +878,5 @@ bool QProcess::isRunning() const
879 if ( d->exitValuesCalculated ) { 878 if ( d->exitValuesCalculated ) {
880#if defined(QT_QPROCESS_DEBUG) 879#if defined(QT_QPROCESS_DEBUG)
881 qDebug( "QProcess::isRunning(): FALSE (already computed)" ); 880 odebug << "QProcess::isRunning(): FALSE (already computed)" << oendl;
882#endif 881#endif
883 return FALSE; 882 return FALSE;
@@ -896,10 +895,10 @@ bool QProcess::isRunning() const
896 d->exitValuesCalculated = TRUE; 895 d->exitValuesCalculated = TRUE;
897#if defined(QT_QPROCESS_DEBUG) 896#if defined(QT_QPROCESS_DEBUG)
898 qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid ); 897 odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): FALSE" << oendl;
899#endif 898#endif
900 return FALSE; 899 return FALSE;
901 } 900 }
902#if defined(QT_QPROCESS_DEBUG) 901#if defined(QT_QPROCESS_DEBUG)
903 qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid ); 902 odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): TRUE" << oendl;
904#endif 903#endif
905 return TRUE; 904 return TRUE;
@@ -921,5 +920,5 @@ void QProcess::writeToStdin( const QByteArray& buf )
921{ 920{
922#if defined(QT_QPROCESS_DEBUG) 921#if defined(QT_QPROCESS_DEBUG)
923// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin ); 922// odebug << "QProcess::writeToStdin(): write to stdin (" << d->socketStdin << ")" << oendl;
924#endif 923#endif
925 d->stdinBuf.enqueue( new QByteArray(buf) ); 924 d->stdinBuf.enqueue( new QByteArray(buf) );
@@ -948,8 +947,8 @@ void QProcess::closeStdin()
948 d->notifierStdin = 0; 947 d->notifierStdin = 0;
949 if ( ::close( d->proc->socketStdin ) != 0 ) { 948 if ( ::close( d->proc->socketStdin ) != 0 ) {
950 qWarning( "Could not close stdin of child process" ); 949 owarn << "Could not close stdin of child process" << oendl;
951 } 950 }
952#if defined(QT_QPROCESS_DEBUG) 951#if defined(QT_QPROCESS_DEBUG)
953 qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin ); 952 odebug << "QProcess::closeStdin(): stdin (" << d->proc->socketStdin << ") closed" << oendl;
954#endif 953#endif
955 d->proc->socketStdin = 0; 954 d->proc->socketStdin = 0;
@@ -971,5 +970,5 @@ void QProcess::socketRead( int fd )
971 } 970 }
972#if defined(QT_QPROCESS_DEBUG) 971#if defined(QT_QPROCESS_DEBUG)
973 qDebug( "QProcess::socketRead(): %d", fd ); 972 odebug << "QProcess::socketRead(): " << fd << "" << oendl;
974#endif 973#endif
975 if ( fd == 0 ) 974 if ( fd == 0 )
@@ -1000,5 +999,5 @@ void QProcess::socketRead( int fd )
1000 if ( fd == d->proc->socketStdout ) { 999 if ( fd == d->proc->socketStdout ) {
1001#if defined(QT_QPROCESS_DEBUG) 1000#if defined(QT_QPROCESS_DEBUG)
1002 qDebug( "QProcess::socketRead(): stdout (%d) closed", fd ); 1001 odebug << "QProcess::socketRead(): stdout (" << fd << ") closed" << oendl;
1003#endif 1002#endif
1004 d->notifierStdout->setEnabled( FALSE ); 1003 d->notifierStdout->setEnabled( FALSE );
@@ -1010,5 +1009,5 @@ void QProcess::socketRead( int fd )
1010 } else if ( fd == d->proc->socketStderr ) { 1009 } else if ( fd == d->proc->socketStderr ) {
1011#if defined(QT_QPROCESS_DEBUG) 1010#if defined(QT_QPROCESS_DEBUG)
1012 qDebug( "QProcess::socketRead(): stderr (%d) closed", fd ); 1011 odebug << "QProcess::socketRead(): stderr (" << fd << ") closed" << oendl;
1013#endif 1012#endif
1014 d->notifierStderr->setEnabled( FALSE ); 1013 d->notifierStderr->setEnabled( FALSE );
@@ -1062,5 +1061,5 @@ void QProcess::socketWrite( int fd )
1062 } 1061 }
1063#if defined(QT_QPROCESS_DEBUG) 1062#if defined(QT_QPROCESS_DEBUG)
1064 qDebug( "QProcess::socketWrite(): write to stdin (%d)", fd ); 1063 odebug << "QProcess::socketWrite(): write to stdin (" << fd << ")" << oendl;
1065#endif 1064#endif
1066 ssize_t ret = ::write( fd, 1065 ssize_t ret = ::write( fd,
diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp
index 2e9d2a9..a25963f 100644
--- a/core/launcher/runningappbar.cpp
+++ b/core/launcher/runningappbar.cpp
@@ -21,13 +21,17 @@
21#define QTOPIA_INTERNAL_PRELOADACCESS 21#define QTOPIA_INTERNAL_PRELOADACCESS
22 22
23#include "runningappbar.h"
24#include "serverinterface.h"
23 25
24#include <stdlib.h> 26/* OPIE */
27#include <opie2/odebug.h>
28#include <qtopia/qcopenvelope_qws.h>
29using namespace Opie::Core;
25 30
31/* QT */
26#include <qpainter.h> 32#include <qpainter.h>
27 33
28#include <qtopia/qcopenvelope_qws.h> 34/* STD */
29 35#include <stdlib.h>
30#include "runningappbar.h"
31#include "serverinterface.h"
32 36
33RunningAppBar::RunningAppBar(QWidget* parent) 37RunningAppBar::RunningAppBar(QWidget* parent)
@@ -52,5 +56,5 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
52 QString appName; 56 QString appName;
53 stream >> appName; 57 stream >> appName;
54 // qDebug("fastAppShowing %s", appName.data() ); 58 // odebug << "fastAppShowing " << appName.data() << "" << oendl;
55 const AppLnk* f = ServerInterface::appLnks().findExec(appName); 59 const AppLnk* f = ServerInterface::appLnks().findExec(appName);
56 if ( f ) addTask(*f); 60 if ( f ) addTask(*f);
@@ -64,5 +68,5 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
64 68
65void RunningAppBar::addTask(const AppLnk& appLnk) { 69void RunningAppBar::addTask(const AppLnk& appLnk) {
66 qDebug("Added %s to app list.", appLnk.name().latin1()); 70 odebug << "Added " << appLnk.name() << " to app list." << oendl;
67 AppLnk* newApp = new AppLnk(appLnk); 71 AppLnk* newApp = new AppLnk(appLnk);
68 newApp->setExec(appLnk.exec()); 72 newApp->setExec(appLnk.exec());
@@ -76,5 +80,5 @@ void RunningAppBar::removeTask(const AppLnk& appLnk) {
76 AppLnk* target = appList.at(i); 80 AppLnk* target = appList.at(i);
77 if (target->exec() == appLnk.exec()) { 81 if (target->exec() == appLnk.exec()) {
78 qDebug("Removing %s from app list.", appLnk.name().latin1()); 82 odebug << "Removing " << appLnk.name() << " from app list." << oendl;
79 appList.remove(); 83 appList.remove();
80 delete target; 84 delete target;
@@ -136,5 +140,5 @@ void RunningAppBar::paintEvent( QPaintEvent * )
136 if ( x + spacing <= width() ) { 140 if ( x + spacing <= width() ) {
137 curApp = it.current(); 141 curApp = it.current();
138 qWarning("Drawing %s", curApp->name().latin1() ); 142 owarn << "Drawing " << curApp->name() << "" << oendl;
139 if ( (int)i == selectedAppIndex ) 143 if ( (int)i == selectedAppIndex )
140 p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() ); 144 p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() );
@@ -154,5 +158,5 @@ QSize RunningAppBar::sizeHint() const
154void RunningAppBar::applicationLaunched(const QString &appName) 158void RunningAppBar::applicationLaunched(const QString &appName)
155{ 159{
156 qDebug("desktop:: app: %s launched with pid ", appName.data() ); 160 odebug << "desktop:: app: " << appName.data() << " launched with pid " << oendl;
157 const AppLnk* newGuy = ServerInterface::appLnks().findExec(appName); 161 const AppLnk* newGuy = ServerInterface::appLnks().findExec(appName);
158 if ( newGuy && !newGuy->isPreloaded() ) { 162 if ( newGuy && !newGuy->isPreloaded() ) {
diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp
index 6aaab3a..a7d23c4 100644
--- a/core/launcher/screensaver.cpp
+++ b/core/launcher/screensaver.cpp
@@ -159,5 +159,5 @@ void OpieScreenSaver::setIntervals ( int dim, int lightoff, int suspend )
159 } 159 }
160 160
161 //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend); 161 //odebug << "screen saver intervals: " << dim << " " << lightoff << " " << suspend << "" << oendl;
162 162
163 v [ 0 ] = QMAX( 1000 * dim, 100 ); 163 v [ 0 ] = QMAX( 1000 * dim, 100 );
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 9a86a80..b9fa1e5 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -37,4 +37,8 @@
37#include "documentlist.h" 37#include "documentlist.h"
38 38
39/* OPIE */
40#include <opie2/odebug.h>
41#include <opie2/odevicebutton.h>
42#include <opie2/odevice.h>
39#include <qtopia/applnk.h> 43#include <qtopia/applnk.h>
40#include <qtopia/private/categories.h> 44#include <qtopia/private/categories.h>
@@ -44,26 +48,22 @@
44#include <qtopia/version.h> 48#include <qtopia/version.h>
45#include <qtopia/storage.h> 49#include <qtopia/storage.h>
46
47#include <qtopia/qcopenvelope_qws.h> 50#include <qtopia/qcopenvelope_qws.h>
48#include <qwindowsystem_qws.h>
49#include <qgfx_qws.h>
50#include <qtopia/global.h> 51#include <qtopia/global.h>
51//#include <qtopia/custom.h> 52using namespace Opie::Core;
52
53#include <opie2/odevicebutton.h>
54#include <opie2/odevice.h>
55 53
56#include <unistd.h> 54/* QT */
57#include <qmainwindow.h> 55#include <qmainwindow.h>
58#include <qmessagebox.h> 56#include <qmessagebox.h>
59#include <qtimer.h> 57#include <qtimer.h>
60#include <qtextstream.h> 58#include <qtextstream.h>
59#include <qwindowsystem_qws.h>
60#include <qgfx_qws.h>
61 61
62/* STD */
63#include <unistd.h>
62#include <stdlib.h> 64#include <stdlib.h>
63 65
64extern QRect qt_maxWindowRect; 66extern QRect qt_maxWindowRect;
65 67
66
67using namespace Opie::Core;
68static QWidget *calibrate(bool) 68static QWidget *calibrate(bool)
69{ 69{
@@ -330,5 +330,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
330 QString link; 330 QString link;
331 stream >> link; 331 stream >> link;
332 qDebug( "desktop.cpp systemMsg -> linkchanged( %s )", link.latin1() ); 332 odebug << "desktop.cpp systemMsg -> linkchanged( " << link << " )" << oendl;
333 docList->linkChanged(link); 333 docList->linkChanged(link);
334 } else if ( msg == "serviceChanged(QString)" ) { 334 } else if ( msg == "serviceChanged(QString)" ) {
@@ -435,5 +435,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
435 cfg.setGroup("SyncDate"); 435 cfg.setGroup("SyncDate");
436 cfg.writeEntry( app, date ); 436 cfg.writeEntry( app, date );
437 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1()); 437 //odebug << "setSyncDate(QString,QString) " << app << " " << date << "" << oendl;
438 } else if ( msg == "startSync(QString)" ) { 438 } else if ( msg == "startSync(QString)" ) {
439 QString what; 439 QString what;
@@ -573,5 +573,5 @@ bool Server::mkdir(const QString &localPath)
573 // didn't find any seps; weird, use the cur dir instead 573 // didn't find any seps; weird, use the cur dir instead
574 if (dirIndex == -1) { 574 if (dirIndex == -1) {
575 //qDebug("No seperators found in path %s", localPath.latin1()); 575 //odebug << "No seperators found in path " << localPath << "" << oendl;
576 checkedPath = QDir::currentDirPath(); 576 checkedPath = QDir::currentDirPath();
577 } 577 }
@@ -590,8 +590,8 @@ bool Server::mkdir(const QString &localPath)
590 QDir checkDir(checkedPath); 590 QDir checkDir(checkedPath);
591 if (!checkDir.exists()) { 591 if (!checkDir.exists()) {
592 //qDebug("mkdir making dir %s", checkedPath.latin1()); 592 //odebug << "mkdir making dir " << checkedPath << "" << oendl;
593 593
594 if (!checkDir.mkdir(checkedPath)) { 594 if (!checkDir.mkdir(checkedPath)) {
595 qDebug("Unable to make directory %s", checkedPath.latin1()); 595 odebug << "Unable to make directory " << checkedPath << "" << oendl;
596 return FALSE; 596 return FALSE;
597 } 597 }
@@ -671,5 +671,5 @@ void Server::terminateServers()
671void Server::syncConnectionClosed( const QHostAddress & ) 671void Server::syncConnectionClosed( const QHostAddress & )
672{ 672{
673 qDebug( "Lost sync connection" ); 673 odebug << "Lost sync connection" << oendl;
674 delete syncDialog; 674 delete syncDialog;
675 syncDialog = 0; 675 syncDialog = 0;
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index e4e16f2..cf543ce 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -20,7 +20,9 @@
20 20
21#include "serverapp.h" 21#include "serverapp.h"
22#include "screensaver.h"
22 23
24/* OPIE */
25#include <opie2/odebug.h>
23#include <opie2/odevice.h> 26#include <opie2/odevice.h>
24
25#include <qtopia/password.h> 27#include <qtopia/password.h>
26#include <qtopia/config.h> 28#include <qtopia/config.h>
@@ -31,15 +33,10 @@
31#endif 33#endif
32#include <qtopia/global.h> 34#include <qtopia/global.h>
33//#include <qtopia/custom.h> 35using namespace Opie::Core;
34 36
37/* QT */
35#ifdef Q_WS_QWS 38#ifdef Q_WS_QWS
36#include <qgfx_qws.h> 39#include <qgfx_qws.h>
37#endif 40#endif
38#ifdef Q_OS_WIN32
39#include <io.h>
40#include <process.h>
41#else
42#include <unistd.h>
43#endif
44#include <qmessagebox.h> 41#include <qmessagebox.h>
45#include <qtimer.h> 42#include <qtimer.h>
@@ -48,13 +45,16 @@
48#include <qpixmapcache.h> 45#include <qpixmapcache.h>
49 46
47/* STD */
48#ifdef Q_OS_WIN32
49#include <io.h>
50#include <process.h>
51#else
52#include <unistd.h>
53#endif
50#include <stdlib.h> 54#include <stdlib.h>
51#include "screensaver.h"
52 55
53static ServerApplication *serverApp = 0; 56static ServerApplication *serverApp = 0;
54static int loggedin=0; 57static int loggedin=0;
55 58
56using namespace Opie;
57
58using namespace Opie::Core;
59QCopKeyRegister::QCopKeyRegister() 59QCopKeyRegister::QCopKeyRegister()
60 : m_keyCode( 0 ) { 60 : m_keyCode( 0 ) {
@@ -857,5 +857,5 @@ int ServerApplication::exec()
857{ 857{
858 ms_is_starting = true; 858 ms_is_starting = true;
859 qDebug("Serverapp - exec"); 859 odebug << "Serverapp - exec" << oendl;
860 return QPEApplication::exec(); 860 return QPEApplication::exec();
861} 861}
diff --git a/core/launcher/suspendmonitor.cpp b/core/launcher/suspendmonitor.cpp
index f555e84..50bc56f 100644
--- a/core/launcher/suspendmonitor.cpp
+++ b/core/launcher/suspendmonitor.cpp
@@ -51,5 +51,5 @@ void TempScreenSaverMonitor::setTempMode(int mode, int pid)
51 break; 51 break;
52 default: 52 default:
53 qWarning("Unrecognized temp power setting. Ignored"); 53 owarn << "Unrecognized temp power setting. Ignored" << oendl;
54 return; 54 return;
55 } 55 }
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 6cc1446..3c72d25 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -19,22 +19,20 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "systray.h"
22
23/* OPIE */
24#include <opie2/odebug.h>
21#include <qtopia/qpeapplication.h> 25#include <qtopia/qpeapplication.h>
22#include <qtopia/qlibrary.h> 26#include <qtopia/qlibrary.h>
23#include <qtopia/config.h> 27#include <qtopia/config.h>
28using namespace Opie::Core;
24 29
30/* QT */
25#include <qlayout.h> 31#include <qlayout.h>
26#include <qdir.h> 32#include <qdir.h>
27 33
28#include "systray.h" 34/* STD */
29
30#include <stdlib.h> 35#include <stdlib.h>
31 36
32/* ### Single build floppies ### */
33#if 0
34#ifdef QT_NO_COMPONENTS
35#include "../plugins/applets/clockapplet/clockappletimpl.h"
36#endif
37#endif
38
39SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) 37SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0)
40{ 38{
@@ -113,5 +111,5 @@ void SysTray::addApplets()
113 if ( exclude.find( *it ) != exclude.end() ) 111 if ( exclude.find( *it ) != exclude.end() )
114 continue; 112 continue;
115 qWarning( "Found Applet: %s", (*it).latin1() ); 113 owarn << "Found Applet: " << (*it) << "" << oendl;
116 TaskbarAppletInterface *iface = 0; 114 TaskbarAppletInterface *iface = 0;
117 QLibrary *lib = new QLibrary( path + "/" + *it ); 115 QLibrary *lib = new QLibrary( path + "/" + *it );
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 91e2f20..86e0d0d 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -29,4 +29,6 @@
29#include "server.h" 29#include "server.h"
30 30
31/* OPIE */
32#include <opie2/odebug.h>
31#include <qtopia/config.h> 33#include <qtopia/config.h>
32#include <qtopia/qpeapplication.h> 34#include <qtopia/qpeapplication.h>
@@ -35,6 +37,7 @@
35#endif 37#endif
36#include <qtopia/global.h> 38#include <qtopia/global.h>
37//#include <qtopia/custom.h> 39using namespace Opie::Core;
38 40
41/* QT */
39#include <qlabel.h> 42#include <qlabel.h>
40#include <qlayout.h> 43#include <qlayout.h>
@@ -286,5 +289,5 @@ void TaskBar::resizeEvent( QResizeEvent *e )
286 sysTray->show(); 289 sysTray->show();
287 290
288 qWarning("TaskBar::resize event"); 291 owarn << "TaskBar::resize event" << oendl;
289} 292}
290 293
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index e32cf41..4b764e3 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -18,9 +18,23 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20//#define _XOPEN_SOURCE 20#include "transferserver.h"
21 21
22/* OPIE */
23#include <opie2/odebug.h>
22#include <opie2/oglobal.h> 24#include <opie2/oglobal.h>
25#include <qtopia/qprocess.h>
26#include <qtopia/process.h>
27#include <qtopia/private/contact.h>
28#include <qtopia/version.h>
29#ifdef Q_WS_QWS
30#include <qtopia/qcopenvelope_qws.h>
31#endif
32using namespace Opie::Core;
23 33
24#ifndef Q_OS_WIN32 34/* QT */
35#include <qtextstream.h>
36#include <qmessagebox.h>
37
38/* STD */
25#include <pwd.h> 39#include <pwd.h>
26#include <sys/types.h> 40#include <sys/types.h>
@@ -34,31 +48,6 @@
34#endif /* Q_OS_MACX */ 48#endif /* Q_OS_MACX */
35 49
36#else
37#include <stdlib.h>
38#include <time.h>
39#endif
40
41
42#if defined(_OS_LINUX_)
43#include <shadow.h>
44#endif
45
46#include <qtextstream.h>
47#include <qmessagebox.h>
48//#include <qtopia/qcopchannel_qws.h>
49#include <qtopia/process.h>
50#include <qtopia/private/contact.h>
51#include <qtopia/version.h>
52#ifdef Q_WS_QWS
53#include <qtopia/qcopenvelope_qws.h>
54#endif
55
56
57#include "transferserver.h"
58#include <qtopia/qprocess.h>
59
60const int block_size = 51200; 50const int block_size = 51200;
61 51
62using namespace Opie::Core;
63TransferServer::TransferServer( Q_UINT16 port, QObject *parent, 52TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
64 const char* name) 53 const char* name)
@@ -67,5 +56,5 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
67 connections.setAutoDelete( TRUE ); 56 connections.setAutoDelete( TRUE );
68 if ( !ok() ) 57 if ( !ok() )
69 qWarning( "Failed to bind to port %d", port ); 58 owarn << "Failed to bind to port " << port << "" << oendl;
70} 59}
71 60
@@ -372,5 +361,5 @@ bool ServerPI::verifyAuthorised()
372void ServerPI::connectionClosed() 361void ServerPI::connectionClosed()
373{ 362{
374 // qDebug( "Debug: Connection closed" ); 363 // odebug << "Debug: Connection closed" << oendl;
375 emit connectionClosed(this); 364 emit connectionClosed(this);
376} 365}
@@ -380,5 +369,5 @@ void ServerPI::send( const QString& msg )
380 QTextStream os( this ); 369 QTextStream os( this );
381 os << msg << endl; 370 os << msg << endl;
382 //qDebug( "Reply: %s", msg.latin1() ); 371 //odebug << "Reply: " << msg << "" << oendl;
383} 372}
384 373
@@ -421,5 +410,5 @@ bool ServerPI::checkWriteFile( const QString& file )
421void ServerPI::process( const QString& message ) 410void ServerPI::process( const QString& message )
422{ 411{
423 //qDebug( "Command: %s", message.latin1() ); 412 //odebug << "Command: " << message << "" << oendl;
424 413
425 // split message using "," as separator 414 // split message using "," as separator
@@ -445,5 +434,5 @@ void ServerPI::process( const QString& message )
445 } 434 }
446 435
447 //qDebug( "args: %s", args.latin1() ); 436 //odebug << "args: " << args << "" << oendl;
448 437
449 // we always respond to QUIT, regardless of state 438 // we always respond to QUIT, regardless of state
@@ -584,5 +573,5 @@ void ServerPI::process( const QString& message )
584 } 573 }
585 else { 574 else {
586 qDebug("550 Requested action not taken"); 575 odebug << "550 Requested action not taken" << oendl;
587 send( "550 Requested action not taken" ); // No tr 576 send( "550 Requested action not taken" ); // No tr
588 } 577 }
@@ -690,5 +679,5 @@ void ServerPI::process( const QString& message )
690 else if ( cmd == "MKD" ) { 679 else if ( cmd == "MKD" ) {
691 if ( args.isEmpty() ) { 680 if ( args.isEmpty() ) {
692 qDebug(" Error: no arg"); 681 odebug << " Error: no arg" << oendl;
693 send( "500 Syntax error, command unrecognized" ); // No tr 682 send( "500 Syntax error, command unrecognized" ); // No tr
694 } 683 }
@@ -730,5 +719,5 @@ void ServerPI::process( const QString& message )
730 QString in, out; 719 QString in, out;
731 if ( !duproc.exec(in, out) ) { 720 if ( !duproc.exec(in, out) ) {
732 qDebug("du process failed; just sending back 1K"); 721 odebug << "du process failed; just sending back 1K" << oendl;
733 send( "213 1024"); 722 send( "213 1024");
734 } 723 }
@@ -738,5 +727,5 @@ void ServerPI::process( const QString& message )
738 if ( filePath.contains("doc") ) // No tr 727 if ( filePath.contains("doc") ) // No tr
739 guess *= 1000; 728 guess *= 1000;
740 qDebug("sending back gzip guess of %d", guess); 729 odebug << "sending back gzip guess of " << guess << "" << oendl;
741 send( "213 " + QString::number(guess) ); 730 send( "213 " + QString::number(guess) );
742 } 731 }
@@ -1027,5 +1016,5 @@ QString ServerPI::permissionString( QFileInfo *info )
1027void ServerPI::newConnection( int socket ) 1016void ServerPI::newConnection( int socket )
1028{ 1017{
1029 //qDebug( "New incomming connection" ); 1018 //odebug << "New incomming connection" << oendl;
1030 1019
1031 if ( !passiv ) return; 1020 if ( !passiv ) return;
@@ -1040,5 +1029,5 @@ void ServerPI::newConnection( int socket )
1040 } 1029 }
1041 else if ( wait[RetrieveFile] ) { 1030 else if ( wait[RetrieveFile] ) {
1042 qDebug("check retrieve file"); 1031 odebug << "check retrieve file" << oendl;
1043 if ( backupRestoreGzip( waitfile ) ) 1032 if ( backupRestoreGzip( waitfile ) )
1044 dtp->retrieveGzipFile( waitfile ); 1033 dtp->retrieveGzipFile( waitfile );
@@ -1052,5 +1041,5 @@ void ServerPI::newConnection( int socket )
1052 } 1041 }
1053 else if ( wait[RetrieveByteArray] ) { 1042 else if ( wait[RetrieveByteArray] ) {
1054 qDebug("retrieve byte array"); 1043 odebug << "retrieve byte array" << oendl;
1055 dtp->retrieveByteArray(); 1044 dtp->retrieveByteArray();
1056 dtp->setSocket( socket ); 1045 dtp->setSocket( socket );
@@ -1112,5 +1101,5 @@ ServerDTP::~ServerDTP()
1112 file.close(); 1101 file.close();
1113 if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) { 1102 if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) {
1114 qDebug( "STOR incomplete" ); 1103 odebug << "STOR incomplete" << oendl;
1115 file.remove(); 1104 file.remove();
1116 } 1105 }
@@ -1123,5 +1112,5 @@ ServerDTP::~ServerDTP()
1123void ServerDTP::extractTarDone() 1112void ServerDTP::extractTarDone()
1124{ 1113{
1125 qDebug("extract done"); 1114 odebug << "extract done" << oendl;
1126#ifndef QT_NO_COP 1115#ifndef QT_NO_COP
1127 QCopEnvelope e( "QPE/System", "restoreDone(QString)" ); 1116 QCopEnvelope e( "QPE/System", "restoreDone(QString)" );
@@ -1141,5 +1130,5 @@ void ServerDTP::connected()
1141 } 1130 }
1142 1131
1143 //qDebug( "Debug: Sending file '%s'", file.name().latin1() ); 1132 //odebug << "Debug: Sending file '" << file.name() << "'" << oendl;
1144 1133
1145 bytes_written = 0; 1134 bytes_written = 0;
@@ -1162,10 +1151,10 @@ void ServerDTP::connected()
1162 if ( createTargzProc->isRunning() ) { 1151 if ( createTargzProc->isRunning() ) {
1163 // SHOULDN'T GET HERE, BUT DOING A SAFETY CHECK ANYWAY 1152 // SHOULDN'T GET HERE, BUT DOING A SAFETY CHECK ANYWAY
1164 qWarning("Previous tar --gzip process is still running; killing it..."); 1153 owarn << "Previous tar --gzip process is still running; killing it..." << oendl;
1165 createTargzProc->kill(); 1154 createTargzProc->kill();
1166 } 1155 }
1167 1156
1168 bytes_written = 0; 1157 bytes_written = 0;
1169 qDebug("==>start send tar process"); 1158 odebug << "==>start send tar process" << oendl;
1170 if ( !createTargzProc->start() ) 1159 if ( !createTargzProc->start() )
1171 qWarning("Error starting %s", 1160 qWarning("Error starting %s",
@@ -1179,5 +1168,5 @@ void ServerDTP::connected()
1179 } 1168 }
1180 1169
1181 // qDebug( "Debug: Sending byte array" ); 1170 // odebug << "Debug: Sending byte array" << oendl;
1182 bytes_written = 0; 1171 bytes_written = 0;
1183 while( !buf.atEnd() ) 1172 while( !buf.atEnd() )
@@ -1198,8 +1187,8 @@ void ServerDTP::connected()
1198 return; 1187 return;
1199 } 1188 }
1200 // qDebug( "Debug: Retrieving file %s", file.name().latin1() ); 1189 // odebug << "Debug: Retrieving file " << file.name() << "" << oendl;
1201 break; 1190 break;
1202 case RetrieveGzipFile: 1191 case RetrieveGzipFile:
1203 qDebug("=-> starting tar process to receive .tgz file"); 1192 odebug << "=-> starting tar process to receive .tgz file" << oendl;
1204 break; 1193 break;
1205 case RetrieveBuffer: 1194 case RetrieveBuffer:
@@ -1210,8 +1199,8 @@ void ServerDTP::connected()
1210 return; 1199 return;
1211 } 1200 }
1212 // qDebug( "Debug: Retrieving byte array" ); 1201 // odebug << "Debug: Retrieving byte array" << oendl;
1213 break; 1202 break;
1214 case Idle: 1203 case Idle:
1215 qDebug("connection established but mode set to Idle; BUG!"); 1204 odebug << "connection established but mode set to Idle; BUG!" << oendl;
1216 break; 1205 break;
1217 } 1206 }
@@ -1220,5 +1209,5 @@ void ServerDTP::connected()
1220void ServerDTP::connectionClosed() 1209void ServerDTP::connectionClosed()
1221{ 1210{
1222 //qDebug( "Debug: Data connection closed %ld bytes written", bytes_written ); 1211 //odebug << "Debug: Data connection closed " << bytes_written << " bytes written" << oendl;
1223 1212
1224 // send file mode 1213 // send file mode
@@ -1242,5 +1231,5 @@ void ServerDTP::connectionClosed()
1242 file.close(); 1231 file.close();
1243 if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) { 1232 if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) {
1244 qDebug( "STOR incomplete" ); 1233 odebug << "STOR incomplete" << oendl;
1245 file.remove(); 1234 file.remove();
1246 emit failed(); 1235 emit failed();
@@ -1251,5 +1240,5 @@ void ServerDTP::connectionClosed()
1251 1240
1252 else if ( RetrieveGzipFile == mode ) { 1241 else if ( RetrieveGzipFile == mode ) {
1253 qDebug("Done writing ungzip file; closing input"); 1242 odebug << "Done writing ungzip file; closing input" << oendl;
1254 retrieveTargzProc->flushStdin(); 1243 retrieveTargzProc->flushStdin();
1255 retrieveTargzProc->closeStdin(); 1244 retrieveTargzProc->closeStdin();
@@ -1273,5 +1262,5 @@ void ServerDTP::bytesWritten( int bytes )
1273 1262
1274 if ( bytes_written == file.size() ) { 1263 if ( bytes_written == file.size() ) {
1275 // qDebug( "Debug: Sending complete: %d bytes", file.size() ); 1264 // odebug << "Debug: Sending complete: " << file.size() << " bytes" << oendl;
1276 file.close(); 1265 file.close();
1277 emit completed(); 1266 emit completed();
@@ -1290,5 +1279,5 @@ void ServerDTP::bytesWritten( int bytes )
1290 1279
1291 if ( bytes_written == buf.size() ) { 1280 if ( bytes_written == buf.size() ) {
1292 // qDebug( "Debug: Sending complete: %d bytes", buf.size() ); 1281 // odebug << "Debug: Sending complete: " << buf.size() << " bytes" << oendl;
1293 emit completed(); 1282 emit completed();
1294 mode = Idle; 1283 mode = Idle;
@@ -1314,5 +1303,5 @@ void ServerDTP::readyRead()
1314 readBlock( s.data(), bytesAvailable() ); 1303 readBlock( s.data(), bytesAvailable() );
1315 retrieveTargzProc->writeToStdin( s ); 1304 retrieveTargzProc->writeToStdin( s );
1316 qDebug("wrote %d bytes to ungzip ", s.size() ); 1305 odebug << "wrote " << s.size() << " bytes to ungzip " << oendl;
1317 } 1306 }
1318 // retrieve buffer mode 1307 // retrieve buffer mode
@@ -1329,10 +1318,10 @@ void ServerDTP::writeTargzBlock()
1329 QByteArray block = createTargzProc->readStdout(); 1318 QByteArray block = createTargzProc->readStdout();
1330 writeBlock( block.data(), block.size() ); 1319 writeBlock( block.data(), block.size() );
1331 qDebug("writeTargzBlock %d", block.size()); 1320 odebug << "writeTargzBlock " << block.size() << "" << oendl;
1332} 1321}
1333 1322
1334void ServerDTP::targzDone() 1323void ServerDTP::targzDone()
1335{ 1324{
1336 qDebug("tar and gzip done"); 1325 odebug << "tar and gzip done" << oendl;
1337 emit completed(); 1326 emit completed();
1338 mode = Idle; 1327 mode = Idle;
@@ -1371,5 +1360,5 @@ void ServerDTP::sendGzipFile( const QString &fn,
1371 //args += "-cv"; 1360 //args += "-cv";
1372 args += archiveTargets; 1361 args += archiveTargets;
1373 qDebug("sendGzipFile %s", args.join(" ").latin1() ); 1362 odebug << "sendGzipFile " << args.join(" ") << "" << oendl;
1374 createTargzProc->setArguments( args ); 1363 createTargzProc->setArguments( args );
1375 connect( createTargzProc, 1364 connect( createTargzProc,
@@ -1394,5 +1383,5 @@ void ServerDTP::retrieveFile( const QString fn, int fileSize )
1394void ServerDTP::retrieveGzipFile( const QString &fn ) 1383void ServerDTP::retrieveGzipFile( const QString &fn )
1395{ 1384{
1396 qDebug("retrieveGzipFile %s", fn.latin1()); 1385 odebug << "retrieveGzipFile " << fn << "" << oendl;
1397 file.setName( fn ); 1386 file.setName( fn );
1398 mode = RetrieveGzipFile; 1387 mode = RetrieveGzipFile;