summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
committer mickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
commit4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (side-by-side diff)
tree59b4879b1065086c9a2e28f16f7d48540c8a9456
parent8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff)
downloadopie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2
use Opie debugging framework
Diffstat (more/less context) (show 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 @@
#define QTOPIA_PROGRAM_MONITOR
#endif
+
+#include "applauncher.h"
+#include "documentlist.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/oglobal.h>
+#include <qtopia/qcopenvelope_qws.h>
+#include <qtopia/qpeapplication.h>
+using namespace Opie::Core;
-#ifndef Q_OS_WIN32
+/* QT */
+#include <qtimer.h>
+#include <qwindowsystem_qws.h>
+#include <qmessagebox.h>
+#include <qfileinfo.h>
+
+/* STD */
#include <sys/stat.h>
#include <sys/wait.h>
@@ -38,26 +53,8 @@
#include <sys/resource.h>
#include <errno.h>
-#else
-#include <process.h>
-#include <windows.h>
-#include <winbase.h>
-#endif
-
#include <signal.h>
#include <sys/types.h>
#include <stdlib.h>
-#include <qtimer.h>
-#include <qwindowsystem_qws.h>
-#include <qmessagebox.h>
-#include <qfileinfo.h>
-
-#include <qtopia/qcopenvelope_qws.h>
-#include <qtopia/qpeapplication.h>
-
-#include "applauncher.h"
-#include "documentlist.h"
-
-using namespace Opie::Core;
const int AppLauncher::RAISE_TIMEOUT_MS = 5000;
@@ -128,5 +125,5 @@ AppLauncher::~AppLauncher()
void AppLauncher::newQcopChannel(const QString& channelName)
{
-// qDebug("channel %s added", channelName.data() );
+// odebug << "channel " << channelName.data() << " added" << oendl;
QString prefix("QPE/Application/");
if (channelName.startsWith(prefix)) {
@@ -142,5 +139,5 @@ void AppLauncher::newQcopChannel(const QString& channelName)
}
} else if (channelName.startsWith("QPE/QuickLauncher-")) {
- qDebug("Registered %s", channelName.latin1());
+ odebug << "Registered " << channelName << "" << oendl;
int pid = channelName.mid(18).toInt();
if (pid == qlPid)
@@ -181,5 +178,5 @@ void AppLauncher::received(const QCString& msg, const QByteArray& data)
if ( !executeBuiltin( appName, QString::null ) ) {
if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) {
- //qDebug( "Raising: %s", appName.latin1() );
+ //odebug << "Raising: " << appName << "" << oendl;
QCString channel = "QPE/Application/";
channel += appName.latin1();
@@ -218,5 +215,5 @@ void AppLauncher::received(const QCString& msg, const QByteArray& data)
QString appName;
stream >> appName;
- qDebug("Got a heartbeat from %s", appName.latin1());
+ odebug << "Got a heartbeat from " << appName << "" << oendl;
QMap<QString,int>::Iterator it = waitingHeartbeat.find(appName);
if ( it != waitingHeartbeat.end() ) {
@@ -241,10 +238,10 @@ void AppLauncher::signalHandler(int)
pid_t pid = waitpid(-1, &status, WNOHANG);
/* if (pid == 0 || &status == 0 ) {
- qDebug("hmm, could not get return value from signal");
+ odebug << "hmm, could not get return value from signal" << oendl;
}
*/
QApplication::postEvent(appLauncherPtr, new AppStoppedEvent(pid, status) );
#else
- qDebug("Unhandled signal see by AppLauncher::signalHandler(int)");
+ odebug << "Unhandled signal see by AppLauncher::signalHandler(int)" << oendl;
#endif
}
@@ -274,5 +271,5 @@ void AppLauncher::timerEvent( QTimerEvent *e )
waitingHeartbeat.remove( it );
- // qDebug("Checking in on %s", appKillerName.latin1());
+ // odebug << "Checking in on " << appKillerName << "" << oendl;
// We store this incase the application responds while we're
@@ -285,5 +282,5 @@ void AppLauncher::timerEvent( QTimerEvent *e )
QMessageBox::NoButton);
if (appKillerBox->exec() == QMessageBox::Yes) {
- // qDebug("Killing the app!!! Bwuhahahaha!");
+ // odebug << "Killing the app!!! Bwuhahahaha!" << oendl;
int pid = pidForName(appKillerName);
if ( pid > 0 )
@@ -316,5 +313,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
if ( it == runningApps.end() ) {
if ( sigPid == qlPid ) {
- qDebug( "quicklauncher stopped" );
+ odebug << "quicklauncher stopped" << oendl;
qlPid = 0;
qlReady = FALSE;
@@ -324,7 +321,7 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
/*
if ( sigPid == -1 )
- qDebug("non-qtopia application exited (disregarded)");
+ odebug << "non-qtopia application exited (disregarded)" << oendl;
else
- qDebug("==== no pid matching %d in list, definite bug", sigPid);
+ odebug << "==== no pid matching " << sigPid << " in list, definite bug" << oendl;
*/
return;
@@ -370,5 +367,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
// debug info
for (it = runningApps.begin(); it != runningApps.end(); ++it) {
- qDebug("running according to internal list: %s, with pid %d", (*it).data(), it.key() );
+ odebug << "running according to internal list: " << (*it).data() << ", with pid " << it.key() << "" << oendl;
}
*/
@@ -404,5 +401,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
if ( fi.exists() && fi.size() ) {
emit terminated(sigPid, appName);
- qWarning("Re executing obmitted for %s", appName.latin1() );
+ owarn << "Re executing obmitted for " << appName << "" << oendl;
// execute( appName, QString::null );
return;
@@ -418,5 +415,5 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
void AppLauncher::sigStopped(int sigPid, int sigStatus)
{
- qDebug("Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)");
+ odebug << "Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)" << oendl;
}
#endif // Q_OS_WIN32
@@ -429,5 +426,5 @@ bool AppLauncher::isRunning(const QString &app)
pid_t t = ::__getpgid( it.key() );
if ( t == -1 ) {
- qDebug("appLauncher bug, %s believed running, but pid %d is not existing", app.data(), it.key() );
+ odebug << "appLauncher bug, " << app.data() << " believed running, but pid " << it.key() << " is not existing" << oendl;
runningApps.remove( it.key() );
return FALSE;
@@ -482,5 +479,5 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise)
{
- qWarning("AppLauncher::execute '%s' '%s'", (const char*) c, (const char*) docParam );
+ owarn << "AppLauncher::execute '" << c << "' '" << docParam << "'" << oendl;
// Convert the command line in to a list of arguments
QStringList list = QStringList::split(QRegExp(" *"),c);
@@ -549,5 +546,5 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) {
#endif /* Q_OS_MACX */
- qDebug( "Quick launching: %s", args[0] );
+ odebug << "Quick launching: " << args[0] << "" << oendl;
if ( getuid() == 0 )
setpriority( PRIO_PROCESS, qlPid, 0 );
@@ -585,5 +582,5 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
connect(proc, SIGNAL(processExited()), this, SLOT(processExited()));
if (!proc->start()){
- qDebug("Unable to start application %s", args[0]);
+ odebug << "Unable to start application " << args[0] << "" << oendl;
}else{
PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier();
@@ -595,9 +592,9 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
QCopEnvelope e("QPE/System", "busy()");
}else{
- qDebug("Unable to read process inforation #1 for %s", args[0]);
+ odebug << "Unable to read process inforation #1 for " << args[0] << "" << oendl;
}
}
}else{
- qDebug("Unable to create process for application %s", args[0]);
+ odebug << "Unable to create process for application " << args[0] << "" << oendl;
return FALSE;
}
@@ -679,14 +676,14 @@ void AppLauncher::processExited()
{
#ifdef Q_OS_WIN32
- qDebug("AppLauncher::processExited()");
+ odebug << "AppLauncher::processExited()" << oendl;
bool found = FALSE;
QProcess *proc = (QProcess *) sender();
if (!proc){
- qDebug("Interanl error NULL proc");
+ odebug << "Interanl error NULL proc" << oendl;
return;
}
QString appName = proc->arguments()[0];
- qDebug("Removing application %s", appName.latin1());
+ odebug << "Removing application " << appName << "" << oendl;
runningAppsProc.remove(proc);
@@ -715,5 +712,5 @@ void AppLauncher::processExited()
runningApps.remove(it.key());
}else{
- qDebug("Internal error application %s not listed as running", appName.latin1());
+ odebug << "Internal error application " << appName << " not listed as running" << oendl;
}
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 @@
#include "mediadlg.h"
+/* OPIE */
#include <opie2/oglobal.h>
-
+#include <opie2/odebug.h>
#include <qtopia/config.h>
#include <qtopia/mimetype.h>
@@ -34,5 +35,7 @@
#include <qtopia/qcopenvelope_qws.h>
#endif
+using namespace Opie::Core;
+/* QT */
#include <qtimer.h>
#include <qfileinfo.h>
@@ -48,5 +51,4 @@
-using namespace Opie::Core;
AppLnkSet *DocumentList::appLnkSet = 0;
@@ -109,5 +111,5 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/,
cfg.setGroup( "DocTab" );
d->scanDocs = cfg.readBoolEntry( "Enable", true );
- qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs );
+ odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl;
QTimer::singleShot( 10, this, SLOT( startInitialScan() ) );
@@ -142,5 +144,5 @@ void DocumentList::start()
void DocumentList::pause()
{
- //qDebug("pause %i", d->tid);
+ //odebug << "pause " << d->tid << "" << oendl;
killTimer( d->tid );
d->tid = 0;
@@ -152,5 +154,5 @@ void DocumentList::resume()
if ( d->tid == 0 ) {
d->tid = startTimer( 20 );
- //qDebug("resumed %i", d->tid);
+ //odebug << "resumed " << d->tid << "" << oendl;
}
}
@@ -178,5 +180,5 @@ void DocumentList::resendWorker()
void DocumentList::rescan()
{
- //qDebug("rescan");
+ //odebug << "rescan" << oendl;
pause();
d->initialize();
@@ -233,5 +235,5 @@ void DocumentList::reloadAppLnks()
}
- //qDebug("adding type %s", (*ittypes).latin1());
+ //odebug << "adding type " << (*ittypes) << "" << oendl;
// ### our current launcher expects docs tab to be last
@@ -242,5 +244,5 @@ void DocumentList::reloadAppLnks()
}
for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
- //qDebug("removing type %s", (*ittypes).latin1());
+ //odebug << "removing type " << (*ittypes) << "" << oendl;
d->serverGui->typeRemoved(*ittypes);
}
@@ -275,5 +277,5 @@ void DocumentList::reloadDocLnks()
void DocumentList::linkChanged( QString arg )
{
- //qDebug( "linkchanged( %s )", arg.latin1() );
+ //odebug << "linkchanged( " << arg << " )" << oendl;
if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) {
@@ -288,5 +290,5 @@ void DocumentList::linkChanged( QString arg )
if ( ( doc->linkFileKnown() && doc->linkFile() == arg )
|| ( doc->fileKnown() && doc->file() == arg ) ) {
- //qDebug( "found old link" );
+ //odebug << "found old link" << oendl;
DocLnk* dl = new DocLnk( arg );
// add new one if it exists and matches the mimetype
@@ -294,5 +296,5 @@ void DocumentList::linkChanged( QString arg )
// Existing link has been changed, send old link ref and a ref
// to the new link
- //qDebug( "change case" );
+ //odebug << "change case" << oendl;
if ( d->serverGui )
d->serverGui->documentChanged( *doc, *dl );
@@ -301,5 +303,5 @@ void DocumentList::linkChanged( QString arg )
// Link has been removed or doesn't match the mimetypes any more
// so we aren't interested in it, so take it away from the list
- //qDebug( "removal case" );
+ //odebug << "removal case" << oendl;
if ( d->serverGui )
d->serverGui->documentRemoved( *doc );
@@ -315,5 +317,5 @@ void DocumentList::linkChanged( QString arg )
if ( d->store( dl ) ) {
// Add if it's a link we are interested in
- //qDebug( "add case" );
+ //odebug << "add case" << oendl;
add( *dl );
}
@@ -379,10 +381,10 @@ void DocumentList::sendAllDocLinks()
}
- //qDebug( "sending length %d", contents.length() );
+ //odebug << "sending length " << contents.length() << "" << oendl;
#ifndef QT_NO_COP
QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" );
e << contents;
#endif
- //qDebug( "================ \n\n%s\n\n===============", contents.latin1() );
+ //odebug << "================ \n\n" << contents << "\n\n===============" << oendl;
d->needToSendAllDocLinks = false;
@@ -537,5 +539,5 @@ void DocumentListPrivate::estimatedPercentScanned()
}
- // qDebug( "overallProgress: %f", overallProgress );
+ // odebug << "overallProgress: " << overallProgress << "" << oendl;
if ( serverGui )
@@ -554,5 +556,5 @@ const QString DocumentListPrivate::nextFile()
} else {
QDir dir( docPaths[docPathsSearched] );
- // qDebug("now using base path: %s", docPaths[docPathsSearched].latin1() );
+ // odebug << "now using base path: " << docPaths[docPathsSearched] << "" << oendl;
docPathsSearched++;
if ( !dir.exists( ".Qtopia-ignore" ) ) {
@@ -588,5 +590,5 @@ const QString DocumentListPrivate::nextFile()
// go down a depth
QDir dir( fi->filePath() );
- // qDebug("now going in to path: %s", bn.latin1() );
+ // odebug << "now going in to path: " << bn << "" << oendl;
if ( !dir.exists( ".Qtopia-ignore" ) ) {
if ( searchDepth < MAX_SEARCH_DEPTH - 1) {
@@ -629,5 +631,5 @@ const DocLnk *DocumentListPrivate::iterate()
{
if ( state == Find ) {
- //qDebug("state Find");
+ //odebug << "state Find" << oendl;
QString file = nextFile();
while ( !file.isNull() ) {
@@ -651,5 +653,5 @@ const DocLnk *DocumentListPrivate::iterate()
if ( state == RemoveKnownFiles ) {
- //qDebug("state RemoveKnownFiles");
+ //odebug << "state RemoveKnownFiles" << oendl;
const QList<DocLnk> &list = dls.children();
for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) {
@@ -665,5 +667,5 @@ const DocLnk *DocumentListPrivate::iterate()
if ( state == MakeUnknownFiles ) {
- //qDebug("state MakeUnknownFiles");
+ //odebug << "state MakeUnknownFiles" << oendl;
for (void* c; (c=dit->current()); ++(*dit) ) {
if ( c == MAGIC_NUMBER ) {
@@ -688,5 +690,5 @@ const DocLnk *DocumentListPrivate::iterate()
}
- //qDebug("state Done");
+ //odebug << "state Done" << oendl;
return NULL;
}
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 @@
#include "applauncher.h"
#include "serverapp.h"
-//#include <qtopia/custom.h>
-
#include "calibrate.h"
#include "documentlist.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/resource.h>
#include <qtopia/qcopenvelope_qws.h>
#include <qtopia/config.h>
#include <qtopia/fontmanager.h>
+using namespace Opie::Core;
+/* QT */
#include <qfile.h>
#include <qpainter.h>
@@ -52,5 +54,5 @@
#endif
-
+/* STD */
#include <stdlib.h>
#include <sys/types.h>
@@ -156,5 +158,5 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
- qDebug("Setting up QCop to QPE/System");
+ odebug << "Setting up QCop to QPE/System" << oendl;
QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
@@ -224,5 +226,5 @@ void FirstUse::nextDialog()
do {
currApp++;
- qDebug( "currApp = %d", currApp );
+ odebug << "currApp = " << currApp << "" << oendl;
if ( settingsTable[currApp].app == 0 ) {
if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
@@ -230,10 +232,10 @@ void FirstUse::nextDialog()
// Tell it to stop, and when its done we'll come back
// to nextDialog and exit.
- qDebug( "Waiting for %s to exit", settingsTable[prevApp].app );
+ odebug << "Waiting for " << settingsTable[prevApp].app << " to exit" << oendl;
QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
settingsTable[prevApp].stop );
currApp = prevApp;
} else {
- qDebug( "Done!" );
+ odebug << "Done!" << oendl;
Config config( "qpe" );
config.setGroup( "Startup" );
@@ -259,10 +261,10 @@ void FirstUse::nextDialog()
if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
- qDebug( "Shutdown: %s", settingsTable[prevApp].app );
+ odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
settingsTable[prevApp].stop );
waitForExit = prevApp;
} else {
- qDebug( "Startup: %s", settingsTable[currApp].app );
+ odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
settingsTable[currApp].start );
@@ -286,5 +288,5 @@ void FirstUse::previousDialog()
if ( prevApp >= 0 ) {
- qDebug( "Shutdown: %s", settingsTable[prevApp].app );
+ odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
settingsTable[prevApp].stop );
@@ -295,5 +297,5 @@ void FirstUse::previousDialog()
waitForExit = prevApp;
} else {
- qDebug( "Startup: %s", settingsTable[currApp].app );
+ odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
settingsTable[currApp].start );
@@ -319,7 +321,7 @@ void FirstUse::message(const QCString &msg, const QByteArray &data)
void FirstUse::terminated( int, const QString &app )
{
- qDebug( "--- terminated: %s", app.latin1() );
+ odebug << "--- terminated: " << app << "" << oendl;
if ( waitForExit != -1 && settingsTable[waitForExit].app == app ) {
- qDebug( "Startup: %s", settingsTable[currApp].app );
+ odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
if ( settingsTable[waitForExit].app == "language" ) { // No tr
Config config("locale");
@@ -348,10 +350,10 @@ void FirstUse::terminated( int, const QString &app )
void FirstUse::newQcopChannel(const QString& channelName)
{
- qDebug("channel %s added", channelName.data() );
+ odebug << "channel " << channelName.data() << " added" << oendl;
QString prefix("QPE/Application/");
if (channelName.startsWith(prefix)) {
QString appName = channelName.mid(prefix.length());
if ( currApp >= 0 && appName == settingsTable[currApp].app ) {
- qDebug( "Application: %s started", settingsTable[currApp].app );
+ odebug << "Application: " << settingsTable[currApp].app << " started" << oendl;
waitingForLaunch = FALSE;
updateButtons();
@@ -371,10 +373,10 @@ void FirstUse::reloadLanguages()
QString l = config.readEntry( "Language", "en");
QString cl = getenv("LANG");
- qWarning("language message - " + l);
+ owarn << "language message - " + l << oendl;
// setting anyway...
if (l.isNull() )
unsetenv( "LANG" );
else {
- qWarning("and its not null");
+ owarn << "and its not null" << oendl;
setenv( "LANG", l.latin1(), 1 );
}
@@ -393,7 +395,7 @@ void FirstUse::reloadLanguages()
transApp = new QTranslator(qApp);
QString tfn = QPEApplication::qpeDir() + "i18n/"+l+"/qpe.qm";
- qWarning("loading " + tfn);
+ owarn << "loading " + tfn << oendl;
if ( transApp->load(tfn) ) {
- qWarning("installing translator");
+ owarn << "installing translator" << oendl;
qApp->installTranslator( transApp );
} else {
@@ -404,7 +406,7 @@ void FirstUse::reloadLanguages()
transLib = new QTranslator(qApp);
tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm";
- qWarning("loading " + tfn);
+ owarn << "loading " + tfn << oendl;
if ( transLib->load(tfn) ) {
- qWarning("installing translator library");
+ owarn << "installing translator library" << oendl;
qApp->installTranslator( transLib );
} 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 @@
#include "inputmethods.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
+using namespace Opie::Core;
+/* QT */
#include <qpopupmenu.h>
#include <qtoolbutton.h>
@@ -30,7 +34,5 @@
#include <qlayout.h>
#include <qdir.h>
-#include <stdlib.h>
#include <qtl.h>
-
#ifdef Q_WS_QWS
#include <qwindowsystem_qws.h>
@@ -39,12 +41,6 @@
#endif
-/* ### SingleFloppy if someone is interested? */
-#if 0
-#ifdef QT_NO_COMPONENT
-#include "../plugins/inputmethods/handwriting/handwritingimpl.h"
-#include "../plugins/inputmethods/keyboard/keyboardimpl.h"
-#include "../3rdparty/plugins/inputmethods/pickboard/pickboardimpl.h"
-#endif
-#endif
+/* STD */
+#include <stdlib.h>
/* XPM */
@@ -263,5 +259,5 @@ void InputMethods::setPreferedHandlers() {
for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
if ( (*it).name() == current ) {
- qWarning("preferred keyboard is %s", current.latin1() );
+ owarn << "preferred keyboard is " << current << "" << oendl;
mkeyboard = &(*it);
kbdButton->setPixmap( *mkeyboard->icon() );
@@ -306,11 +302,11 @@ void InputMethods::loadInputMethods()
// may be either a simple, or advanced.
if (input.widget) {
- //qDebug("its a keyboard");
+ //odebug << "its a keyboard" << oendl;
inputMethodList.append( input );
} else {
- //qDebug("its a real im");
+ //odebug << "its a real im" << oendl;
input.widget = input.extInterface->statusWidget( 0, 0 );
if (input.widget) {
- //qDebug("blah");
+ //odebug << "blah" << oendl;
inputModifierList.append( input );
imButton->addWidget(input.widget, inputModifierList.count());
@@ -542,5 +538,5 @@ void InputMethods::showKbd( bool on )
if ( inputWidgetStyle & QWidget::WStyle_DialogBorder )
{
- qDebug( "InputMethods: reading geometry." );
+ odebug << "InputMethods: reading geometry." << oendl;
Config cfg( "Launcher" );
cfg.setGroup( "InputMethods" );
@@ -552,5 +548,5 @@ void InputMethods::showKbd( bool on )
if ( l > -1 && t > -1 && w > -1 && h > -1 )
{
- qDebug( "InputMethods: config values ( %d, %d, %d, %d ) are ok.", l, t, w, h );
+ odebug << "InputMethods: config values ( " << l << ", " << t << ", " << w << ", " << h << " ) are ok." << oendl;
left = l;
top = t;
@@ -560,10 +556,10 @@ void InputMethods::showKbd( bool on )
else
{
- qDebug( "InputMethods: config values are new or not ok." );
+ odebug << "InputMethods: config values are new or not ok." << oendl;
}
}
else
{
- qDebug( "InputMethods: no floating selected." );
+ odebug << "InputMethods: no floating selected." << oendl;
}
mkeyboard->widget->resize( width, height );
@@ -578,5 +574,5 @@ void InputMethods::showKbd( bool on )
QPoint pos = mkeyboard->widget->pos();
QSize siz = mkeyboard->widget->size();
- qDebug( "InputMethods: saving geometry." );
+ odebug << "InputMethods: saving geometry." << oendl;
Config cfg( "Launcher" );
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 @@
**********************************************************************/
-
#include "irserver.h"
+#include "obexinterface.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/qlibrary.h>
#include <qtopia/qpeapplication.h>
-
-#include "obexinterface.h"
-
+/* QT */
#include <qdir.h>
@@ -45,13 +45,13 @@ IrServer::IrServer( QObject *parent, const char *name )
for ( it = list.begin(); it != list.end(); ++it ) {
QLibrary *trylib = new QLibrary( path + *it );
- //qDebug("trying lib %s", (path + (*it)).latin1() );
+ //odebug << "trying lib " << (path + (*it)) << "" << oendl;
if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
lib = trylib;
- //qDebug("found obex lib" );
+ //odebug << "found obex lib" << oendl;
QString lang = getenv( "LANG" );
QTranslator * trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
- //qDebug("tr fpr obex: %s", tfn.latin1() );
+ //odebug << "tr fpr obex: " << tfn << "" << oendl;
if ( trans->load( tfn ))
qApp->installTranslator( trans );
@@ -65,5 +65,5 @@ IrServer::IrServer( QObject *parent, const char *name )
}
if ( !lib )
- qDebug("could not load IR plugin" );
+ odebug << "could not load IR plugin" << oendl;
}
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 @@
**********************************************************************/
+#include "startmenu.h"
+#include "taskbar.h"
+#include "serverinterface.h"
+#include "launcherview.h"
+#include "launcher.h"
+#include "server.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/global.h>
#ifdef Q_WS_QWS
@@ -29,8 +38,11 @@
#include <qtopia/mimetype.h>
#include <qtopia/private/categories.h>
-//#include <qtopia/custom.h>
+#define QTOPIA_INTERNAL_FSLP
+#include <qtopia/lnkproperties.h>
+/* QT */
#include <qdir.h>
#ifdef Q_WS_QWS
+#include <qkeyboard_qws.h>
#include <qwindowsystem_qws.h>
#endif
@@ -51,17 +63,7 @@
#include <qpopupmenu.h>
-#include "startmenu.h"
-#include "taskbar.h"
-
-#include "serverinterface.h"
-#include "launcherview.h"
-#include "launcher.h"
-#include "server.h"
-
-#define QTOPIA_INTERNAL_FSLP
-#include <qtopia/lnkproperties.h>
+/* STD */
#include <stdlib.h>
#include <assert.h>
-
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <unistd.h>
@@ -71,9 +73,4 @@
#endif
-#ifdef Q_WS_QWS
-#include <qkeyboard_qws.h>
-#include <qpe/lnkproperties.h>
-#endif
-
static bool isVisibleWindow( int );
@@ -229,5 +226,5 @@ LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm,
docview = view;
- qDebug("inserting %s at %d", id.latin1(), n-1 );
+ odebug << "inserting " << id << " at " << n-1 << "" << oendl;
Config cfg("Launcher");
@@ -414,5 +411,5 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
if ( !fam.isEmpty() ) {
view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
- qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic );
+ odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
} else {
view(id)->clearViewFont();
@@ -685,5 +682,5 @@ void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
view->removeLink( app.linkFile() );
else
- qWarning("removeAppLnk: No view for %s!", type.latin1() );
+ owarn << "removeAppLnk: No view for " << type << "!" << oendl;
}
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 @@
#include "launcherview.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/private/categories.h>
@@ -26,6 +28,7 @@
#include <qtopia/mimetype.h>
#include <qtopia/resource.h>
-//#include <qtopia/private/palmtoprecord.h>
+using namespace Opie::Core;
+/* QT */
#include <qtimer.h>
#include <qfileinfo.h>
@@ -116,5 +119,5 @@ public:
while ((l=it.current())) {
++it;
- //qDebug("%p: hidden (should remove)",l);
+ //odebug << "" << l << ": hidden (should remove)" << oendl;
}
#endif
@@ -1030,5 +1033,5 @@ void LauncherView::paletteChange( const QPalette &p )
void LauncherView::fontChanged(const QFont&)
{
- qDebug("LauncherView::fontChanged()");
+ odebug << "LauncherView::fontChanged()" << oendl;
icons->hideOrShowItems( FALSE );
}
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 @@
#define QTOPIA_INTERNAL_FILEOPERATIONS
#endif
+#ifdef QT_QWS_LOGIN
+#include "../login/qdmdialogimpl.h"
+#endif
+#include "calibrate.h"
#include "server.h"
#include "serverapp.h"
@@ -27,17 +31,24 @@
#include "firstuse.h"
+/* OPIE */
+#include <opie2/odebug.h>
+#include <opie2/odevice.h>
#include <opie2/oglobal.h>
-
#include <qtopia/network.h>
-//#include <qtopia/custom.h>
-
+#include <qtopia/alarmserver.h>
+using namespace Opie::Core;
+/* QT */
#include <qdir.h>
+#include <qmessagebox.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
#include <qtopia/qcopenvelope_qws.h>
#endif
-#include <qtopia/alarmserver.h>
+#ifdef Q_WS_QWS
+#include <qkeyboard_qws.h>
+#endif
+/* STD */
#include <stdlib.h>
#include <stdio.h>
@@ -49,21 +60,4 @@
#endif
-#include "calibrate.h"
-
-
-#ifdef QT_QWS_LOGIN
-#include "../login/qdmdialogimpl.h"
-#endif
-
-#ifdef Q_WS_QWS
-#include <qkeyboard_qws.h>
-#endif
-
-#include <qmessagebox.h>
-#include <opie2/odevice.h>
-
-using namespace Opie::Core;
-
-
static void cleanup()
{
@@ -122,5 +116,5 @@ static void refreshTimeZoneConfig()
curZone = TimeZone( zoneID );
if ( !curZone.isValid() ){
- qDebug( "initEnvironment() Invalid TimeZone %s", zoneID.latin1() );
+ odebug << "initEnvironment() Invalid TimeZone " << zoneID << "" << oendl;
break;
}
@@ -270,5 +264,5 @@ int initApplication( int argc, char ** argv )
int rv = a.exec();
- qDebug("exiting...");
+ odebug << "exiting..." << oendl;
delete s;
@@ -342,5 +336,5 @@ int main( int argc, char ** argv )
if ( DesktopApplication::doRestart ) {
- qDebug("Trying to restart");
+ odebug << "Trying to restart" << oendl;
execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 );
}
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 @@
#include "packageslave.h"
-#include <qtopia/qprocess.h>
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qtopia/qprocess.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
+using namespace Opie::Core;
+/* QT */
#ifdef Q_WS_QWS
#include <qcopchannel_qws.h>
#endif
-
#include <qtextstream.h>
+/* STD */
#include <stdlib.h>
#include <sys/stat.h> // mkdir()
-
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <unistd.h>
#include <sys/vfs.h>
#include <mntent.h>
-#elif defined(Q_OS_WIN32)
-#include <windows.h>
-#include <winbase.h>
#elif defined(Q_OS_MACX)
#include <unistd.h>
@@ -146,5 +146,5 @@ void PackageHandler::addPackageFiles( const QString &location,
QDir d;
//#### revise
- qDebug("Copy file at %s: %s", __FILE__, __LINE__ );
+ odebug << "Copy file at " << __FILE__ << ": " << __LINE__ << "" << oendl;
d.mkdir(("/usr/lib/ipkg/info/" + location).ascii());
system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii());
@@ -160,5 +160,5 @@ void PackageHandler::addPackageFiles( const QString &location,
// for s, do link/mkdir.
if ( s.right(1) == "/" ) {
- qDebug("do mkdir for %s", s.ascii());
+ odebug << "do mkdir for " << s.ascii() << "" << oendl;
#ifndef Q_OS_WIN32
mkdir( s.ascii(), 0777 );
@@ -171,8 +171,8 @@ void PackageHandler::addPackageFiles( const QString &location,
} else {
#ifndef Q_OS_WIN32
- qDebug("do symlink for %s", s.ascii());
+ odebug << "do symlink for " << s.ascii() << "" << oendl;
symlink( (location + s).ascii(), s.ascii() );
#else
- qDebug("Copy file instead of a symlink for WIN32");
+ odebug << "Copy file instead of a symlink for WIN32" << oendl;
if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE))
qWarning("Unable to create symlinkfor %s",
@@ -216,5 +216,5 @@ void PackageHandler::cleanupPackageFiles( const QString &listfile )
} else {
#ifndef Q_OS_WIN32
- qDebug("remove symlink for %s", s.ascii());
+ odebug << "remove symlink for " << s.ascii() << "" << oendl;
//check if it is a symlink first (don't remove /etc/passwd...)
char buf[10]; //we don't care about the contents
@@ -223,5 +223,5 @@ void PackageHandler::cleanupPackageFiles( const QString &listfile )
#else
// ### revise
- qWarning("Unable to remove symlink %s:%s", __FILE__, __LINE__);
+ owarn << "Unable to remove symlink " << __FILE__ << ":" << __LINE__ << "" << oendl;
#endif
}
@@ -267,5 +267,5 @@ void PackageHandler::prepareInstall( const QString& size, const QString& path )
if ( statfs( path.latin1(), &fs ) == 0 )
if ( s > fs.f_bsize * fs.f_bavail ) {
- //qDebug("############### Not enough space left ###############");
+ //odebug << "############### Not enough space left ###############" << oendl;
mNoSpaceLeft = TRUE;
}
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 @@
#include "transferserver.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/oglobal.h>
-
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/qpeapplication.h>
-
#include <qtopia/version.h>
+using namespace Opie::Core;
+/* QT */
#include <qtextstream.h>
#include <qtimer.h>
@@ -37,4 +39,5 @@
#endif
+/* STD */
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE
@@ -50,10 +53,6 @@
#endif
-
-//#define INSECURE
-
const int block_size = 51200;
-using namespace Opie::Core;
QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
const char* name )
@@ -63,5 +62,5 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
{
if ( !ok() )
- qWarning( "Failed to bind to port %d", port );
+ owarn << "Failed to bind to port " << port << "" << oendl;
else {
#ifndef QT_NO_COP
@@ -172,5 +171,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
int paren = command.find( "(" );
if ( paren <= 0 ) {
- qDebug("DesktopMessage: bad qcop syntax");
+ odebug << "DesktopMessage: bad qcop syntax" << oendl;
return;
}
@@ -178,5 +177,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
QString params = command.mid( paren + 1 );
if ( params[params.length()-1] != ')' ) {
- qDebug("DesktopMessage: bad qcop syntax");
+ odebug << "DesktopMessage: bad qcop syntax" << oendl;
return;
}
@@ -205,5 +204,5 @@ void QCopBridge::sendDesktopMessageOld( const QCString& command, const QByteArra
str = QString::number( i );
} else {
- qDebug(" cannot route the argument type %s throught the qcop bridge", (*it).latin1() );
+ odebug << " cannot route the argument type " << (*it) << " throught the qcop bridge" << oendl;
return;
}
@@ -333,5 +332,5 @@ void QCopBridgePI::send( const QString& msg )
QTextStream os( this );
os << msg << endl;
- //qDebug( "sending qcop message: %s", msg.latin1() );
+ //odebug << "sending qcop message: " << msg << "" << oendl;
}
@@ -346,5 +345,5 @@ void QCopBridgePI::read()
void QCopBridgePI::process( const QString& message )
{
- //qDebug( "Command: %s", message.latin1() );
+ //odebug << "Command: " << message << "" << oendl;
// 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 )
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::connectNotify(): signal %s has been connected", signal );
+ odebug << "QProcess::connectNotify(): signal " << signal << " has been connected" << oendl;
#endif
if ( !ioRedirection )
@@ -589,5 +589,5 @@ void QProcess::connectNotify( const char * signal )
) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::connectNotify(): set ioRedirection to TRUE" );
+ odebug << "QProcess::connectNotify(): set ioRedirection to TRUE" << oendl;
#endif
setIoRedirection( TRUE );
@@ -596,5 +596,5 @@ void QProcess::connectNotify( const char * signal )
if ( !notifyOnExit && qstrcmp( signal, SIGNAL(processExited()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::connectNotify(): set notifyOnExit to TRUE" );
+ odebug << "QProcess::connectNotify(): set notifyOnExit to TRUE" << oendl;
#endif
setNotifyOnExit( TRUE );
@@ -603,5 +603,5 @@ void QProcess::connectNotify( const char * signal )
if ( !wroteToStdinConnected && qstrcmp( signal, SIGNAL(wroteToStdin()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" );
+ odebug << "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" << oendl;
#endif
setWroteStdinConnected( TRUE );
@@ -619,5 +619,5 @@ void QProcess::disconnectNotify( const char * )
) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::disconnectNotify(): set ioRedirection to FALSE" );
+ odebug << "QProcess::disconnectNotify(): set ioRedirection to FALSE" << oendl;
#endif
setIoRedirection( FALSE );
@@ -625,5 +625,5 @@ void QProcess::disconnectNotify( const char * )
if ( notifyOnExit && receivers( SIGNAL(processExited()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::disconnectNotify(): set notifyOnExit to FALSE" );
+ odebug << "QProcess::disconnectNotify(): set notifyOnExit to FALSE" << oendl;
#endif
setNotifyOnExit( FALSE );
@@ -631,5 +631,5 @@ void QProcess::disconnectNotify( const char * )
if ( wroteToStdinConnected && receivers( SIGNAL(wroteToStdin()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" );
+ odebug << "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" << oendl;
#endif
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 @@
**********************************************************************/
-//#include "qplatformdefs.h"
-
// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
#if defined(connect)
@@ -28,18 +26,21 @@
#include "qprocess.h"
-#ifndef QT_NO_PROCESS
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
-#include "qapplication.h"
-#include "qqueue.h"
-#include "qlist.h"
-#include "qsocketnotifier.h"
-#include "qtimer.h"
-#include "qregexp.h"
+/* QT */
+#ifndef QT_NO_PROCESS
+#include <qapplication.h>
+#include <qqueue.h>
+#include <qlist.h>
+#include <qsocketnotifier.h>
+#include <qtimer.h>
+#include <qregexp.h>
#include "qcleanuphandler_p.h"
+/* STD */
#include <stdlib.h>
-
-// ### FOR Qt 2.3 compat
#include <unistd.h>
#include <signal.h>
@@ -48,11 +49,9 @@
#include <sys/wait.h>
#include <sys/fcntl.h>
-
+#include <sys/resource.h>
#include <errno.h>
-
#ifdef Q_OS_MACX
#include <sys/time.h>
#endif
-#include <sys/resource.h>
#ifdef __MIPSEL__
@@ -133,5 +132,5 @@ public:
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
+ odebug << "QProc: Constructor for pid " << pid << " and QProcess " << process << "" << oendl;
#endif
socketStdin = 0;
@@ -142,5 +141,5 @@ public:
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
+ odebug << "QProc: Destructor for pid " << pid << " and QProcess " << process << "" << oendl;
#endif
if ( process != 0 ) {
@@ -214,5 +213,5 @@ QProcessManager::QProcessManager()
} else {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
+ odebug << "QProcessManager: install socket notifier (" << sigchldFd[1] << ")" << oendl;
#endif
QSocketNotifier *sn = new QSocketNotifier( sigchldFd[1],
@@ -227,5 +226,5 @@ QProcessManager::QProcessManager()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install a SIGCHLD handler" );
+ odebug << "QProcessManager: install a SIGCHLD handler" << oendl;
#endif
act.sa_handler = qt_C_sigchldHnd;
@@ -237,8 +236,8 @@ QProcessManager::QProcessManager()
#endif
if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
- qWarning( "Error installing SIGCHLD handler" );
+ owarn << "Error installing SIGCHLD handler" << oendl;
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
+ odebug << "QProcessManager: install a SIGPIPE handler (SIG_IGN)" << oendl;
#endif
/*
@@ -253,5 +252,5 @@ QProcessManager::QProcessManager()
act.sa_flags = 0;
if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
- qWarning( "Error installing SIGPIPE handler" );
+ owarn << "Error installing SIGPIPE handler" << oendl;
}
@@ -267,14 +266,14 @@ QProcessManager::~QProcessManager()
// restore SIGCHLD handler
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: restore old sigchild handler" );
+ odebug << "QProcessManager: restore old sigchild handler" << oendl;
#endif
if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
- qWarning( "Error restoring SIGCHLD handler" );
+ owarn << "Error restoring SIGCHLD handler" << oendl;
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: restore old sigpipe handler" );
+ odebug << "QProcessManager: restore old sigpipe handler" << oendl;
#endif
if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
- qWarning( "Error restoring SIGPIPE handler" );
+ owarn << "Error restoring SIGPIPE handler" << oendl;
}
@@ -283,5 +282,5 @@ void QProcessManager::append( QProc *p )
procList->append( p );
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
+ odebug << "QProcessManager: append process (procList.count(): " << procList->count() << ")" << oendl;
#endif
}
@@ -291,5 +290,5 @@ void QProcessManager::remove( QProc *p )
procList->remove( p );
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
+ odebug << "QProcessManager: remove process (procList.count(): " << procList->count() << ")" << oendl;
#endif
cleanup();
@@ -317,5 +316,5 @@ void QProcessManager::sigchldHnd( int fd )
::read( fd, &tmp, sizeof(tmp) );
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd()" );
+ odebug << "QProcessManager::sigchldHnd()" << oendl;
#endif
QProc *proc;
@@ -330,5 +329,5 @@ void QProcessManager::sigchldHnd( int fd )
if ( !process->isRunning() ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess available)" << oendl;
#endif
// read pending data
@@ -336,5 +335,5 @@ void QProcessManager::sigchldHnd( int fd )
if ( ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stdout" << oendl;
#endif
process->socketRead( proc->socketStdout );
@@ -343,5 +342,5 @@ void QProcessManager::sigchldHnd( int fd )
if ( ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stderr" << oendl;
#endif
process->socketRead( proc->socketStderr );
@@ -357,5 +356,5 @@ void QProcessManager::sigchldHnd( int fd )
if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess not available)" << oendl;
#endif
removeProc = TRUE;
@@ -387,5 +386,5 @@ QProcessPrivate::QProcessPrivate()
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessPrivate: Constructor" );
+ odebug << "QProcessPrivate: Constructor" << oendl;
#endif
stdinBufRead = 0;
@@ -404,5 +403,5 @@ QProcessPrivate::~QProcessPrivate()
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessPrivate: Destructor" );
+ odebug << "QProcessPrivate: Destructor" << oendl;
#endif
@@ -600,5 +599,5 @@ bool QProcess::start( QStringList *env )
{
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start()" );
+ odebug << "QProcess::start()" << oendl;
#endif
reset();
@@ -636,5 +635,5 @@ bool QProcess::start( QStringList *env )
arglist[i] = arglistQ[i];
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
+ odebug << "QProcess::start(): arg " << i << " = " << arglist[i] << "" << oendl;
#endif
i++;
@@ -800,5 +799,5 @@ bool QProcess::start( QStringList *env )
error:
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start(): error starting process" );
+ odebug << "QProcess::start(): error starting process" << oendl;
#endif
if ( d->procManager )
@@ -879,5 +878,5 @@ bool QProcess::isRunning() const
if ( d->exitValuesCalculated ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning(): FALSE (already computed)" );
+ odebug << "QProcess::isRunning(): FALSE (already computed)" << oendl;
#endif
return FALSE;
@@ -896,10 +895,10 @@ bool QProcess::isRunning() const
d->exitValuesCalculated = TRUE;
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+ odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): FALSE" << oendl;
#endif
return FALSE;
}
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+ odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): TRUE" << oendl;
#endif
return TRUE;
@@ -921,5 +920,5 @@ void QProcess::writeToStdin( const QByteArray& buf )
{
#if defined(QT_QPROCESS_DEBUG)
-// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
+// odebug << "QProcess::writeToStdin(): write to stdin (" << d->socketStdin << ")" << oendl;
#endif
d->stdinBuf.enqueue( new QByteArray(buf) );
@@ -948,8 +947,8 @@ void QProcess::closeStdin()
d->notifierStdin = 0;
if ( ::close( d->proc->socketStdin ) != 0 ) {
- qWarning( "Could not close stdin of child process" );
+ owarn << "Could not close stdin of child process" << oendl;
}
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
+ odebug << "QProcess::closeStdin(): stdin (" << d->proc->socketStdin << ") closed" << oendl;
#endif
d->proc->socketStdin = 0;
@@ -971,5 +970,5 @@ void QProcess::socketRead( int fd )
}
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): %d", fd );
+ odebug << "QProcess::socketRead(): " << fd << "" << oendl;
#endif
if ( fd == 0 )
@@ -1000,5 +999,5 @@ void QProcess::socketRead( int fd )
if ( fd == d->proc->socketStdout ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
+ odebug << "QProcess::socketRead(): stdout (" << fd << ") closed" << oendl;
#endif
d->notifierStdout->setEnabled( FALSE );
@@ -1010,5 +1009,5 @@ void QProcess::socketRead( int fd )
} else if ( fd == d->proc->socketStderr ) {
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
+ odebug << "QProcess::socketRead(): stderr (" << fd << ") closed" << oendl;
#endif
d->notifierStderr->setEnabled( FALSE );
@@ -1062,5 +1061,5 @@ void QProcess::socketWrite( int fd )
}
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketWrite(): write to stdin (%d)", fd );
+ odebug << "QProcess::socketWrite(): write to stdin (" << fd << ")" << oendl;
#endif
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 @@
#define QTOPIA_INTERNAL_PRELOADACCESS
+#include "runningappbar.h"
+#include "serverinterface.h"
-#include <stdlib.h>
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qtopia/qcopenvelope_qws.h>
+using namespace Opie::Core;
+/* QT */
#include <qpainter.h>
-#include <qtopia/qcopenvelope_qws.h>
-
-#include "runningappbar.h"
-#include "serverinterface.h"
+/* STD */
+#include <stdlib.h>
RunningAppBar::RunningAppBar(QWidget* parent)
@@ -52,5 +56,5 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
QString appName;
stream >> appName;
- // qDebug("fastAppShowing %s", appName.data() );
+ // odebug << "fastAppShowing " << appName.data() << "" << oendl;
const AppLnk* f = ServerInterface::appLnks().findExec(appName);
if ( f ) addTask(*f);
@@ -64,5 +68,5 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
void RunningAppBar::addTask(const AppLnk& appLnk) {
- qDebug("Added %s to app list.", appLnk.name().latin1());
+ odebug << "Added " << appLnk.name() << " to app list." << oendl;
AppLnk* newApp = new AppLnk(appLnk);
newApp->setExec(appLnk.exec());
@@ -76,5 +80,5 @@ void RunningAppBar::removeTask(const AppLnk& appLnk) {
AppLnk* target = appList.at(i);
if (target->exec() == appLnk.exec()) {
- qDebug("Removing %s from app list.", appLnk.name().latin1());
+ odebug << "Removing " << appLnk.name() << " from app list." << oendl;
appList.remove();
delete target;
@@ -136,5 +140,5 @@ void RunningAppBar::paintEvent( QPaintEvent * )
if ( x + spacing <= width() ) {
curApp = it.current();
- qWarning("Drawing %s", curApp->name().latin1() );
+ owarn << "Drawing " << curApp->name() << "" << oendl;
if ( (int)i == selectedAppIndex )
p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() );
@@ -154,5 +158,5 @@ QSize RunningAppBar::sizeHint() const
void RunningAppBar::applicationLaunched(const QString &appName)
{
- qDebug("desktop:: app: %s launched with pid ", appName.data() );
+ odebug << "desktop:: app: " << appName.data() << " launched with pid " << oendl;
const AppLnk* newGuy = ServerInterface::appLnks().findExec(appName);
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 )
}
- //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend);
+ //odebug << "screen saver intervals: " << dim << " " << lightoff << " " << suspend << "" << oendl;
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 @@
#include "documentlist.h"
+/* OPIE */
+#include <opie2/odebug.h>
+#include <opie2/odevicebutton.h>
+#include <opie2/odevice.h>
#include <qtopia/applnk.h>
#include <qtopia/private/categories.h>
@@ -44,26 +48,22 @@
#include <qtopia/version.h>
#include <qtopia/storage.h>
-
#include <qtopia/qcopenvelope_qws.h>
-#include <qwindowsystem_qws.h>
-#include <qgfx_qws.h>
#include <qtopia/global.h>
-//#include <qtopia/custom.h>
-
-#include <opie2/odevicebutton.h>
-#include <opie2/odevice.h>
+using namespace Opie::Core;
-#include <unistd.h>
+/* QT */
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qtextstream.h>
+#include <qwindowsystem_qws.h>
+#include <qgfx_qws.h>
+/* STD */
+#include <unistd.h>
#include <stdlib.h>
extern QRect qt_maxWindowRect;
-
-using namespace Opie::Core;
static QWidget *calibrate(bool)
{
@@ -330,5 +330,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
QString link;
stream >> link;
- qDebug( "desktop.cpp systemMsg -> linkchanged( %s )", link.latin1() );
+ odebug << "desktop.cpp systemMsg -> linkchanged( " << link << " )" << oendl;
docList->linkChanged(link);
} else if ( msg == "serviceChanged(QString)" ) {
@@ -435,5 +435,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
cfg.setGroup("SyncDate");
cfg.writeEntry( app, date );
- //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1());
+ //odebug << "setSyncDate(QString,QString) " << app << " " << date << "" << oendl;
} else if ( msg == "startSync(QString)" ) {
QString what;
@@ -573,5 +573,5 @@ bool Server::mkdir(const QString &localPath)
// didn't find any seps; weird, use the cur dir instead
if (dirIndex == -1) {
- //qDebug("No seperators found in path %s", localPath.latin1());
+ //odebug << "No seperators found in path " << localPath << "" << oendl;
checkedPath = QDir::currentDirPath();
}
@@ -590,8 +590,8 @@ bool Server::mkdir(const QString &localPath)
QDir checkDir(checkedPath);
if (!checkDir.exists()) {
- //qDebug("mkdir making dir %s", checkedPath.latin1());
+ //odebug << "mkdir making dir " << checkedPath << "" << oendl;
if (!checkDir.mkdir(checkedPath)) {
- qDebug("Unable to make directory %s", checkedPath.latin1());
+ odebug << "Unable to make directory " << checkedPath << "" << oendl;
return FALSE;
}
@@ -671,5 +671,5 @@ void Server::terminateServers()
void Server::syncConnectionClosed( const QHostAddress & )
{
- qDebug( "Lost sync connection" );
+ odebug << "Lost sync connection" << oendl;
delete syncDialog;
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 @@
#include "serverapp.h"
+#include "screensaver.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/odevice.h>
-
#include <qtopia/password.h>
#include <qtopia/config.h>
@@ -31,15 +33,10 @@
#endif
#include <qtopia/global.h>
-//#include <qtopia/custom.h>
+using namespace Opie::Core;
+/* QT */
#ifdef Q_WS_QWS
#include <qgfx_qws.h>
#endif
-#ifdef Q_OS_WIN32
-#include <io.h>
-#include <process.h>
-#else
-#include <unistd.h>
-#endif
#include <qmessagebox.h>
#include <qtimer.h>
@@ -48,13 +45,16 @@
#include <qpixmapcache.h>
+/* STD */
+#ifdef Q_OS_WIN32
+#include <io.h>
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
#include <stdlib.h>
-#include "screensaver.h"
static ServerApplication *serverApp = 0;
static int loggedin=0;
-using namespace Opie;
-
-using namespace Opie::Core;
QCopKeyRegister::QCopKeyRegister()
: m_keyCode( 0 ) {
@@ -857,5 +857,5 @@ int ServerApplication::exec()
{
ms_is_starting = true;
- qDebug("Serverapp - exec");
+ odebug << "Serverapp - exec" << oendl;
return QPEApplication::exec();
}
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)
break;
default:
- qWarning("Unrecognized temp power setting. Ignored");
+ owarn << "Unrecognized temp power setting. Ignored" << oendl;
return;
}
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 @@
**********************************************************************/
+#include "systray.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/qlibrary.h>
#include <qtopia/config.h>
+using namespace Opie::Core;
+/* QT */
#include <qlayout.h>
#include <qdir.h>
-#include "systray.h"
-
+/* STD */
#include <stdlib.h>
-/* ### Single build floppies ### */
-#if 0
-#ifdef QT_NO_COMPONENTS
-#include "../plugins/applets/clockapplet/clockappletimpl.h"
-#endif
-#endif
-
SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0)
{
@@ -113,5 +111,5 @@ void SysTray::addApplets()
if ( exclude.find( *it ) != exclude.end() )
continue;
- qWarning( "Found Applet: %s", (*it).latin1() );
+ owarn << "Found Applet: " << (*it) << "" << oendl;
TaskbarAppletInterface *iface = 0;
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 @@
#include "server.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
@@ -35,6 +37,7 @@
#endif
#include <qtopia/global.h>
-//#include <qtopia/custom.h>
+using namespace Opie::Core;
+/* QT */
#include <qlabel.h>
#include <qlayout.h>
@@ -286,5 +289,5 @@ void TaskBar::resizeEvent( QResizeEvent *e )
sysTray->show();
- qWarning("TaskBar::resize event");
+ owarn << "TaskBar::resize event" << oendl;
}
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 @@
**
**********************************************************************/
-//#define _XOPEN_SOURCE
+#include "transferserver.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/oglobal.h>
+#include <qtopia/qprocess.h>
+#include <qtopia/process.h>
+#include <qtopia/private/contact.h>
+#include <qtopia/version.h>
+#ifdef Q_WS_QWS
+#include <qtopia/qcopenvelope_qws.h>
+#endif
+using namespace Opie::Core;
-#ifndef Q_OS_WIN32
+/* QT */
+#include <qtextstream.h>
+#include <qmessagebox.h>
+
+/* STD */
#include <pwd.h>
#include <sys/types.h>
@@ -34,31 +48,6 @@
#endif /* Q_OS_MACX */
-#else
-#include <stdlib.h>
-#include <time.h>
-#endif
-
-
-#if defined(_OS_LINUX_)
-#include <shadow.h>
-#endif
-
-#include <qtextstream.h>
-#include <qmessagebox.h>
-//#include <qtopia/qcopchannel_qws.h>
-#include <qtopia/process.h>
-#include <qtopia/private/contact.h>
-#include <qtopia/version.h>
-#ifdef Q_WS_QWS
-#include <qtopia/qcopenvelope_qws.h>
-#endif
-
-
-#include "transferserver.h"
-#include <qtopia/qprocess.h>
-
const int block_size = 51200;
-using namespace Opie::Core;
TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
const char* name)
@@ -67,5 +56,5 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
connections.setAutoDelete( TRUE );
if ( !ok() )
- qWarning( "Failed to bind to port %d", port );
+ owarn << "Failed to bind to port " << port << "" << oendl;
}
@@ -372,5 +361,5 @@ bool ServerPI::verifyAuthorised()
void ServerPI::connectionClosed()
{
- // qDebug( "Debug: Connection closed" );
+ // odebug << "Debug: Connection closed" << oendl;
emit connectionClosed(this);
}
@@ -380,5 +369,5 @@ void ServerPI::send( const QString& msg )
QTextStream os( this );
os << msg << endl;
- //qDebug( "Reply: %s", msg.latin1() );
+ //odebug << "Reply: " << msg << "" << oendl;
}
@@ -421,5 +410,5 @@ bool ServerPI::checkWriteFile( const QString& file )
void ServerPI::process( const QString& message )
{
- //qDebug( "Command: %s", message.latin1() );
+ //odebug << "Command: " << message << "" << oendl;
// split message using "," as separator
@@ -445,5 +434,5 @@ void ServerPI::process( const QString& message )
}
- //qDebug( "args: %s", args.latin1() );
+ //odebug << "args: " << args << "" << oendl;
// we always respond to QUIT, regardless of state
@@ -584,5 +573,5 @@ void ServerPI::process( const QString& message )
}
else {
- qDebug("550 Requested action not taken");
+ odebug << "550 Requested action not taken" << oendl;
send( "550 Requested action not taken" ); // No tr
}
@@ -690,5 +679,5 @@ void ServerPI::process( const QString& message )
else if ( cmd == "MKD" ) {
if ( args.isEmpty() ) {
- qDebug(" Error: no arg");
+ odebug << " Error: no arg" << oendl;
send( "500 Syntax error, command unrecognized" ); // No tr
}
@@ -730,5 +719,5 @@ void ServerPI::process( const QString& message )
QString in, out;
if ( !duproc.exec(in, out) ) {
- qDebug("du process failed; just sending back 1K");
+ odebug << "du process failed; just sending back 1K" << oendl;
send( "213 1024");
}
@@ -738,5 +727,5 @@ void ServerPI::process( const QString& message )
if ( filePath.contains("doc") ) // No tr
guess *= 1000;
- qDebug("sending back gzip guess of %d", guess);
+ odebug << "sending back gzip guess of " << guess << "" << oendl;
send( "213 " + QString::number(guess) );
}
@@ -1027,5 +1016,5 @@ QString ServerPI::permissionString( QFileInfo *info )
void ServerPI::newConnection( int socket )
{
- //qDebug( "New incomming connection" );
+ //odebug << "New incomming connection" << oendl;
if ( !passiv ) return;
@@ -1040,5 +1029,5 @@ void ServerPI::newConnection( int socket )
}
else if ( wait[RetrieveFile] ) {
- qDebug("check retrieve file");
+ odebug << "check retrieve file" << oendl;
if ( backupRestoreGzip( waitfile ) )
dtp->retrieveGzipFile( waitfile );
@@ -1052,5 +1041,5 @@ void ServerPI::newConnection( int socket )
}
else if ( wait[RetrieveByteArray] ) {
- qDebug("retrieve byte array");
+ odebug << "retrieve byte array" << oendl;
dtp->retrieveByteArray();
dtp->setSocket( socket );
@@ -1112,5 +1101,5 @@ ServerDTP::~ServerDTP()
file.close();
if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) {
- qDebug( "STOR incomplete" );
+ odebug << "STOR incomplete" << oendl;
file.remove();
}
@@ -1123,5 +1112,5 @@ ServerDTP::~ServerDTP()
void ServerDTP::extractTarDone()
{
- qDebug("extract done");
+ odebug << "extract done" << oendl;
#ifndef QT_NO_COP
QCopEnvelope e( "QPE/System", "restoreDone(QString)" );
@@ -1141,5 +1130,5 @@ void ServerDTP::connected()
}
- //qDebug( "Debug: Sending file '%s'", file.name().latin1() );
+ //odebug << "Debug: Sending file '" << file.name() << "'" << oendl;
bytes_written = 0;
@@ -1162,10 +1151,10 @@ void ServerDTP::connected()
if ( createTargzProc->isRunning() ) {
// SHOULDN'T GET HERE, BUT DOING A SAFETY CHECK ANYWAY
- qWarning("Previous tar --gzip process is still running; killing it...");
+ owarn << "Previous tar --gzip process is still running; killing it..." << oendl;
createTargzProc->kill();
}
bytes_written = 0;
- qDebug("==>start send tar process");
+ odebug << "==>start send tar process" << oendl;
if ( !createTargzProc->start() )
qWarning("Error starting %s",
@@ -1179,5 +1168,5 @@ void ServerDTP::connected()
}
- // qDebug( "Debug: Sending byte array" );
+ // odebug << "Debug: Sending byte array" << oendl;
bytes_written = 0;
while( !buf.atEnd() )
@@ -1198,8 +1187,8 @@ void ServerDTP::connected()
return;
}
- // qDebug( "Debug: Retrieving file %s", file.name().latin1() );
+ // odebug << "Debug: Retrieving file " << file.name() << "" << oendl;
break;
case RetrieveGzipFile:
- qDebug("=-> starting tar process to receive .tgz file");
+ odebug << "=-> starting tar process to receive .tgz file" << oendl;
break;
case RetrieveBuffer:
@@ -1210,8 +1199,8 @@ void ServerDTP::connected()
return;
}
- // qDebug( "Debug: Retrieving byte array" );
+ // odebug << "Debug: Retrieving byte array" << oendl;
break;
case Idle:
- qDebug("connection established but mode set to Idle; BUG!");
+ odebug << "connection established but mode set to Idle; BUG!" << oendl;
break;
}
@@ -1220,5 +1209,5 @@ void ServerDTP::connected()
void ServerDTP::connectionClosed()
{
- //qDebug( "Debug: Data connection closed %ld bytes written", bytes_written );
+ //odebug << "Debug: Data connection closed " << bytes_written << " bytes written" << oendl;
// send file mode
@@ -1242,5 +1231,5 @@ void ServerDTP::connectionClosed()
file.close();
if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) {
- qDebug( "STOR incomplete" );
+ odebug << "STOR incomplete" << oendl;
file.remove();
emit failed();
@@ -1251,5 +1240,5 @@ void ServerDTP::connectionClosed()
else if ( RetrieveGzipFile == mode ) {
- qDebug("Done writing ungzip file; closing input");
+ odebug << "Done writing ungzip file; closing input" << oendl;
retrieveTargzProc->flushStdin();
retrieveTargzProc->closeStdin();
@@ -1273,5 +1262,5 @@ void ServerDTP::bytesWritten( int bytes )
if ( bytes_written == file.size() ) {
- // qDebug( "Debug: Sending complete: %d bytes", file.size() );
+ // odebug << "Debug: Sending complete: " << file.size() << " bytes" << oendl;
file.close();
emit completed();
@@ -1290,5 +1279,5 @@ void ServerDTP::bytesWritten( int bytes )
if ( bytes_written == buf.size() ) {
- // qDebug( "Debug: Sending complete: %d bytes", buf.size() );
+ // odebug << "Debug: Sending complete: " << buf.size() << " bytes" << oendl;
emit completed();
mode = Idle;
@@ -1314,5 +1303,5 @@ void ServerDTP::readyRead()
readBlock( s.data(), bytesAvailable() );
retrieveTargzProc->writeToStdin( s );
- qDebug("wrote %d bytes to ungzip ", s.size() );
+ odebug << "wrote " << s.size() << " bytes to ungzip " << oendl;
}
// retrieve buffer mode
@@ -1329,10 +1318,10 @@ void ServerDTP::writeTargzBlock()
QByteArray block = createTargzProc->readStdout();
writeBlock( block.data(), block.size() );
- qDebug("writeTargzBlock %d", block.size());
+ odebug << "writeTargzBlock " << block.size() << "" << oendl;
}
void ServerDTP::targzDone()
{
- qDebug("tar and gzip done");
+ odebug << "tar and gzip done" << oendl;
emit completed();
mode = Idle;
@@ -1371,5 +1360,5 @@ void ServerDTP::sendGzipFile( const QString &fn,
//args += "-cv";
args += archiveTargets;
- qDebug("sendGzipFile %s", args.join(" ").latin1() );
+ odebug << "sendGzipFile " << args.join(" ") << "" << oendl;
createTargzProc->setArguments( args );
connect( createTargzProc,
@@ -1394,5 +1383,5 @@ void ServerDTP::retrieveFile( const QString fn, int fileSize )
void ServerDTP::retrieveGzipFile( const QString &fn )
{
- qDebug("retrieveGzipFile %s", fn.latin1());
+ odebug << "retrieveGzipFile " << fn << "" << oendl;
file.setName( fn );
mode = RetrieveGzipFile;