summaryrefslogtreecommitdiff
authorar <ar>2004-05-15 22:36:18 (UTC)
committer ar <ar>2004-05-15 22:36:18 (UTC)
commit736a153edfac343d0794ecafc5dc2f2c405260a7 (patch) (side-by-side diff)
treeebb41331403fa78769df2a344bfe12bbd1df6c46
parentd4a82558ff3ae6ed7bbc5dbc9857461057eb3da3 (diff)
downloadopie-736a153edfac343d0794ecafc5dc2f2c405260a7.zip
opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.gz
opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.bz2
- convert qDebug to odebug
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp52
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp29
3 files changed, 43 insertions, 42 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index f918767..9638686 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -41,2 +41,3 @@
#include <opie2/otabwidget.h>
+#include <opie2/odebug.h>
@@ -834,3 +835,4 @@ public:
- qDebug ( "ExEdit: [%s] at %d,%d %d,%d", it->text(2).latin1(),x,y,w,h);
+ odebug << "ExEdit: [" << it->text(2).latin1() << "] at "
+ << x << "," << y << " " << w << "," << h << oendl;
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index 5913a22..3bc7d43 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -172,3 +172,3 @@ bool Modem::opentty() {
if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) {
- odebug << "error opening modem device !" << oendl;
+ odebug << "error opening modem device !" << oendl;
errmsg = QObject::tr("Unable to open modem.");
@@ -313,5 +313,5 @@ void Modem::startNotifier() {
connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
- odebug << "QSocketNotifier started!" << oendl;
+ odebug << "QSocketNotifier started!" << oendl;
} else {
- odebug << "QSocketNotifier re-enabled!" << oendl;
+ odebug << "QSocketNotifier re-enabled!" << oendl;
sn->setEnabled(true);
@@ -328,3 +328,3 @@ void Modem::stopNotifier() {
sn = 0;
- odebug << "QSocketNotifier stopped!" << oendl;
+ odebug << "QSocketNotifier stopped!" << oendl;
}
@@ -344,3 +344,3 @@ bool Modem::writeChar(unsigned char c) {
if (s < 0) {
- oerr << "write() in Modem::writeChar failed" << oendl;
+ oerr << "write() in Modem::writeChar failed" << oendl;
return false;
@@ -372,3 +372,3 @@ bool Modem::writeLine(const char *buf) {
// TODO do something meaningful with the error code (or ignore it
- oerr << "write() in Modem::writeLine failed" << oendl;
+ oerr << "write() in Modem::writeLine failed" << oendl;
delete[] b;
@@ -481,3 +481,3 @@ QString Modem::parseModemSpeed(const QString &s) {
- odebug << "Modem reported result string: " << s.latin1() << "" << oendl;
+ odebug << "Modem reported result string: " << s.latin1() << "" << oendl;
@@ -567,3 +567,3 @@ QString Modem::parseModemSpeed(const QString &s) {
- odebug << "The parsed result is: " << result.latin1() << "" << oendl;
+ odebug << "The parsed result is: " << result.latin1() << "" << oendl;
@@ -580,3 +580,3 @@ int Modem::lockdevice() {
if(!_pppdata->modemLockFile()) {
- odebug << "The user doesn't want a lockfile." << oendl;
+ odebug << "The user doesn't want a lockfile." << oendl;
return 0;
@@ -602,3 +602,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
- odebug << "Device is locked by: " << oldlock << "" << oendl;
+ odebug << "Device is locked by: " << oldlock << "" << oendl;
@@ -615,3 +615,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
- odebug << "lockfile is stale" << oendl;
+ odebug << "lockfile is stale" << oendl;
}
@@ -622,3 +622,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
sprintf(newlock,"%010d\n", getpid());
- odebug << "Locking Device: " << newlock << "" << oendl;
+ odebug << "Locking Device: " << newlock << "" << oendl;
@@ -639,3 +639,3 @@ void Modem::unlockdevice() {
if (modem_is_locked) {
- odebug << "UnLocking Modem Device" << oendl;
+ odebug << "UnLocking Modem Device" << oendl;
close(modemfd);
@@ -661,3 +661,3 @@ int Modem::openLockfile( QString lockfile, int flags)
lockfile += device.right( device.length() - device.findRev("/") -1 );
- odebug << "lockfile >" << lockfile.latin1() << "<" << oendl;
+ odebug << "lockfile >" << lockfile.latin1() << "<" << oendl;
// TODO:
@@ -673,3 +673,3 @@ int Modem::openLockfile( QString lockfile, int flags)
if ((fd = open(lockfile, flags, mode)) == -1) {
- odebug << "error opening lockfile!" << oendl;
+ odebug << "error opening lockfile!" << oendl;
lockfile = QString::null;
@@ -934,3 +934,3 @@ bool Modem::execpppd(const char *arguments) {
default:
- odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl;
+ odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl;
close(modemfd);
@@ -942,3 +942,3 @@ bool Modem::execpppd(const char *arguments) {
if ( !(flag & O_NONBLOCK) ) {
- odebug << "Setting nonblocking io" << oendl;
+ odebug << "Setting nonblocking io" << oendl;
flag |= O_NONBLOCK;
@@ -961,3 +961,3 @@ bool Modem::execpppd(const char *arguments) {
bool Modem::killpppd() {
- odebug << "In killpppd and pid is " << pppdPid << "" << oendl;
+ odebug << "In killpppd and pid is " << pppdPid << "" << oendl;
if(pppdPid > 0) {
@@ -965,7 +965,7 @@ bool Modem::killpppd() {
m_modemDebug = 0;
- odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl;
+ odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl;
if(kill(pppdPid, SIGTERM) < 0) {
- odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl;
+ odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl;
if(kill(pppdPid, SIGKILL) < 0) {
- odebug << "Error killing " << pppdPid << "\n" << oendl;
+ odebug << "Error killing " << pppdPid << "\n" << oendl;
return false;
@@ -1006,7 +1006,7 @@ void Modem::parseargs(char* buf, char** args) {
while ((*buf != '\0') && (*buf != '\n') &&
- (*buf != '\t') && (*buf != ' '))
- buf++;
+ (*buf != '\t') && (*buf != ' '))
+ buf++;
else {
while ((*buf != '\0') && (*buf != quotes))
- buf++;
+ buf++;
*buf++ = '\0';
@@ -1042,3 +1042,3 @@ int Modem::openResolv(int flags)
if ((fd = open(_PATH_RESCONF, flags)) == -1) {
- odebug << "error opening resolv.conf!" << oendl;
+ odebug << "error opening resolv.conf!" << oendl;
fd = open(DEVNULL, O_RDONLY);
@@ -1063,3 +1063,3 @@ pid_t Modem::pppPID()const {
void Modem::setPPPDPid( pid_t pid ) {
- odebug << "Modem setting pid" << oendl;
+ odebug << "Modem setting pid" << oendl;
_pppdExitStatus = -1;
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index 4294b12..d36a702 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -56,3 +56,3 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
if (file.exists()) {
- owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl;
+ owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl;
}
@@ -237,3 +237,3 @@ void WLANImp::writeOpts() {
- odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl;
+ odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl;
@@ -311,3 +311,3 @@ void WLANImp::rescanNeighbourhood()
QString name = interface->getInterfaceName();
- odebug << "rescanNeighbourhood via '" << name << "'" << oendl;
+ odebug << "rescanNeighbourhood via '" << name << "'" << oendl;
@@ -334,3 +334,3 @@ void WLANImp::rescanNeighbourhood()
{
- owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl;
+ owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl;
return;
@@ -339,3 +339,3 @@ void WLANImp::rescanNeighbourhood()
{
- odebug << "rescanNeighbourhood(): device type seems to be '" << devicetype << "'" << oendl;
+ odebug << "rescanNeighbourhood(): device type seems to be '" << devicetype << "'" << oendl;
}
@@ -353,3 +353,3 @@ void WLANImp::rescanNeighbourhood()
{
- odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl;
+ odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl;
return;
@@ -360,3 +360,3 @@ void WLANImp::rescanNeighbourhood()
{
- owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl;
+ owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl;
return;
@@ -369,3 +369,3 @@ void WLANImp::rescanNeighbourhood()
{
- owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl;
+ owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl;
return;
@@ -402,3 +402,3 @@ void WLANImp::rescanNeighbourhood()
qApp->processEvents();
- odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl;
+ odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl;
OPacket* p = cap->next( 1000 );
@@ -406,3 +406,3 @@ void WLANImp::rescanNeighbourhood()
{
- odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl;
+ odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl;
}
@@ -410,3 +410,3 @@ void WLANImp::rescanNeighbourhood()
{
- odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl;
+ odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl;
handlePacket( p );
@@ -443,3 +443,3 @@ void WLANImp::handlePacket( OPacket* p )
{
- owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
+ owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
return;
@@ -460,5 +460,4 @@ void WLANImp::displayFoundNetwork( const QString& mode, int channel, const QStri
- qDebug( "found network: <%s>, chn %d, ssid '%s', mac '%s'", (const char*) mode, channel,
- (const char*) ssid,
- (const char*) mac.toString() );
+ odebug << "found network: <" << (const char*) mode << ">, chn " << channel
+ << ", ssid '" << (const char*) ssid << "', mac '" << (const char*) mac.toString() << "'" << oendl;