author | ar <ar> | 2004-06-03 18:50:11 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-03 18:50:11 (UTC) |
commit | f9d940da940c8d42dc072f60ad72e69025650cf8 (patch) (side-by-side diff) | |
tree | d27646ceea53d25f68bc53f770424a3b3c434994 | |
parent | 75922e8dd0f7390932471b5a611d94076a8472f3 (diff) | |
download | opie-f9d940da940c8d42dc072f60ad72e69025650cf8.zip opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.gz opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.bz2 |
- convert to odebug framework
9 files changed, 165 insertions, 71 deletions
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp index 0b8e1fe..c0369ef 100644 --- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp +++ b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp @@ -27,5 +27,5 @@ public: { // you have access to your OApplication object via oApp - qDebug( "Process-wide OApplication object @ %0x", oApp ); + odebug << "Process-wide OApplication object @ " << oApp << "" << oendl; // you have access to global settings via OGlobalSettings @@ -90,5 +90,5 @@ public slots: { m = method; - qDebug( "choosing method: %d", method ); + odebug << "choosing method: " << method << "" << oendl; OConfig* g = OGlobal::config(); g->setGroup( "General" ); diff --git a/libopie2/examples/opiedb/sqltest/main.cpp b/libopie2/examples/opiedb/sqltest/main.cpp index adca5fd..24b7b21 100644 --- a/libopie2/examples/opiedb/sqltest/main.cpp +++ b/libopie2/examples/opiedb/sqltest/main.cpp @@ -1,9 +1,41 @@ -#include <qdir.h> +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Team <opie@handhelds.org> + .>+-= + _;:, .> :=|. This library is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This library is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. -#include <qpe/qpeapplication.h> +*/ + +/* OPIE */ #include <opie2/osqlmanager.h> #include <opie2/osqlquery.h> #include <opie2/osqldriver.h> #include <opie2/osqlresult.h> +#include <opie2/odebug.h> + +#include <qpe/qpeapplication.h> + +/* QT */ +#include <qdir.h> using namespace Opie::DB; @@ -16,10 +48,10 @@ OSQLBackEnd::ValueList list = man.queryBackEnd(); OSQLDriver *driver = man.standard(); - qWarning("testmain" + driver->id() ); + owarn << "testmain" + driver->id() << oendl; driver->setUrl("/home/ich/test2vhgytry"); if ( driver->open() ) { - qWarning("could open"); + owarn << "could open" << oendl; }else - qWarning("wasn't able to open"); + owarn << "wasn't able to open" << oendl; OSQLRawQuery raw("select * from t2" ); OSQLResult res = driver->query( &raw ); diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp index e1a4d5d..c11724c 100644 --- a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp +++ b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp @@ -17,10 +17,10 @@ int main( int argc, char* argv[] ) { OSQLDriver *driver = man.standard(); - qWarning("testmain" + driver->id() ); + owarn << "testmain" + driver->id() << oendl; driver->setUrl("/home/ich/spaltenweise"); if ( driver->open() ) { - qWarning("could open"); + owarn << "could open" << oendl; }else - qWarning("wasn't able to open"); + owarn << "wasn't able to open" << oendl; OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(" "uid,categories,completed," diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp index 2d11ac5..126e797 100644 --- a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp +++ b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp @@ -17,10 +17,10 @@ OSQLBackEnd::ValueList list = man.queryBackEnd(); OSQLDriver *driver = man.standard(); - qWarning("testmain" + driver->id() ); + owarn << "testmain" + driver->id() << oendl; driver->setUrl("/home/ich/zeilenweise"); if ( driver->open() ) { - qWarning("could open"); + owarn << "could open" << oendl; }else - qWarning("wasn't able to open"); + owarn << "wasn't able to open" << oendl; OSQLRawQuery raw2("BEGIN TRANSACTION"); OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(uid,key,value)"); diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp index 8d421fd..bdf2149 100644 --- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp +++ b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp @@ -1,3 +1,33 @@ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Team <opie@handhelds.org> + .>+-= + _;:, .> :=|. This library is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This library is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +/* OPIE */ #include <opie2/osoundsystem.h> +#include <opie2/odebug.h> using namespace Opie::MM; @@ -5,5 +35,5 @@ using namespace Opie::MM; int main( int argc, char** argv ) { - qDebug( "OPIE Sound System Demo" ); + odebug << "OPIE Sound System Demo" << oendl; OSoundSystem* sound = OSoundSystem::instance(); @@ -13,5 +43,5 @@ int main( int argc, char** argv ) while ( it.current() ) { - qDebug( "DEMO: OSoundSystem contains Interface '%s'", (const char*) it.current()->name() ); + odebug << "DEMO: OSoundSystem contains Interface '" << it.current()->name() << "'" << oendl; ++it; } @@ -26,6 +56,7 @@ int main( int argc, char** argv ) for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) { - qDebug( "OSSDEMO: Mixer has channel %s", (const char*) *it ); - qDebug( "OSSDEMO: +--- volume %d (left) | %d (right)", mixer->volume( *it ) & 0xff, mixer->volume( *it ) >> 8 ); + odebug << "OSSDEMO: Mixer has channel " << *it << "" << oendl; + odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff ) + << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl; } diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index 4f8af60..65866af 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp @@ -1,6 +1,37 @@ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Team <opie@handhelds.org> + .>+-= + _;:, .> :=|. This library is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This library is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +/* OPIE */ #include <opie2/onetwork.h> #include <opie2/ostation.h> #include <opie2/omanufacturerdb.h> +#include <opie2/odebug.h> +/* STD */ #include <unistd.h> @@ -9,5 +40,5 @@ using namespace Opie::Net; int main( int argc, char** argv ) { - qDebug( "OPIE Network Demo" ); + odebug << "OPIE Network Demo" << oendl; ONetwork* net = ONetwork::instance(); @@ -17,22 +48,22 @@ int main( int argc, char** argv ) while ( it.current() ) { - qDebug( "DEMO: ONetwork contains Interface '%s'", (const char*) it.current()->name() ); - qDebug( "DEMO: Datalink code is '%d'", it.current()->dataLinkType() ); - qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString() ); - qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString(true) ); - qDebug( "DEMO: MAC Manufacturer seems to be '%s'", (const char*) it.current()->macAddress().manufacturer() ); - qDebug( "DEMO: Manufacturertest1 = '%s'", (const char*) OManufacturerDB::instance()->lookupExt( "08:00:87" ) ); - qDebug( "DEMO: Manufacturertest2 = '%s'", (const char*) OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) ); - qDebug( "Demo: IPv4 Address is '%s'", (const char*) it.current()->ipV4Address() ); + odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl; + odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl; + odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl; + odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl; + odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl; + odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl; + odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl; + odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl; if ( it.current()->isWireless() ) { OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); - qDebug( "DEMO: '%s' seems to feature the wireless extensions.", (const char*) iface->name() ); - qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() ); - qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() ); + odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl; + odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl; + odebug << "DEMO: Antenna is tuned to '" << iface->frequency() << "', that is channel " << iface->channel() << "" << oendl; //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) //{ - //qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP().toString() ); + //odebug << "DEMO: Associated AP has MAC Address '" << iface->associatedAP().toString() << "'" << oendl; //} @@ -40,28 +71,28 @@ int main( int argc, char** argv ) // nickname - qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() ); + odebug << "DEMO: Current NickName is '" << iface->nickName() << "'" << oendl; iface->setNickName( "MyNickName" ); if ( iface->nickName() != "MyNickName" ) - qDebug( "DEMO: Warning! Can't change nickname" ); + odebug << "DEMO: Warning! Can't change nickname" << oendl; else - qDebug( "DEMO: Nickname change successful." ); + odebug << "DEMO: Nickname change successful." << oendl; /* // operation mode - qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() ); + odebug << "DEMO: Current OperationMode is '" << iface->mode() << "'" << oendl; iface->setMode( "adhoc" ); if ( iface->mode() != "adhoc" ) - qDebug( "DEMO: Warning! Can't change operation mode" ); + odebug << "DEMO: Warning! Can't change operation mode" << oendl; else - qDebug( "DEMO: Operation Mode change successful." ); + odebug << "DEMO: Operation Mode change successful." << oendl; // RF channel - qDebug( "DEMO: Current Channel is '%d'", iface->channel() ); + odebug << "DEMO: Current Channel is '" << iface->channel() << "'" << oendl; iface->setChannel( 1 ); if ( iface->channel() != 1 ) - qDebug( "DEMO: Warning! Can't change RF channel" ); + odebug << "DEMO: Warning! Can't change RF channel" << oendl; else - qDebug( "DEMO: RF channel change successful." ); + odebug << "DEMO: RF channel change successful." << oendl; iface->setMode( "managed" ); @@ -76,9 +107,9 @@ int main( int argc, char** argv ) if ( stations ) { - qDebug( "DEMO: # of stations around = %d", stations->count() ); + odebug << "DEMO: # of stations around = " << stations->count() << "" << oendl; OStation* station; for ( station = stations->first(); station != 0; station = stations->next() ) { - qDebug( "DEMO: station dump following..." ); + odebug << "DEMO: station dump following..." << oendl; station->dump(); } @@ -87,5 +118,5 @@ int main( int argc, char** argv ) else { - qDebug( "DEMO: Warning! Scan didn't work!" ); + odebug << "DEMO: Warning! Scan didn't work!" << oendl; } @@ -107,5 +138,5 @@ int main( int argc, char** argv ) iface->setMacAddress( addr ); iface->setUp( true ); - qDebug( "DEMO: MAC Address now is '%s'", (const char*) iface->macAddress().toString() ); + odebug << "DEMO: MAC Address now is '" << iface->macAddress().toString() << "'" << oendl; */ @@ -113,9 +144,9 @@ int main( int argc, char** argv ) // monitor test - - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() ); + + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; iface->setMode( "monitor" ); - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() ); + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; sleep( 1 ); @@ -125,15 +156,15 @@ int main( int argc, char** argv ) //sleep( 1 ); - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() ); + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; /*iface->setMode( "adhoc" ); sleep( 1 ); - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() ); + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; iface->setMode( "managed" ); sleep( 1 ); - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() ); + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; iface->setMode( "master" ); sleep( 1 ); - qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );*/ + odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; */ } diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp index bcda14c..e48395a 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/main.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/main.cpp @@ -24,9 +24,9 @@ int main( int argc, char **argv ) { OApplication a( argc, argv, "Opie UI Demo" ); - qDebug( "." ); + odebug << "." << oendl; OpieUIDemo e; - qDebug( "." ); + odebug << "." << oendl; a.showMainWidget(&e); - qDebug( "." ); + odebug << "." << oendl; return a.exec(); } diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp index 754a744..a2cdd5a 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp @@ -100,5 +100,5 @@ void OpieUIDemo::demo( int d ) void OpieUIDemo::demoOCompletionBox() { - qDebug( "ocompletionbox" ); + odebug << "ocompletionbox" << oendl; OCompletionBox* box = new OCompletionBox( 0 ); @@ -116,5 +116,5 @@ void OpieUIDemo::demoOCompletionBox() void OpieUIDemo::demoOLineEdit() { - qDebug( "olineedit" ); + odebug << "olineedit" << oendl; OLineEdit *edit = new OLineEdit( 0, "lineedit" ); @@ -136,5 +136,5 @@ void OpieUIDemo::demoOLineEdit() void OpieUIDemo::demoOComboBox() { - qDebug( "ocombobox" ); + odebug << "ocombobox" << oendl; OComboBox *combo = new OComboBox( true, 0, "combobox" ); @@ -161,5 +161,5 @@ void OpieUIDemo::demoOComboBox() void OpieUIDemo::demoOEditListBox() { - qDebug( "oeditlistbox" ); + odebug << "oeditlistbox" << oendl; OEditListBox* edit = new OEditListBox( "OEditListBox", 0, "editlistbox" ); @@ -186,5 +186,5 @@ void OpieUIDemo::demoOEditListBox() void OpieUIDemo::demoOSelector() { - qDebug( "oselector" ); + odebug << "oselector" << oendl; OHSSelector* sel = new OHSSelector( 0, "gradientselector" ); diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp index b6d59aa..e8bbdb1 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp @@ -103,58 +103,58 @@ OVersatileViewDemo::~OVersatileViewDemo() void OVersatileViewDemo::selectionChanged() { - qDebug( "received signal selectionChanged()" ); + odebug << "received signal selectionChanged()" << oendl; } void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item ) { - qDebug( "received signal selectionChanged(OVersatileViewItem*)" ); + odebug << "received signal selectionChanged(OVersatileViewItem*)" << oendl; } void OVersatileViewDemo::currentChanged( OVersatileViewItem * item ) { - qDebug( "received signal currentChanged( OVersatileViewItem * )" ); + odebug << "received signal currentChanged( OVersatileViewItem * )" << oendl; } void OVersatileViewDemo::clicked( OVersatileViewItem * item ) { - qDebug( "received signal clicked( OVersatileViewItem * )" ); + odebug << "received signal clicked( OVersatileViewItem * )" << oendl; } void OVersatileViewDemo::pressed( OVersatileViewItem * item ) { - qDebug( "received signal pressed( OVersatileViewItem * )" ); + odebug << "received signal pressed( OVersatileViewItem * )" << oendl; } void OVersatileViewDemo::doubleClicked( OVersatileViewItem *item ) { - qDebug( "received signal doubleClicked( OVersatileViewItem *item )" ); + odebug << "received signal doubleClicked( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::returnPressed( OVersatileViewItem *item ) { - qDebug( "received signal returnPressed( OVersatileViewItem *item )" ); + odebug << "received signal returnPressed( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::onItem( OVersatileViewItem *item ) { - qDebug( "received signal onItem( OVersatileViewItem *item )" ); + odebug << "received signal onItem( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::onViewport() { - qDebug( "received signal onViewport()" ); + odebug << "received signal onViewport()" << oendl; } void OVersatileViewDemo::expanded( OVersatileViewItem *item ) { - qDebug( "received signal expanded( OVersatileViewItem *item )" ); + odebug << "received signal expanded( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::collapsed( OVersatileViewItem *item ) { - qDebug( "received signal collapsed( OVersatileViewItem *item )" ); + odebug << "received signal collapsed( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::moved() { - qDebug( "received signal moved( OVersatileViewItem *item )" ); + odebug << "received signal moved( OVersatileViewItem *item )" << oendl; } void OVersatileViewDemo::contextMenuRequested( OVersatileViewItem *item, const QPoint& pos, int col ) { - qDebug( "received signal contextMenuRequested( OVersatileViewItem *item )" ); + odebug << "received signal contextMenuRequested( OVersatileViewItem *item )" << oendl; } |