232 files changed, 1812 insertions, 1588 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index ae7fbd0..34802fb 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp @@ -12,18 +12,18 @@ #include "autorotate.h" /* OPIE */ -#include <opie2/odevice.h> +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/resource.h> +using namespace Opie::Core; /* QT */ #include <qpainter.h> -using namespace Opie::Ui; AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) { setFixedWidth( AppLnk::smallIconSize() ); setFixedHeight( AppLnk::smallIconSize() ); @@ -86,11 +86,11 @@ bool AutoRotate::isRotateEnabled() bool res = cfg.readBoolEntry( "rotateEnabled" ); if (res ) - qDebug("Enabled"); + odebug << "Enabled" << oendl; else - qDebug("Disabled"); + odebug << "Disabled" << oendl; return res; } EXPORT_OPIE_APPLET_v1( AutoRotate ) diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp index 9416db3..a71078f 100644 --- a/noncore/applets/memoryapplet/swapfile.cpp +++ b/noncore/applets/memoryapplet/swapfile.cpp @@ -19,8 +19,14 @@ **********************************************************************/ #include "swapfile.h" +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/resource.h> +using namespace Opie::Core; + +/* QT */ #include <qfile.h> #include <qtextstream.h> #include <qlabel.h> #include <qtimer.h> @@ -33,15 +39,14 @@ #include <qcombobox.h> #include <qvgroupbox.h> #include <qhbox.h> #include <qmessagebox.h> +#include <qcopchannel_qws.h> + +/* STD */ #include <stdio.h> #include <stdlib.h> #include <string.h> - -#include <qcopchannel_qws.h> -#include <qpe/resource.h> - #include <unistd.h> #include <fcntl.h> #include <sys/vfs.h> #include <mntent.h> @@ -212,9 +217,9 @@ void Swapfile::getStatusPcmcia() } } } else { // no file found - qDebug("no file found"); + odebug << "no file found" << oendl; cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; } Swapfile::cfsdchecked(); diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp index 5eb5ad2..534a8d0 100644 --- a/noncore/applets/networkapplet/networkapplet.cpp +++ b/noncore/applets/networkapplet/networkapplet.cpp @@ -35,19 +35,21 @@ #include <opie2/onetwork.h> #include <opie2/otaskbarapplet.h> #include <qpe/applnk.h> #include <qpe/resource.h> -#include <qpainter.h> +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Net; /* QT */ +#include <qpainter.h> #include <qlabel.h> #include <qlayout.h> #include <qobjectlist.h> +/* STD */ #include <assert.h> -using namespace Opie::Ui; -using namespace Opie::Net; IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) :QToolButton( parent, name ) { _iface = ONetwork::instance()->interface( name ); @@ -166,17 +168,17 @@ QString NetworkAppletControl::guessDevice( ONetworkInterface* iface ) void NetworkAppletControl::showEvent( QShowEvent* e ) { - qDebug( "showEvent" ); + odebug << "showEvent" << oendl; build(); QWidget::showEvent( e ); } void NetworkAppletControl::hideEvent( QHideEvent* e ) { - qDebug( "hideEvent" ); + odebug << "hideEvent" << oendl; QWidget::hideEvent( e ); delete l; @@ -191,9 +193,9 @@ void NetworkAppletControl::hideEvent( QHideEvent* e ) } list = const_cast<QObjectList*>( children() ); if ( list ) - qWarning( "D'oh! We still have %d children...", list->count() ); + owarn << "D'oh! We still have " << list->count() << " children..." << oendl; // renew layout l = new QVBoxLayout( this, 4, 2 ); resize( 0, 0 ); @@ -202,9 +204,9 @@ void NetworkAppletControl::hideEvent( QHideEvent* e ) QSize NetworkAppletControl::sizeHint() const { ONetwork::instance()->synchronize(); // rebuild interface database - qDebug( "sizeHint (#ifaces=%d)", ONetwork::instance()->count() ); + odebug << "sizeHint (#ifaces=" << ONetwork::instance()->count() << ")" << oendl; return QSize( 14+35+105+14 + 8, ONetwork::instance()->count() * 26 ); } diff --git a/noncore/applets/notesapplet/config.in b/noncore/applets/notesapplet/config.in index 27a8187..c92c1d5 100644 --- a/noncore/applets/notesapplet/config.in +++ b/noncore/applets/notesapplet/config.in @@ -1,4 +1,4 @@ config NOTESAPPLET boolean "opie-notesapplet (quick note taking applet)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 13f7cf3..b3e72a7 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -14,27 +14,26 @@ **********************************************************************/ #include "notes.h" -#include <qapplication.h> -#include <stdlib.h> -#include <qstringlist.h> - +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> #include <qpe/filemanager.h> #include <qpe/qpeapplication.h> #include <qpe/timestring.h> #include <qpe/applnk.h> #include <qpe/ir.h> #include <qpe/config.h> +using namespace Opie::Core; +using namespace Opie::Ui; -// #include <qsocket.h> -// #include <qclipboard.h> +/* QT */ #include <qmultilineedit.h> #include <qlistbox.h> #include <qpopupmenu.h> #include <qmessagebox.h> - +#include <qapplication.h> #include <qdir.h> #include <qfile.h> #include <qpoint.h> #include <qpushbutton.h> @@ -42,12 +41,15 @@ #include <qlayout.h> #include <qframe.h> #include <qpixmap.h> #include <qstring.h> +#include <qstringlist.h> #include <qtimer.h> +/* STD */ +#include <stdlib.h> + /* XPM */ -using namespace Opie::Ui; static char * notes_xpm[] = { "16 16 11 1", " c None", ". c #000000", @@ -83,11 +85,11 @@ NotesControl::NotesControl( QWidget *, const char * ) // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) { QDir d( QDir::homeDirPath()+"/notes"); if( !d.exists()) { - qDebug("make dir"); + odebug << "make dir" << oendl; if(!d.mkdir( QDir::homeDirPath()+"/notes", true)) - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed"); + odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl; } Config cfg("Notes"); cfg.setGroup("Options"); showMax = cfg.readBoolEntry("ShowMax", false); @@ -164,9 +166,9 @@ void NotesControl::slotDeleteButtonClicked() { void NotesControl::slotDeleteButton() { QString selectedText = box->currentText(); - qDebug("deleting "+selectedText); + odebug << "deleting "+selectedText << oendl; if( !selectedText.isEmpty()) { Config cfg("Notes"); @@ -175,14 +177,14 @@ void NotesControl::slotDeleteButton() { QString entryName, entryName2;; for ( int i = 0; i < noOfFiles; i++ ) { entryName.sprintf( "File%i", i + 1 ); if(selectedText == cfg.readEntry( entryName )) { - qDebug("removing %s, %d", selectedText.latin1(), i); + odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl; for ( int j = i; j < noOfFiles; j++ ) { entryName.sprintf( "File%i", i + 1 ); entryName2.sprintf( "File%i", i + 2 ); QString temp = cfg.readEntry(entryName2); - qDebug("move "+temp); + odebug << "move "+temp << oendl; cfg.writeEntry(entryName, temp); i++; } cfg.writeEntry("NumberOfFiles", noOfFiles-1 ); @@ -191,12 +193,12 @@ void NotesControl::slotDeleteButton() { cfg.write(); DocLnk nf(selectedText); nf.removeFiles(); QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop"; - qDebug(fi); + odebug << fi << oendl; QFile f( fi); - if( !f.remove()) qDebug(".desktop file not removed"); + if( !f.remove()) odebug << ".desktop file not removed" << oendl; } } view->clear(); @@ -282,9 +284,9 @@ void NotesControl::focusOutEvent ( QFocusEvent * e) { void NotesControl::save() { Config cfg("Notes"); cfg.setGroup("Docs"); if( edited) { -// qDebug("is edited"); +// odebug << "is edited" << oendl; QString rt = view->text(); if( rt.length()>1) { QString pt = rt.simplifyWhiteSpace(); int i = pt.find( ' ', pt.find( ' ' )+2 ); @@ -300,9 +302,9 @@ void NotesControl::save() { if ( docname.length() > 40 ) docname = docname.left(40); if ( docname.isEmpty() ) docname = "Empty Text"; -// qDebug(docname); +// odebug << docname << oendl; if( oldDocName != docname) { int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); QString entryName; @@ -311,13 +313,13 @@ void NotesControl::save() { cfg.writeEntry("NumberOfFiles", noOfFiles+1 ); cfg.write(); } // else -// qDebug("oldname equals docname"); +// odebug << "oldname equals docname" << oendl; doc = new DocLnk(docname); if(QFile(doc->linkFile()).exists()) - qDebug("puppie"); + odebug << "puppie" << oendl; doc->setType("text/plain"); doc->setName(docname); QString temp = docname.replace( QRegExp(" "), "_" ); doc->setFile( QDir::homeDirPath()+"/notes/"+temp); @@ -326,9 +328,9 @@ void NotesControl::save() { } oldDocName=docname; edited=false; -// qDebug("save"); +// odebug << "save" << oendl; if (doPopulate) populateBox(); } cfg.writeEntry( "LastDoc",oldDocName ); @@ -338,9 +340,9 @@ void NotesControl::save() { } void NotesControl::populateBox() { box->clear(); -// qDebug("populate"); +// odebug << "populate" << oendl; Config cfg("Notes"); cfg.setGroup("Docs"); int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); QStringList list; @@ -373,9 +375,9 @@ void NotesControl::load() { } } void NotesControl::load(const QString & file) { - qDebug("loading "+file); + odebug << "loading "+file << oendl; QString name = file; QString temp; if( !QFile( QDir::homeDirPath()+"/"+file).exists() ) temp = QDir::homeDirPath()+"/notes/"+ name.replace( QRegExp(" "), "_" ); @@ -400,9 +402,9 @@ void NotesControl::load(const QString & file) { void NotesControl::loadDoc( const DocLnk &f) { FileManager fm; QString txt; if ( !fm.loadFile( f, txt ) ) { - qDebug("could not load file "+f.file()); + odebug << "could not load file "+f.file() << oendl; return; } view->setText(txt); } @@ -434,9 +436,9 @@ void NotesControl::slotSearch() { // switch ( e->state() ) { // case ControlButton: // if(e->key() == Key_C) { //copy -// qDebug("copy"); +// odebug << "copy" << oendl; // QClipboard *cb = QApplication::clipboard(); // QString text; // // Copy text from the clipboard (paste) @@ -481,12 +483,12 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { } else { // vc = new NotesControl; // QPoint curPos = mapToGlobal( rect().topLeft() ); if(vc->showMax) { - qDebug("show max"); + odebug << "show max" << oendl; vc->showMaximized(); } else { - qDebug("no show max"); + odebug << "no show max" << oendl; QWidget *wid = QPEApplication::desktop(); QRect rect = QApplication::desktop()->geometry(); vc->setGeometry( ( wid->width() / 2) - ( vc->width() / 2 ) , 28 , wid->width() -10 , 180); vc->move ( (rect.center()/2) - (vc->rect().center()/2)); diff --git a/noncore/applets/notesapplet/notesapplet.pro b/noncore/applets/notesapplet/notesapplet.pro index 44e5b34..c3f9b1c 100644 --- a/noncore/applets/notesapplet/notesapplet.pro +++ b/noncore/applets/notesapplet/notesapplet.pro @@ -5,8 +5,8 @@ SOURCES = notes.cpp TARGET = notesapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -VERSION = 1.0.0 +LIBS += -lqpe -lopiecore2 +VERSION = 1.0.1 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp index 0491a86..364f3ad 100644 --- a/noncore/applets/wirelessapplet/wireless.cpp +++ b/noncore/applets/wirelessapplet/wireless.cpp @@ -15,12 +15,16 @@ #include "mgraph.h" #include "advancedconfig.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/onetwork.h> #include <opie2/otaskbarapplet.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Net; /* QT */ #include <qradiobutton.h> #include <qpushbutton.h> @@ -42,10 +46,8 @@ //#define MDEBUG #undef MDEBUG -using namespace Opie::Ui; -using namespace Opie::Net; WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const char *name ) : QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet ) { @@ -206,25 +208,25 @@ void WirelessApplet::checkInterface() if ( interface ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: using interface '%s'", ( const char* ) interface->name() ); + odebug << "WIFIAPPLET: using interface '" << ( const char* ) interface->name() << "'" << oendl; #endif } else { #ifdef MDEBUG - qDebug( "WIFIAPPLET: D'oh! No Wireless interface present... :(" ); + odebug << "WIFIAPPLET: D'oh! No Wireless interface present... :(" << oendl; #endif hide(); } } void WirelessApplet::renewDHCP() { #ifdef MDEBUG - qDebug( "WIFIAPPLET: Going to request a DHCP configuration renew." ); + odebug << "WIFIAPPLET: Going to request a DHCP configuration renew." << oendl; #endif QString pidfile; if ( !interface ) @@ -234,9 +236,9 @@ void WirelessApplet::renewDHCP() // At first we are trying dhcpcd pidfile.sprintf( "/var/run/dhcpcd-%s.pid", ( const char* ) ifacename ); #ifdef MDEBUG - qDebug( "WIFIAPPLET: dhcpcd pidfile is '%s'", ( const char* ) pidfile ); + odebug << "WIFIAPPLET: dhcpcd pidfile is '" << ( const char* ) pidfile << "'" << oendl; #endif int pid; QFile pfile( pidfile ); bool hasFile = pfile.open( IO_ReadOnly ); @@ -244,30 +246,30 @@ void WirelessApplet::renewDHCP() if ( hasFile ) { s >> pid; #ifdef MDEBUG - qDebug( "WIFIAPPLET: sent SIGALARM to pid %d", pid ); + odebug << "WIFIAPPLET: sent SIGALARM to pid " << pid << "" << oendl; #endif kill( pid, SIGALRM ); return ; } // No dhcpcd, so we are trying udhcpc #ifdef MDEBUG - qDebug( "WIFIAPPLET: dhcpcd not available." ); + odebug << "WIFIAPPLET: dhcpcd not available." << oendl; #endif pidfile.sprintf( "/var/run/udhcpc.%s.pid", ( const char* ) ifacename ); #ifdef MDEBUG - qDebug( "WIFIAPPLET: udhcpc pidfile is '%s'", ( const char* ) pidfile ); + odebug << "WIFIAPPLET: udhcpc pidfile is '" << ( const char* ) pidfile << "'" << oendl; #endif QFile pfile2( pidfile ); hasFile = pfile2.open( IO_ReadOnly ); QTextStream s2( &pfile2 ); if ( hasFile ) { s2 >> pid; #ifdef MDEBUG - qDebug( "WIFIAPPLET: sent SIGUSR1 to pid %d", pid ); + odebug << "WIFIAPPLET: sent SIGUSR1 to pid " << pid << "" << oendl; #endif kill( pid, SIGUSR1 ); return ; } @@ -302,16 +304,16 @@ WirelessApplet::~WirelessApplet() void WirelessApplet::timerEvent( QTimerEvent* ) { #ifdef MDEBUG - qDebug( "WirelessApplet::timerEvent" ); + odebug << "WirelessApplet::timerEvent" << oendl; #endif if ( interface ) { if ( !ONetwork::instance()->isPresent( (const char*) interface->name() ) ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: Interface no longer present." ); + odebug << "WIFIAPPLET: Interface no longer present." << oendl; #endif interface = 0L; mustRepaint(); return; @@ -319,9 +321,9 @@ void WirelessApplet::timerEvent( QTimerEvent* ) if ( mustRepaint() ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: A value has changed -> repainting." ); + odebug << "WIFIAPPLET: A value has changed -> repainting." << oendl; #endif repaint(); } @@ -355,16 +357,16 @@ bool WirelessApplet::mustRepaint() oldiface = interface; if ( interface ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: We had no interface but now we have one! :-)" ); + odebug << "WIFIAPPLET: We had no interface but now we have one! :-)" << oendl; #endif show(); } else { #ifdef MDEBUG - qDebug( "WIFIAPPLET: We had a interface but now we don't have one! ;-(" ); + odebug << "WIFIAPPLET: We had a interface but now we don't have one! ;-(" << oendl; #endif hide(); return true; } @@ -394,30 +396,30 @@ bool WirelessApplet::mustRepaint() if ( rocESSID && ( oldESSID != interface->SSID() ) ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: ESSID has changed." ); + odebug << "WIFIAPPLET: ESSID has changed." << oendl; #endif renewDHCP(); } else if ( rocFREQ && ( oldFREQ != interface->frequency() ) ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: FREQ has changed." ); + odebug << "WIFIAPPLET: FREQ has changed." << oendl; #endif renewDHCP(); } else if ( rocAP && ( oldAP != interface->associatedAP().toString() ) ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: AP has changed." ); + odebug << "WIFIAPPLET: AP has changed." << oendl; #endif renewDHCP(); } else if ( rocMODE && ( oldMODE != interface->mode() ) ) { #ifdef MDEBUG - qDebug( "WIFIAPPLET: MODE has changed." ); + odebug << "WIFIAPPLET: MODE has changed." << oendl; #endif renewDHCP(); } @@ -449,9 +451,9 @@ void WirelessApplet::updatePopupWindow() int WirelessApplet::numberOfRings() { if ( !interface ) return -1; int qualityH = interface->signalStrength(); - qDebug( "quality = %d", qualityH ); + odebug << "quality = " << qualityH << "" << oendl; if ( qualityH < 1 ) return -1; if ( qualityH < 20 ) return 0; if ( qualityH < 40 ) return 1; if ( qualityH < 60 ) return 2; @@ -480,9 +482,9 @@ void WirelessApplet::paintEvent( QPaintEvent* ) p.drawLine( w/2+m+m, h/2-m-m, w/2-m-m, h/2+m+m ); return; } - qDebug( "WirelessApplet: painting %d rings", rings ); + odebug << "WirelessApplet: painting " << rings << " rings" << oendl; int radius = 2; int rstep = 4; int maxrings = w/rstep; diff --git a/noncore/applets/zkbapplet/zkbwidget.cpp b/noncore/applets/zkbapplet/zkbwidget.cpp index 3acff1e..13d554c 100644 --- a/noncore/applets/zkbapplet/zkbwidget.cpp +++ b/noncore/applets/zkbapplet/zkbwidget.cpp @@ -93,9 +93,9 @@ QSize ZkbWidget::sizeHint() const { return QSize(AppLnk::smallIconSize(),AppLnk::smallIconSize()); } void ZkbWidget::stateChanged(const QString& s) { -// qDebug("stateChanged: %s\n", (const char*) s.utf8()); +// odebug << "stateChanged: " << (const char*) s.utf8() << "\n" << oendl; setText(s); } void ZkbWidget::labelChanged(int id) { diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a60d6ce..a47edd8 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -70,9 +70,9 @@ void AdvancedFm::cleanUp() { file.remove(); } void AdvancedFm::tabChanged(QWidget *) { -// qWarning("tab changed"); +// owarn << "tab changed" << oendl; QString path = CurrentDir()->canonicalPath(); currentPathCombo->lineEdit()->setText( path ); if(whichTab == 1) { @@ -92,15 +92,15 @@ void AdvancedFm::tabChanged(QWidget *) { void AdvancedFm::populateView() { -// qWarning("PopulateView"); +// owarn << "PopulateView" << oendl; QPixmap pm; QListView *thisView = CurrentView(); QDir *thisDir = CurrentDir(); QString path = thisDir->canonicalPath(); -//qWarning("path is "+path); +//owarn << "path is "+path << oendl; thisView->clear(); thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); thisDir->setMatchAllDirs(TRUE); thisDir->setNameFilter(filterStr); @@ -159,9 +159,9 @@ void AdvancedFm::populateView() { pm = unknownXpm; } } if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { - // qDebug(" overlay link image"); + // odebug << " overlay link image" << oendl; pm= Resource::loadPixmap( "advancedfm/symlink" ); // pm= Resource::loadPixmap( "folder" ); // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); // QPainter painter( &pm ); @@ -183,9 +183,9 @@ void AdvancedFm::populateView() { if((dir = opendir( path.latin1())) != NULL) while ((mydirent = readdir(dir)) != NULL) { lstat( mydirent->d_name, &buf); -// qDebug(mydirent->d_name); +// odebug << mydirent->d_name << oendl; fileL.sprintf("%s", mydirent->d_name); devT = buf.st_dev; fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); fileDate.sprintf("%s", ctime( &buf.st_mtime)); @@ -208,9 +208,9 @@ void AdvancedFm::rePopulate() { setOtherTabCurrent(); populateView(); // int tmpTab = whichTab; -// // qDebug("%d", tmpTab); +// // odebug << "" << tmpTab << "" << oendl; // for(int i =1; i < 3; i++) { // TabWidget->setCurrentWidget(i - 1); // populateView(); @@ -218,12 +218,12 @@ void AdvancedFm::rePopulate() { // TabWidget->setCurrentWidget( tmpTab - 1); } void AdvancedFm::ListClicked(QListViewItem *selectedItem) { -//qWarning("listclicked"); +//owarn << "listclicked" << oendl; if(selectedItem) { QString strItem=selectedItem->text(0); -// qWarning(strItem); +// owarn << strItem << oendl; QString strSize=selectedItem->text(1); strSize=strSize.stripWhiteSpace(); bool isDirectory = false; QString strItem2; @@ -266,15 +266,15 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in } void AdvancedFm::switchToLocalTab() { -//qWarning("switch to local view"); +//owarn << "switch to local view" << oendl; TabWidget->setCurrentWidget(0); Local_View->setFocus(); } void AdvancedFm::switchToRemoteTab() { -//qWarning("switch to local view"); +//owarn << "switch to local view" << oendl; TabWidget->setCurrentWidget(1); Remote_View->setFocus(); } @@ -328,9 +328,9 @@ QStringList AdvancedFm::getPath() { QListViewItemIterator it( thisView ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) { strList << it.current()->text(0); -// qDebug(it.current()->text(0)); +// odebug << it.current()->text(0) << oendl; } } return strList; } @@ -379,9 +379,9 @@ void AdvancedFm::doAbout() { "and is licensed by the GPL")); } void AdvancedFm::keyPressEvent( QKeyEvent *e) { -// qWarning("key %d", e->key()); +// owarn << "key " << e->key() << "" << oendl; // if( CurrentView()->hasFocus() ) { switch ( e->key() ) { case Key_Left: @@ -637,9 +637,9 @@ void AdvancedFm::addToDocs() { if( strListPaths.count() > 0) { QString curFile; for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { curFile = thisDir->canonicalPath()+"/"+(*it); -// qDebug(curFile); +// odebug << curFile << oendl; QFileInfo fi(curFile); DocLnk f; // curFile.replace(QRegExp("\\..*"),""); f.setName(fi.baseName() ); @@ -710,9 +710,9 @@ void AdvancedFm::addCustomDir() { cfg.write(); } void AdvancedFm::removeCustomDir() { -// qDebug("remove custom dir"); +// odebug << "remove custom dir" << oendl; Config cfg("AdvancedFm"); cfg.setGroup("Menu"); QString dir; QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); @@ -745,9 +745,9 @@ void AdvancedFm::removeCustomDir() { } void AdvancedFm::gotoCustomDir(const QString &dir) { -// qDebug("gotoCustomDir(const QString &dir) " +dir ); +// odebug << "gotoCustomDir(const QString &dir) " +dir << oendl; // QString curDir = dir; // QDir *thisDir = CurrentDir(); // if( curDir.isEmpty()) { // } @@ -786,12 +786,12 @@ QDir *AdvancedFm::OtherDir() { } QListView * AdvancedFm::CurrentView() { if ( whichTab == 1) { -// qWarning("CurrentView Tab 1"); +// owarn << "CurrentView Tab 1" << oendl; return Local_View; } else { -// qWarning("CurrentView Tab 2"); +// owarn << "CurrentView Tab 2" << oendl; return Remote_View; } } @@ -802,9 +802,9 @@ QListView * AdvancedFm::OtherView() { return Local_View; } void AdvancedFm::setOtherTabCurrent() { -// qWarning("setOtherTabCurrent() %d", whichTab); +// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl; if ( whichTab == 1) { TabWidget->setCurrentWidget(1); } else { TabWidget->setCurrentWidget(0); @@ -813,12 +813,12 @@ void AdvancedFm::setOtherTabCurrent() { OtherView()->setSelected( CurrentView()->firstChild(), true); } void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { -// qDebug("qcop message "+msg ); +// odebug << "qcop message "+msg << oendl; QDataStream stream ( data, IO_ReadOnly ); if ( msg == "openDirectory(QString)" ) { -// qDebug("received"); +// odebug << "received" << oendl; QString file; stream >> file; gotoDirectory( (const QString &) file); } @@ -829,9 +829,9 @@ void AdvancedFm::setDocument(const QString &file) { } void AdvancedFm::gotoDirectory(const QString &file) { -// qWarning("goto dir "+file); +// owarn << "goto dir "+file << oendl; QString curDir = file; QDir *thisDir = CurrentDir(); if(QDir( curDir).exists() ) { thisDir->setPath( curDir ); @@ -865,9 +865,9 @@ void AdvancedFm::findFile(const QString &fileName) { } } void AdvancedFm::slotSwitchMenu(int ) { -// qDebug("Switch %d", item); +// odebug << "Switch " << item << "" << oendl; // viewMenu->setItemChecked(item, true); } void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) { diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 716343d..f1c518e 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro @@ -1,33 +1,13 @@ TEMPLATE = app CONFIG += qt warn_on quick-app -# CONFIG += qt warn_on HEADERS = advancedfm.h filePermissions.h output.h SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp TARGET = advancedfm INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 -lopieui2 -TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ - ../../../i18n/nl/advancedfm.ts \ - ../../../i18n/da/advancedfm.ts \ - ../../../i18n/xx/advancedfm.ts \ - ../../../i18n/en/advancedfm.ts \ - ../../../i18n/es/advancedfm.ts \ - ../../../i18n/fr/advancedfm.ts \ - ../../../i18n/hu/advancedfm.ts \ - ../../../i18n/ja/advancedfm.ts \ - ../../../i18n/ko/advancedfm.ts \ - ../../../i18n/no/advancedfm.ts \ - ../../../i18n/pl/advancedfm.ts \ - ../../../i18n/pt/advancedfm.ts \ - ../../../i18n/pt_BR/advancedfm.ts \ - ../../../i18n/sl/advancedfm.ts \ - ../../../i18n/zh_CN/advancedfm.ts \ - ../../../i18n/zh_TW/advancedfm.ts - - !contains(CONFIG,quick-app) { DESTDIR = $(OPIEDIR)/bin DEFINES += NOQUICKLAUNCH } diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 2997c55..29335f8 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -10,25 +10,29 @@ * (at your option) any later version. * ***************************************************************************/ #include "advancedfm.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/storage.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/menubutton.h> +using namespace Opie::Core; +using namespace Opie::Ui; +/* QT */ #include <qlayout.h> #include <qhbox.h> #include <qmenubar.h> #include <qcombobox.h> #include <qtoolbutton.h> #include <qlineedit.h> #include <qlistview.h> +/* STD */ #include <sys/utsname.h> - -using namespace Opie::Ui; void AdvancedFm::init() { b = false; setCaption( tr( "AdvancedFm" ) ); @@ -218,13 +222,13 @@ void AdvancedFm::init() { zaurusDevice=FALSE; if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { - qDebug("not have sd"); + odebug << "not have sd" << oendl; sdButton->hide(); } if( !StorageInfo::hasCf() ) { - qDebug("not have cf"); + odebug << "not have cf" << oendl; cfButton->hide(); } currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); currentDir.setPath( QDir::currentDirPath()); diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 81a4318..d34f330 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -8,41 +8,44 @@ * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
+ #include "advancedfm.h"
#include "output.h"
#include "filePermissions.h"
+/* OPIE */ +#include <opie2/odebug.h> #include <qpe/lnkproperties.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
+using namespace Opie::Core; -#include <qmessagebox.h>
-
+/* QT*/ +#include <qmessagebox.h> #include <qpopupmenu.h>
#include <qlistview.h>
+/* STD */ + #include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/sendfile.h>
#include <fcntl.h>
-
-using namespace Opie::Core;
-using namespace Opie::Core;
void AdvancedFm::doDirChange() {
QString pathItem = CurrentView()->currentItem()->text(0);
if( pathItem == "../") {
ListClicked( CurrentView()->currentItem());
} else {
if( pathItem.find(" -> ",0,TRUE) != -1)
pathItem = dealWithSymName((const QString&)pathItem)+"/";
-// qWarning(pathItem);
+// owarn << pathItem << oendl; gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
}
}
@@ -91,9 +94,9 @@ void AdvancedFm::runThis() { if(curFile != "../") {
fs = getFileSystemType((const QString &) path);
QFileInfo fileInfo( path + "/" + curFile);
-// qDebug( fileInfo.owner());
+// odebug << fileInfo.owner() << oendl; if( (fileInfo.permission( QFileInfo::ExeUser)
| fileInfo.permission( QFileInfo::ExeGroup)
| fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) {
@@ -103,9 +106,9 @@ void AdvancedFm::runThis() { } else {
curFile = path + "/" + curFile;
DocLnk nf(curFile);
QString execStr = nf.exec();
-// qDebug( execStr);
+// odebug << execStr << oendl; if( execStr.isEmpty() ) {
} else {
nf.execute();
}
@@ -201,14 +204,14 @@ void AdvancedFm::doDelete() { QString cmd="rm "+f;
QFile file(f);
QFileInfo fi(myFile);
if( fi.fileName().find("../",0,TRUE)==-1) {
-// qDebug("remove link files "+myFile);
+// odebug << "remove link files "+myFile << oendl; // DocLnk lnk(f);
DocLnk *lnk;
lnk = new DocLnk(f);
-// qDebug("Deleting doclnk " + lnk->linkFile());
+// odebug << "Deleting doclnk " + lnk->linkFile() << oendl; if(lnk->isValid())
lnk->removeLinkFile();
// delete lnk;
file.remove();
@@ -242,12 +245,12 @@ void AdvancedFm::doProperties() { QString filePath;
filePath = CurrentDir()->canonicalPath()+"/";
-// qDebug("%d",curFileList.count());
+// odebug << "" << curFileList.count() << "" << oendl; for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
-// qDebug((filePath+*it));
+// odebug << (filePath+*it) << oendl; DocLnk lnk( (filePath+*it));
LnkProperties prop( &lnk );
QPEApplication::execDialog( &prop );
}
@@ -301,10 +304,10 @@ void AdvancedFm::copy() { curFile = thisDir->canonicalPath()+"/"+ item;
destFile = thatDir->canonicalPath()+"/"+ item;
-// qDebug("Destination file is "+destFile);
-// qDebug("CurrentFile file is " + curFile);
+// odebug << "Destination file is "+destFile << oendl; +// odebug << "CurrentFile file is " + curFile << oendl; QFile f(destFile);
if( f.exists()) {
if(doMsg) {
@@ -419,9 +422,9 @@ void AdvancedFm::copySameDir() { +curFile +tr("to\n")+destFile);
return;
}
-// qDebug("copy "+curFile+" as "+destFile);
+// odebug << "copy "+curFile+" as "+destFile << oendl; }
delete fileDlg;
}
rePopulate();
@@ -442,15 +445,15 @@ void AdvancedFm::move() { if(destFile.right(1).find("/",0,TRUE) == -1)
destFile+="/";
destFile += item;
-// qDebug("Destination file is "+destFile);
+// odebug << "Destination file is "+destFile << oendl; curFile = thisDir->canonicalPath();
if(curFile.right(1).find("/",0,TRUE) == -1)
curFile +="/";
curFile+= item;
-// qDebug("CurrentFile file is " + curFile);
+// odebug << "CurrentFile file is " + curFile << oendl; if(QFileInfo(curFile).isDir()) {
moveDirectory( curFile, destFile );
rePopulate();
@@ -488,9 +491,9 @@ bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) { bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
QString cmd = "/bin/cp -fpR " + src + " " + dest;
- qWarning(cmd);
+ owarn << cmd << oendl; int err = system( (const char *) cmd );
if ( err != 0 ) {
QMessageBox::message("AdvancedFm",
tr( "Could not copy \n%1 \nto \n%2").arg( src ).arg( dest ) );
@@ -524,16 +527,16 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { int write_fd=0;
struct stat stat_buf;
off_t offset = 0;
if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
-// qWarning("open failed");
+// owarn << "open failed" << oendl; return success = false;
}
read_fd = srcFile.handle();
if(read_fd != -1) {
fstat (read_fd, &stat_buf);
if( !destFile.open( IO_WriteOnly|IO_Raw ) ) {
-// qWarning("destfile open failed");
+// owarn << "destfile open failed" << oendl; return success = false;
}
write_fd = destFile.handle();
if(write_fd != -1) {
@@ -546,9 +549,9 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { case ENOMEM: msg = "Insufficient memory to read from in_fd.";
case EIO: msg = "Unspecified error while reading from in_fd.";
};
success = false;
-// qWarning(msg);
+// owarn << msg << oendl; }
} else {
success = false;
}
@@ -578,9 +581,9 @@ void AdvancedFm::runCommand() { fileDlg->exec();
//QString command;
if( fileDlg->result() == 1 ) {
-// qDebug(fileDlg->LineEdit1->text());
+// odebug << fileDlg->LineEdit1->text() << oendl; QStringList command;
command << "/bin/sh";
command << "-c";
@@ -661,9 +664,9 @@ void AdvancedFm::mkSym() { curFile = curFile.left( curFile.length() -1);
}
cmd = "ln -s "+curFile+" "+destName;
-// qDebug(cmd);
+// odebug << cmd << oendl; startProcess( (const QString)cmd );
}
rePopulate();
setOtherTabCurrent();
@@ -714,17 +717,17 @@ void AdvancedFm::startProcess(const QString & cmd) { command << "-c";
command << cmd.latin1();
*process << command;
if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
- qDebug("could not start process");
+ odebug << "could not start process" << oendl; }
void AdvancedFm::processEnded(OProcess *) {
rePopulate();
}
void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
-// qWarning("received stderrt %d bytes", buflen);
+// owarn << "received stderrt " << buflen << " bytes" << oendl; QString lineStr = buffer;
QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
}
@@ -764,9 +767,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { }
void AdvancedFm::cancelRename() {
-// qDebug("cancel rename");
+// odebug << "cancel rename" << oendl; QListView * view;
view = CurrentView();
bool resetFocus = view->viewport()->focusProxy() == renameBox;
diff --git a/noncore/apps/advancedfm/filePermissions.cpp b/noncore/apps/advancedfm/filePermissions.cpp index 9698de7..b7d48e8 100644 --- a/noncore/apps/advancedfm/filePermissions.cpp +++ b/noncore/apps/advancedfm/filePermissions.cpp @@ -31,9 +31,9 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal : QDialog( parent, name, modal, fl ) { if ( !name ) setName( tr("filePermissions") ); -// qDebug("FilePermissions "+fileName); +// odebug << "FilePermissions "+fileName << oendl; /* resize( 236, 210 ); setMaximumSize( QSize( 236, 210 ) ); */ setCaption( tr( "Set File Permissions" ) ); diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 6906298..8c585f4 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp @@ -4,21 +4,24 @@ ** Copyright: Fri Apr 12 15:12:58 2002 L.J. Potter <ljp@llornkcor.com> ****************************************************************************/ #include "output.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> +using namespace Opie::Core; +/* QT */ #include <qfile.h> #include <qmultilineedit.h> #include <qpushbutton.h> #include <qlayout.h> +/* STD */ #include <errno.h> /* XPM */ -using namespace Opie::Core; -using namespace Opie::Core; static char * filesave_xpm[] = { "16 16 78 1", " c None", ". c #343434", @@ -120,9 +123,9 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, { QStringList cmmds; // cmmds=QStringList::split( " ", commands, false); cmmds=commands; -// qDebug("count %d", cmmds.count()); +// odebug << "count " << cmmds.count() << "" << oendl; if ( !name ) setName( tr("Output")); resize( 196, 269 ); setCaption( name ); @@ -156,9 +159,9 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, // this, SLOT(commandStdin(const QByteArray&))); // * proc << commands.latin1(); for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { - qDebug( "%s", (*it).latin1() ); + odebug << "" << (*it).latin1() << "" << oendl; * proc << (*it).latin1(); } if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { @@ -185,9 +188,9 @@ void Output::saveOutput() { if(filename.right(1).find('/') == -1) filename+="/"; QString name = fileDlg->LineEdit1->text(); filename+="text/plain/"+name; - qDebug(filename); + odebug << filename << oendl; QFile f(filename); f.open( IO_WriteOnly); if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) { @@ -195,18 +198,18 @@ void Output::saveOutput() { lnk.setName(name); //sets file name lnk.setFile(filename); //sets File property lnk.setType("text/plain"); if(!lnk.writeLink()) { - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } } else - qWarning("Could not write file"); + owarn << "Could not write file" << oendl; f.close(); } } void Output::commandStdout(OProcess*, char *buffer, int buflen) { - qWarning("received stdout %d bytes", buflen); + owarn << "received stdout " << buflen << " bytes" << oendl; // QByteArray data(buflen); // data.fill(*buffer, buflen); // for (uint i = 0; i < data.count(); i++ ) { @@ -221,15 +224,15 @@ void Output::commandStdout(OProcess*, char *buffer, int buflen) { } void Output::commandStdin( const QByteArray &data) { - qWarning("received stdin %d bytes", data.size()); + owarn << "received stdin " << data.size() << " bytes" << oendl; // recieved data from the io layer goes to sz proc->writeStdin(data.data(), data.size()); } void Output::commandStderr(OProcess*, char *buffer, int buflen) { - qWarning("received stderrt %d bytes", buflen); + owarn << "received stderrt " << buflen << " bytes" << oendl; QString lineStr = buffer; // lineStr=lineStr.left(lineStr.length()-1); OutputEdit->append(lineStr); diff --git a/noncore/apps/checkbook/checkbook.pro b/noncore/apps/checkbook/checkbook.pro index 34641f4..1472df6 100644 --- a/noncore/apps/checkbook/checkbook.pro +++ b/noncore/apps/checkbook/checkbook.pro diff --git a/noncore/apps/checkbook/listedit.cpp b/noncore/apps/checkbook/listedit.cpp index d00e305..5026c9d 100644 --- a/noncore/apps/checkbook/listedit.cpp +++ b/noncore/apps/checkbook/listedit.cpp @@ -26,16 +26,21 @@ */ #include "listedit.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/resource.h> +using namespace Opie::Core; + +/* QT */ #include <qlayout.h> #include <qlineedit.h> #include <qlistview.h> #include <qwidgetstack.h> #include <qcombobox.h> #include <qpushbutton.h> -#include <qpe/resource.h> - // --- ListEdit --------------------------------------------------------------- ListEdit::ListEdit( QWidget *parent, const char *sName ) : QWidget(parent, sName), TableDef(sName) @@ -301,9 +306,9 @@ void ListEdit::slotClick(QListViewItem *itm, const QPoint &pnt, int col) _box->setCurrentItem(i); } _stack->raiseWidget(_box); } else { - qDebug( "Unsupported column type for column %s", (const char *)pDef->getName() ); + odebug << "Unsupported column type for column " << (const char *)pDef->getName() << "" << oendl; _typeEdit->setText(""); _stack->raiseWidget(_typeEdit); } } diff --git a/noncore/apps/checkbook/tabledef.cpp b/noncore/apps/checkbook/tabledef.cpp index 9a42308..745cd80 100644 --- a/noncore/apps/checkbook/tabledef.cpp +++ b/noncore/apps/checkbook/tabledef.cpp @@ -27,8 +27,10 @@ */ #include "tabledef.h" +#include <opie2/odebug.h> +using namespace Opie::Core; // --- ColumnDef -------------------------------------------------------------- ColumnDef::ColumnDef(const char *sName, ColumnType type, const char *sNewValue) { @@ -41,16 +43,16 @@ ColumnDef::ColumnDef(const char *sName, ColumnType type, const char *sNewValue) // --- addColumnValue --------------------------------------------------------- void ColumnDef::addColumnValue(const QString &sValue) { if( (_type & 0x00ffffff) !=typeList ) - qDebug("Column %s is not a list", (const char *)_sName); + odebug << "Column " << (const char *)_sName << " is not a list" << oendl; else _valueList.append(sValue); } void ColumnDef::addColumnValue(const char *sValue) { if( (_type & 0x00ffffff)!=typeList ) - qDebug("Column %s is not a list", (const char *)_sName); + odebug << "Column " << (const char *)_sName << " is not a list" << oendl; else _valueList.append(sValue); } diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp index 1b08b24..aafb588 100644 --- a/noncore/apps/checkbook/transaction.cpp +++ b/noncore/apps/checkbook/transaction.cpp @@ -30,10 +30,14 @@ #include "traninfo.h" #include "cfg.h" #include "checkbook.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/datebookmonth.h> +using namespace Opie::Core; +/* QT */ #include <qbuttongroup.h> #include <qcombobox.h> #include <qlabel.h> #include <qlayout.h> @@ -331,7 +335,7 @@ void Transaction::slotActivated(const QString &arg ) // slotNotNew ----------------------------------------------------------------- void Transaction::slotNotNew() { - qDebug("Not new"); + odebug << "Not new" << oendl; _bNew=false; } diff --git a/noncore/apps/confedit/confedit.pro b/noncore/apps/confedit/confedit.pro index 5a71680..785c588 100644 --- a/noncore/apps/confedit/confedit.pro +++ b/noncore/apps/confedit/confedit.pro @@ -2,20 +2,8 @@ CONFIG = qt warn_on quick-app HEADERS = mainwindow.h listviewconfdir.h listviewitemconffile.h listviewitemconfigentry.h editwidget.h listviewitemconf.h SOURCES = main.cpp mainwindow.cpp listviewconfdir.cpp listviewitemconffile.cpp listviewitemconfigentry.cpp editwidget.cpp listviewitemconf.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -INTERFACES = -LIBS += -lopiecore2 +LIBS += -lqpe -lopiecore2 TARGET = confedit -!contains( platform, x11 ) { - include ( $(OPIEDIR)/include.pro ) - LIBS += -lqpe -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - - - diff --git a/noncore/apps/confedit/config.in b/noncore/apps/confedit/config.in index e377307..d7682dc 100644 --- a/noncore/apps/confedit/config.in +++ b/noncore/apps/confedit/config.in @@ -1,4 +1,4 @@ config CONFEDIT - boolean "opie-confeditor (generic editor for all Opie settings)" + boolean "opie-confedit (generic editor for all Opie settings)" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/apps/confedit/listviewconfdir.cpp b/noncore/apps/confedit/listviewconfdir.cpp index 0c2feeb..33bffe1 100644 --- a/noncore/apps/confedit/listviewconfdir.cpp +++ b/noncore/apps/confedit/listviewconfdir.cpp @@ -8,12 +8,16 @@ ***************************************************************************/ // (c) 2002 Patrick S. Vogtp <tille@handhelds.org> #include "listviewconfdir.h" +#include "listviewitemconffile.h" -#include <qmessagebox.h> +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; -#include "listviewitemconffile.h" +/* QT */ +#include <qmessagebox.h> ListViewConfDir::ListViewConfDir(QString settingsPath, QWidget *parent, const char *name ) : QListView(parent,name), confDir(settingsPath) { @@ -46,9 +50,9 @@ void ListViewConfDir::readConfFiles() ListViewItemConfFile *fileEntry; while ( (fi=it.current()) ) { - qDebug( "opening: >%s<", fi->fileName().data() ); + odebug << "opening: >" << fi->fileName().data() << "<" << oendl; fileEntry = new ListViewItemConfFile( fi, this ); QListViewItem *dummy = new QListViewItem(fileEntry, "dummy"); ++it; } diff --git a/noncore/apps/confedit/listviewitemconffile.cpp b/noncore/apps/confedit/listviewitemconffile.cpp index 1ff2c44..2958cf5 100644 --- a/noncore/apps/confedit/listviewitemconffile.cpp +++ b/noncore/apps/confedit/listviewitemconffile.cpp @@ -8,11 +8,17 @@ ***************************************************************************/ // (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "listviewitemconffile.h" +#include "listviewitemconfigentry.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qmessagebox.h> #include <qtextstream.h> -#include "listviewitemconfigentry.h" #define tr QObject::tr ListViewItemConfFile::ListViewItemConfFile(QFileInfo *file, QListView *parent) @@ -39,9 +45,9 @@ QString ListViewItemConfFile::fileName() } void ListViewItemConfFile::parseFile() { - //qDebug("ListViewItemConfFile::parseFile BEGIN"); + //odebug << "ListViewItemConfFile::parseFile BEGIN" << oendl; QFile confFile(confFileInfo->absFilePath()); if(! confFile.open(IO_ReadOnly)) QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0); QTextStream t( &confFile ); @@ -51,33 +57,33 @@ void ListViewItemConfFile::parseFile() ListViewItemConfigEntry *item; while ( !t.atEnd() ) { s = t.readLine().stripWhiteSpace(); - //qDebug( "line: >%s<\n", s.latin1() ); + //odebug << "line: >" << s.latin1() << "<\n" << oendl; if (s.contains("<?xml")) { _valid = false; break; }else if ( s[0] == '[' && s[s.length()-1] == ']' ) { - // qDebug("got group"+s); + // odebug << "got group"+s << oendl; group = s.mid(1,s.length()-2); if (!groupItem) groupItem = new ListViewItemConfigEntry(this, tr("no group") ); groupItem = new ListViewItemConfigEntry(this, group ); insertItem( groupItem ); } else if ( int pos = s.find('=') ) { -// qDebug("got key"+s); - if (!groupItem) qDebug("PANIK NO GROUP! >%s<",group.latin1()); +// odebug << "got key"+s << oendl; + if (!groupItem) odebug << "PANIK NO GROUP! >" << group.latin1() << "<" << oendl; item = new ListViewItemConfigEntry(this, group, s ); groupItem->insertItem( item ); } } confFile.close(); setExpandable( _valid ); -// qDebug("ListViewItemConfFile::parseFile END"); +// odebug << "ListViewItemConfFile::parseFile END" << oendl; } void ListViewItemConfFile::remove() diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp index 6ef1043..4b04c97 100644 --- a/noncore/apps/confedit/mainwindow.cpp +++ b/noncore/apps/confedit/mainwindow.cpp @@ -10,17 +10,20 @@ // (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "mainwindow.h" +#include "listviewconfdir.h" +#include "listviewitemconfigentry.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> -#include "listviewconfdir.h" -#include "listviewitemconfigentry.h" - - MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0) { setCaption( tr("Conf File Editor") ); @@ -32,14 +35,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : mainLayout->setSpacing( 0 ); mainLayout->setMargin( 0 ); - qDebug("creating settingList"); + odebug << "creating settingList" << oendl; settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist"); settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); mainLayout->addWidget( settingList, 0); - qDebug("creating editor"); + odebug << "creating editor" << oendl; editor = new EditWidget(this); editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); mainLayout->addWidget( editor, 1 ); editor->layoutType( ListViewItemConf::File ); @@ -97,9 +100,9 @@ MainWindow::~MainWindow() void MainWindow::setCurrent(QListViewItem *item) { -// qDebug("MainWindow::setCurrent"); +// odebug << "MainWindow::setCurrent" << oendl; if (!item) return; _item = (ListViewItemConf*) item; if (!_item) return; popupTimer->start( 750, true ); @@ -173,9 +176,9 @@ void MainWindow::removeConfFile() } void MainWindow::showPopup() { -qDebug("showPopup"); +odebug << "showPopup" << oendl; if (!_item) return; popupActionRevert->setEnabled(_item->revertable()); popupActionSave->setEnabled(_item->isChanged()); if (_fileItem) diff --git a/noncore/apps/keyz-cfg/cfgfile.cpp b/noncore/apps/keyz-cfg/cfgfile.cpp index b0dc968..81d1ee1 100644 --- a/noncore/apps/keyz-cfg/cfgfile.cpp +++ b/noncore/apps/keyz-cfg/cfgfile.cpp @@ -1,7 +1,13 @@ -#include <qmessagebox.h> #include "cfgfile.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qmessagebox.h> + // CfgEntry implementation CfgEntry::CfgEntry() { } @@ -94,9 +100,9 @@ bool CfgParser::load(QString file, CfgFile& cfg) { arperiod = -1; reader.parse(is); if (!err.isEmpty()) { - qDebug(err); + odebug << err << oendl; return false; } QMap<QString, QString>::Iterator fit, lit; @@ -105,9 +111,9 @@ bool CfgParser::load(QString file, CfgFile& cfg) { fit = includes.find(file); QString prefix = fit.data(); QString label = ""; - qDebug("include: file=" + fit.key() + ", prefix=" + fit.data()); + odebug << "include: file=" + fit.key() + ", prefix=" + fit.data() << oendl; lit = labels.find(prefix+":*"); if (lit != labels.end()) { label = lit.data(); } diff --git a/noncore/apps/keyz-cfg/config.in b/noncore/apps/keyz-cfg/config.in index 29a10f5..8e1be2d 100644 --- a/noncore/apps/keyz-cfg/config.in +++ b/noncore/apps/keyz-cfg/config.in @@ -1,4 +1,4 @@ config KEYZCFG boolean "keyz-cfg (configuration tool for keyz applet)" default "n" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/apps/keyz-cfg/keyz-cfg.pro b/noncore/apps/keyz-cfg/keyz-cfg.pro index 44bbb5f..7ac604b 100644 --- a/noncore/apps/keyz-cfg/keyz-cfg.pro +++ b/noncore/apps/keyz-cfg/keyz-cfg.pro @@ -17,8 +17,8 @@ SOURCES = main.cpp \ zkbxml.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 TARGET = keyz-cfg include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/apps/keyz-cfg/zkb.cpp b/noncore/apps/keyz-cfg/zkb.cpp index f315d4b..8382615 100644 --- a/noncore/apps/keyz-cfg/zkb.cpp +++ b/noncore/apps/keyz-cfg/zkb.cpp @@ -363,9 +363,9 @@ State* Keymap::getStateByLabel(const QString& label) { name += currentStateName.mid(n+1); } } -// qDebug("look for: %s\n", (const char*) name.utf8()); +// odebug << "look for: " << (const char*) name.utf8() << "\n" << oendl; QMap<QString, State*>::Iterator sit = states.find(name); if (sit != states.end()) { state = sit.data(); } @@ -415,9 +415,9 @@ bool Keymap::setCurrentState(State* state) { tit = stateLabelMap.find(state); if (tit != stateLabelMap.end()) { currentLabel = tit.data(); } else { -// qDebug("no label for: " + currentStateName + "\n"); +// odebug << "no label for: " + currentStateName + "\n" << oendl; currentLabel = ""; } return true; diff --git a/noncore/apps/keyz-cfg/zkbcfg.cpp b/noncore/apps/keyz-cfg/zkbcfg.cpp index 0992b9a..f1d53ba 100644 --- a/noncore/apps/keyz-cfg/zkbcfg.cpp +++ b/noncore/apps/keyz-cfg/zkbcfg.cpp @@ -1,8 +1,12 @@ -#include <qfileinfo.h> - #include "zkbcfg.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qfileinfo.h> // Implementation of XkbConfig class ZkbConfig::ZkbConfig(const QString& dir):path(dir) { } @@ -14,9 +18,9 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix) bool ret; QFile f(path+"/"+file); QFileInfo fi(f); - qDebug("start loading file=%s\n", (const char*) file.utf8()); + odebug << "start loading file=" << (const char*) file.utf8() << "\n" << oendl; if (includedFiles.find(fi.absFilePath()) != includedFiles.end()) { return false; } @@ -29,10 +33,9 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix) reader.setErrorHandler(this); ret = reader.parse(is); includedFiles.remove(fi.absFilePath()); - qDebug("end loading file=%s : status=%s\n", (const char*) file.utf8(), - (const char*) err.utf8()); + odebug << "end loading file=" << file.utf8() << ": status=" << err.utf8() << oendl; return ret; } bool ZkbConfig::warning(const QXmlParseException& e) { @@ -121,9 +124,9 @@ bool ZkbHandler::startStateElement(const QString& name, currentStateName = prefix + name; currentState = keymap.getStateByName(currentStateName); -// qDebug("state name=%s\n", (const char*) currentStateName.utf8()); +// odebug << "state name=" << (const char*) currentStateName.utf8() << "\n" << oendl; State* parent = 0; if (!parentName.isEmpty()) { QString pn = prefix + parentName; diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp index e6cb515..59fc242 100644 --- a/noncore/apps/opie-bartender/bartender.cpp +++ b/noncore/apps/opie-bartender/bartender.cpp @@ -15,14 +15,15 @@ #include "inputDialog.h" #include "searchresults.h" #include "bac.h" -#include <qtoolbar.h> -#include <qmenubar.h> -//#include <opie2/colorpopupmenu.h> +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ #include <qlineedit.h> #include <qdir.h> #include <qpushbutton.h> #include <qlistbox.h> @@ -32,16 +33,18 @@ #include <qaction.h> #include <qheader.h> #include <qlistview.h> #include <qlayout.h> +#include <qtoolbar.h> +#include <qmenubar.h> +/* STD */ #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> - Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { if ( !name ) setName( "Bartender" ); @@ -143,15 +146,15 @@ void Bartender::fillList() { QString s; while ( !t.eof()) { s = t.readLine(); if(s.find("#",0,TRUE) != -1) { -// qDebug(s.right(s.length()-2)); +// odebug << s.right(s.length()-2) << oendl; item= new QListViewItem( DrinkView, 0 ); item->setText( 0, s.right(s.length()-2)); i++; } } - qDebug("there are currently %d of drinks", i); + odebug << "there are currently " << i << " of drinks" << oendl; } void Bartender::fileNew() { @@ -170,9 +173,9 @@ void Bartender::fileNew() { } if(newDrinks ->result() == 1 ) { QString newDrink="\n# "+newName+"\n"; newDrink.append(newIng+"\n"); - qDebug("writing "+newDrink); + odebug << "writing "+newDrink << oendl; dbFile.writeBlock( newDrink.latin1(), newDrink.length()); clearList(); dbFile.close(); @@ -206,9 +209,9 @@ void Bartender::showDrink( QListViewItem *item) { if(s.find( myDrink, 0, TRUE) != -1) { for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { s2 = t.readLine(); if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { -// qDebug(s2); +// odebug << s2 << oendl; showDrinks->MultiLineEdit1->append(s2); } if( dbFile.atEnd() ) break; } @@ -247,9 +250,9 @@ void Bartender::doSearchByName() { searchForDrinkName = fileDlg->LineEdit1->text(); QListViewItemIterator it( DrinkView ); for ( ; it.current(); ++it ) { if ( it.current()->text(0).find( searchForDrinkName, 0, TRUE) != -1 ) { -// qDebug( it.current()->text(0)); +// odebug << it.current()->text(0) << oendl; searchList.append(it.current()->text(0)); } } if(searchList.count() >0) @@ -278,12 +281,12 @@ void Bartender::doSearchByDrink() { while ( !t.eof()) { s = t.readLine(); if(s.find("#",0,TRUE) != -1) { lastDrinkName=s.right(s.length()-2); -// qDebug("last drink name "+lastDrinkName); +// odebug << "last drink name "+lastDrinkName << oendl; } else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) { -// qDebug("appending "+lastDrinkName); +// odebug << "appending "+lastDrinkName << oendl; searchList.append( lastDrinkName); tempName=lastDrinkName; } // if( dbFile.atEnd() ) break; @@ -312,9 +315,9 @@ void Bartender::showSearchResult(QStringList &searchList) { } QListViewItemIterator it2( DrinkView ); for ( ; it2.current(); ++it2 ) { if ( it2.current()->text(0)== result ) { -// qDebug( it2.current()->text(0)); +// odebug << it2.current()->text(0) << oendl; showDrink(it2.current()); } } delete searchDlg; @@ -342,9 +345,9 @@ void Bartender::doEdit() { foundAt = dbFile.at() - (s.length()+1); for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { s2 = t.readLine(); if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { -// qDebug(s2); +// odebug << s2 << oendl; newDrinks->MultiLineEdit1->append(s2); newDrinks->LineEdit1->setText(myDrink); } if( dbFile.atEnd() ) break; @@ -369,9 +372,9 @@ void Bartender::doEdit() { #warning FIXME problems with editing drinks db ////////// FIXME write to user file QString newDrink="# "+newName+"\n"; newDrink.append(newIng+"\n"); - qDebug("writing "+newDrink); + odebug << "writing "+newDrink << oendl; dbFile.writeBlock( newDrink.latin1(), newDrink.length()); clearList(); dbFile.flush(); @@ -396,9 +399,9 @@ void Bartender::openCurrentDrink() { showDrink(DrinkView->currentItem()); } void Bartender::fileMenuActivated( int item) { - qDebug("Item %d", item); + odebug << "Item " << item << "" << oendl; switch(item) { case -3: // new -3 fileNew(); break; @@ -417,9 +420,9 @@ void Bartender::fileMenuActivated( int item) { } } void Bartender::editMenuActivated(int item) { - qDebug("Item %d", item); + odebug << "Item " << item << "" << oendl; /* edit -8 */ switch(item) { diff --git a/noncore/apps/opie-bartender/bartender.pro b/noncore/apps/opie-bartender/bartender.pro index 4ad3c31..41fc0e5 100644 --- a/noncore/apps/opie-bartender/bartender.pro +++ b/noncore/apps/opie-bartender/bartender.pro @@ -1,12 +1,11 @@ TEMPLATE = app -#CONFIG = qt warn_on CONFIG = qt warn_on HEADERS = bartender.h newdrinks.h showdrinks.h inputDialog.h searchresults.h bac.h SOURCES = main.cpp bartender.cpp newdrinks.cpp showdrinks.cpp inputDialog.cpp searchresults.cpp bac.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 DESTDIR = $(OPIEDIR)/bin TARGET = bartender include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/apps/opie-bartender/config.in b/noncore/apps/opie-bartender/config.in index c6ca2e6..c39a7d6 100644 --- a/noncore/apps/opie-bartender/config.in +++ b/noncore/apps/opie-bartender/config.in @@ -1,4 +1,5 @@ config BARTENDER boolean "bartender - bar receipe and blood alcohol estimator" default "n" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index a37f980..6d57703 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp @@ -62,12 +62,20 @@ There's a sinister ioctl(2), signal(2) and job control stuff nessesary to make everything work as it should. */ +#include "procctl.h" +#include "MyPty.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qsocketnotifier.h> #include <qfile.h> +/* STD */ #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <fcntl.h> @@ -80,12 +88,8 @@ #ifdef HAVE_OPENPTY #include <pty.h> #endif -#include "procctl.h" -#include "MyPty.h" - - #undef VERBOSE_DEBUG /* -------------------------------------------------------------------------- */ @@ -96,9 +100,9 @@ */ void MyPty::setSize(int lines, int columns) { - qWarning("setting size"); + owarn << "setting size" << oendl; struct winsize wsize; wsize.ws_row = (unsigned short)lines; wsize.ws_col = (unsigned short)columns; if(m_fd < 0) return; diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp index e535296..d168a5e 100644 --- a/noncore/apps/opie-console/TEWidget.cpp +++ b/noncore/apps/opie-console/TEWidget.cpp @@ -1028,9 +1028,9 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) #ifdef FAKE_CTRL_AND_ALT static bool control = FALSE; static bool alt = FALSE; -// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); +// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; bool dele=FALSE; if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { QKeyEvent* ke = (QKeyEvent*)e; bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); @@ -1067,13 +1067,13 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) QKeyEvent* ke = (QKeyEvent*)e; actSel=0; // Key stroke implies a screen update, so TEWidget won't // know where the current selection is. -// qDebug("key pressed is 0x%x",ke->key()); +// odebug << "key pressed is 0x" << ke->key() << "" << oendl; if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker -// qDebug("key pressed 2 is 0x%x",ke->key()); +// odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl; emitText("\\"); // expose } else emit keyPressedSignal(ke); // expose ke->accept(); diff --git a/noncore/apps/opie-console/TEmulation.cpp b/noncore/apps/opie-console/TEmulation.cpp index d0169d7..6ff73af 100644 --- a/noncore/apps/opie-console/TEmulation.cpp +++ b/noncore/apps/opie-console/TEmulation.cpp @@ -69,8 +69,14 @@ - evtl. the bulk operations could be made more transparent. */ #include "TEmulation.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* STD */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -203,9 +209,9 @@ void TEmulation::onRcvChar(int c) */ void TEmulation::onKeyPress( QKeyEvent* ev ) { - qWarning("onKeyPress,...."); + owarn << "onKeyPress,...." << oendl; if (!connected) return; // someone else gets the keys if (scr->getHistCursor() != scr->getHistLines()); scr->setHistCursor(scr->getHistLines()); if (!ev->text().isEmpty()) diff --git a/noncore/apps/opie-console/atconfigdialog.cpp b/noncore/apps/opie-console/atconfigdialog.cpp index 8e91b9e..c998f96 100644 --- a/noncore/apps/opie-console/atconfigdialog.cpp +++ b/noncore/apps/opie-console/atconfigdialog.cpp @@ -1,17 +1,20 @@ +#include "atconfigdialog.h" +#include "io_modem.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qlineedit.h> #include <qspinbox.h> #include <qlayout.h> #include <qcombobox.h> #include <qtabwidget.h> #include <qlabel.h> #include <qscrollview.h> -#include "atconfigdialog.h" -#include "io_modem.h" - - ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { @@ -151,9 +154,9 @@ QWidget* ATConfigDialog::tab1( QWidget* parent ) { } void ATConfigDialog::readConfig( const Profile& config ) { - qWarning("config in atconfigdialog"); + owarn << "config in atconfigdialog" << oendl; initStringLine->setText( config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ) ); resetStringLine->setText( config.readEntry("ResetString", MODEM_DEFAULT_RESET_STRING ) ); dialPref1Line->setText( config.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 ) ); diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 67ad10e..7010594 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -1,21 +1,26 @@ #include "dialer.h" +#include "io_modem.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ #include <qlayout.h> #include <qprogressbar.h> #include <qlabel.h> #include <qpushbutton.h> #include <qapp.h> #include <qtimer.h> #include <qmessagebox.h> +/* STD */ #include <unistd.h> #include <string.h> #include <fcntl.h> #include <errno.h> -#include "io_modem.h" - // State machine: | When an error occurs, we don't have to // | reset everything. // (init) <------+ | But if the user wants to reset, // | | | we stop dialing immediately. @@ -103,9 +108,9 @@ void Dialer::slotCancel() } void Dialer::reset() { - qWarning("reset"); + owarn << "reset" << oendl; switchState(state_cancel); } void Dialer::slotAutostart() @@ -135,20 +140,20 @@ void Dialer::dial(const QString& number) } void Dialer::trydial(const QString& number) { - qWarning("TryDial:%s", number.latin1() ); + owarn << "TryDial:" << number.latin1() << "" << oendl; if(state != state_cancel) switchState(state_preinit); if(cleanshutdown) { - qWarning("HangupString " + m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING)); + owarn << "HangupString " << m_profile.readEntry("HangupString") << oendl; send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); } if(state != state_cancel) { switchState(state_init); -// qWarning("Init String " + m_profile.readEntry("InitString") ); +// owarn << "Init String " + m_profile.readEntry("InitString") << oendl; send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); QString response2 = receive(); if(!response2.contains("\nOK\r")) reset(); @@ -157,9 +162,9 @@ void Dialer::trydial(const QString& number) /* if(state != state_cancel) { switchState(state_options); - qWarning("ATM3l3"); + owarn << "ATM3l3" << oendl; send("ATM3L3\r"); QString response3 = receive(); if(!response3.contains("\nOK\r")) reset(); @@ -177,9 +182,9 @@ void Dialer::trydial(const QString& number) } if(state != state_cancel) { - qWarning("progress"); + owarn << "progress" << oendl; switchState(state_dialing); // send(QString("ATDT %1\r").arg(number)); send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 )) @@ -213,9 +218,9 @@ void Dialer::send(const QString& msg) QString m = msg; int bytes; QString termination; - qWarning("Sending: %s", m.latin1()); + owarn << "Sending: " << m.latin1() << "" << oendl; /* termination = "\r"; //termination = m_profile.readEntry("Termination"); if(termination == "\n") m = m + "\n"; @@ -246,13 +251,13 @@ QString Dialer::receive() { for(int i = 0; i < ret; i++) buffer[i] = buffer[i] & 0x7F; buffer[ret] = 0; - qWarning("Got: %s", buffer); + owarn << "Got: " << buffer << "" << oendl; buf.append(QString(buffer)); if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY"))) { - //qWarning("Receiving: '%s'", buf.latin1()); + //owarn << "Receiving: '" << buf.latin1() << "'" << oendl; cleanshutdown = 1; return buf; }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) { cleanshutdown = 1; diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp index 99d069f..89b70c6 100644 --- a/noncore/apps/opie-console/emulation_handler.cpp +++ b/noncore/apps/opie-console/emulation_handler.cpp @@ -1,11 +1,13 @@ - #include "TEmuVt102.h" - #include "profile.h" #include "emulation_handler.h" #include "script.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) : QObject(0, name ) { m_teWid = new TEWidget( parent, "TerminalMain"); @@ -127,13 +129,13 @@ QColor EmulationHandler::foreColor(int col) { case Profile::Black: co = Qt::black; break; case Profile::Green: - qWarning("Foreground green"); + owarn << "Foreground green" << oendl; co = Qt::green; break; case Profile::Orange: - qWarning("Foreground orange"); + owarn << "Foreground orange" << oendl; co.setRgb( 231, 184, 98 ); break; } @@ -151,13 +153,13 @@ QColor EmulationHandler::backColor(int col ) { case Profile::Black: co = Qt::white; break; case Profile::Green: - qWarning("Background black"); + owarn << "Background black" << oendl; co = Qt::black; break; case Profile::Orange: - qWarning("Background black"); + owarn << "Background black" << oendl; co = Qt::black; break; } diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index ad8ecba..4688551 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp @@ -223,11 +223,11 @@ void EmulationWidget::paintEvent( QPaintEvent* pe ) void EmulationWidget::calcGeometry() { m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); - qDebug( QString(" TEST").arg( contentsRect().width() ) ); - qDebug( QString(" TEST").arg( contentsRect().height() ) ); - qDebug("NEUER TESTT!!!!!!!!"); + odebug << QString(" TEST").arg( contentsRect().width() ) << oendl; + odebug << QString(" TEST").arg( contentsRect().height() ) << oendl; + odebug << "NEUER TESTT!!!!!!!!" << oendl; switch( scrollLoc ) { case SCRNONE : @@ -257,9 +257,9 @@ void EmulationWidget::calcGeometry() } void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) { - qWarning("Color1 %s", color_table[attr.b].color.name().latin1() ); + owarn << "Color1 " << color_table[attr.b].color.name().latin1() << "" << oendl; if ( usePixmap && color_table[attr.b].transparent ) { painter.setBackgroundMode( TransparentMode ); if ( clear ) @@ -271,9 +271,9 @@ void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect painter.fillRect( rect, color_table[attr.b].color ); else { painter.setBackgroundMode( OpaqueMode ); - qWarning("Color %s", color_table[attr.b].color.name().latin1() ); + owarn << "Color " << color_table[attr.b].color.name().latin1() << "" << oendl; painter.setBackgroundColor( color_table[attr.b].color ); } } if ( color_table[attr.f].bold ) diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index eb32551..6613183 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp @@ -1,6 +1,11 @@ #include "function_keyboard.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qlayout.h> #include <qlistbox.h> #include <qlabel.h> #include <qdir.h> @@ -36,9 +41,9 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) : handle, FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort()) ); } - //qWarning("loaded %d keys", keys.count()); + //owarn << "loaded " << keys.count() << " keys" << oendl; */ if (keys.isEmpty()) loadDefaults(); @@ -255,9 +260,9 @@ void FunctionKeyboard::loadDefaults() { FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) : ProfileDialogKeyWidget(name, parent, na), selectedRow(0), selectedCol(0) { - qWarning("FunctionKeyboardConfig"); + owarn << "FunctionKeyboardConfig" << oendl; kb = new FunctionKeyboard(this); connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp index a29fa8e..c102427 100644 --- a/noncore/apps/opie-console/io_bt.cpp +++ b/noncore/apps/opie-console/io_bt.cpp @@ -1,8 +1,11 @@ #include "io_bt.h" +/* OPIE */ +#include <opie2/odebug.h> using namespace Opie::Core; + IOBt::IOBt( const Profile &config ) : IOSerial( config ) { m_attach = 0; } @@ -42,9 +45,9 @@ bool IOBt::open() { if ( m_attach->start() ) { ret = IOSerial::open(); } else { - qWarning("could not attach to device"); + owarn << "could not attach to device" << oendl; delete m_attach; m_attach = 0; } } else { @@ -88,6 +91,6 @@ bool IOBt::isConnected() { return false; } void IOBt::send(const QByteArray &data) { - qDebug( "Please overload me..." ); + odebug << "Please overload me..." << oendl; } diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp index 07c2b62..38542f5 100644 --- a/noncore/apps/opie-console/io_irda.cpp +++ b/noncore/apps/opie-console/io_irda.cpp @@ -1,8 +1,10 @@ - #include "io_irda.h" +/* OPIE */ +#include <opie2/odebug.h> using namespace Opie::Core; + IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { m_attach = 0; } @@ -34,9 +36,9 @@ bool IOIrda::open() { if ( m_attach->start() ) { ret= IOSerial::open(); } else { // emit error!!! - qWarning("could not attach to device"); + owarn << "could not attach to device" << oendl; delete m_attach; m_attach = 0l; } return ret; @@ -73,6 +75,6 @@ bool IOIrda::isConnected() { return false; } void IOIrda::send(const QByteArray &data) { - qDebug( "Please overload me..." ); + odebug << "Please overload me..." << oendl; } diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index b74d076..c499dfe 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp @@ -1,19 +1,19 @@ #include "io_modem.h" - #include "dialer.h" +/* OPIE */ +#include <opie2/odebug.h> using namespace Opie::Core; -using namespace Opie::Core; + IOModem::IOModem( const Profile &profile ) : IOSerial( profile ) { m_profile = profile; } IOModem::~IOModem() { - } void IOModem::close() { @@ -103,6 +103,6 @@ bool IOModem::isConnected() { return false; } void IOModem::send(const QByteArray &data) { - qDebug( "Please overload me..." ); + odebug << "Please overload me..." << oendl; } diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp index dfb2f83..1bd4338 100644 --- a/noncore/apps/opie-console/main.cpp +++ b/noncore/apps/opie-console/main.cpp @@ -90,9 +90,9 @@ int main(int argc, char **argv) { // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; QPEApplication app( argc, argv ); #ifdef FSCKED_DISTRIBUTION - qWarning("fscked"); + owarn << "fscked" << oendl; FixIt it; it.fixIt(); #endif diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 06a8f7d..b403b4d 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -1,17 +1,4 @@ -#include <assert.h> - -#include <qaction.h> -#include <qmenubar.h> -#include <qtoolbar.h> -#include <qmessagebox.h> -#include <qwhatsthis.h> -#include <qfileinfo.h> - -#include <qpe/filemanager.h> - -#include <opie2/ofiledialog.h> - #include "TEmulation.h" #include "profileeditordialog.h" #include "configdialog.h" #include "default.h" @@ -22,10 +9,26 @@ #include "function_keyboard.h" #include "emulation_handler.h" #include "script.h" - +/* OPIE */ +#include <opie2/odebug.h> +#include <opie2/ofiledialog.h> +#include <qpe/filemanager.h> +using namespace Opie::Core; using namespace Opie::Ui; + +/* QT */ +#include <qaction.h> +#include <qmenubar.h> +#include <qtoolbar.h> +#include <qmessagebox.h> +#include <qwhatsthis.h> +#include <qfileinfo.h> + +/* STD */ +#include <assert.h> + MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { KeyTrans::loadAll(); for (int i = 0; i < KeyTrans::count(); i++ ) { KeyTrans* s = KeyTrans::find(i ); @@ -445,15 +448,15 @@ void MainWindow::slotClose() { if (!currentSession() ) return; Session* ses = currentSession(); - qWarning("removing! currentSession %s", currentSession()->name().latin1() ); + owarn << "removing! currentSession " << currentSession()->name().latin1() << "" << oendl; /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ m_curSession = NULL; tabWidget()->remove( /*currentSession()*/ses ); /*it's autodelete */ m_sessions.remove( ses ); - qWarning("after remove!!"); + owarn << "after remove!!" << oendl; if (!currentSession() ) { m_connect->setEnabled( false ); m_disconnect->setEnabled( false ); @@ -569,18 +572,18 @@ void MainWindow::slotOpenButtons( bool state ) { void MainWindow::slotSessionChanged( Session* ses ) { - qWarning("changed!"); + owarn << "changed!" << oendl; if(m_curSession) if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); if(ses) if(ses->transferDialog()) ses->transferDialog()->show(); if ( ses ) { m_curSession = ses; - qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); + odebug << QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) << oendl; if ( m_curSession->layer()->isConnected() ) { m_connect->setEnabled( false ); m_disconnect->setEnabled( true ); m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index 3466e3a..9fdaf73 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp @@ -1,16 +1,19 @@ +#include "modemconfigwidget.h" +#include "dialdialog.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qlabel.h> #include <qlayout.h> #include <qcombobox.h> #include <qpushbutton.h> #include <qhbox.h> -#include "modemconfigwidget.h" -#include "dialdialog.h" - namespace { void setCurrent( const QString& str, QComboBox* bo ) { uint b = bo->count(); for (int i = 0; i < bo->count(); i++ ) { @@ -134,9 +137,9 @@ void ModemConfigWidget::load( const Profile& prof ) { atConf->readConfig( prof ); if ( prof.readEntry( "Device" ).isEmpty() ) { - qWarning("device empty!"); + owarn << "device empty!" << oendl; return; } setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 7a15828..f7e33e9 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro @@ -1,8 +1,6 @@ TEMPLATE = app -TMAKE_CXXFLAGS += -DHAVE_OPENPTY CONFIG += qt warn_on -#CONFIG = qt DESTDIR = $(OPIEDIR)/bin HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ file_layer.h filetransfer.h \ metafactory.h \ @@ -69,8 +67,8 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 -lopieui2 -lutil TARGET = opie-console - +DEFINES += HAVE_OPENPTY include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp index fbc5306..f505998 100644 --- a/noncore/apps/opie-console/sz_transfer.cpp +++ b/noncore/apps/opie-console/sz_transfer.cpp @@ -40,9 +40,9 @@ void SzTransfer::sendFile(const QString& file) { } void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { - qWarning("recieved from sz on stdout %d bytes", buflen); + owarn << "recieved from sz on stdout " << buflen << " bytes" << oendl; QByteArray data(buflen); data.fill(*buffer, buflen); for (uint i = 0; i < data.count(); i++ ) { @@ -64,18 +64,18 @@ void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { } void SzTransfer::receivedStdin(const QByteArray &data) { - qWarning("recieved from io_serial %d bytes", data.size()); + owarn << "recieved from io_serial " << data.size() << " bytes" << oendl; // recieved data from the io layer goes to sz proc->writeStdin(data.data(), data.size()); } void SzTransfer::sent() { - qWarning("sent file"); + owarn << "sent file" << oendl; //setcbreak(0); /* default */ diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp index 6429e3c..41a91ed 100644 --- a/noncore/apps/opie-console/tabwidget.cpp +++ b/noncore/apps/opie-console/tabwidget.cpp @@ -1,8 +1,11 @@ - #include "tabwidget.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; using namespace Opie::Ui; + TabWidget::TabWidget( QWidget* parent, const char* name ) : OTabWidget( parent, name ) { connect(this, SIGNAL( currentChanged(QWidget*) ), this, SLOT( slotCurChanged(QWidget*) ) ); @@ -11,9 +14,9 @@ TabWidget::TabWidget( QWidget* parent, const char* name ) TabWidget::~TabWidget() { } void TabWidget::add( Session* ses ) { - qWarning("session ses " + ses->name() ); + owarn << "session ses " + ses->name() << oendl; if ( !ses->widgetStack() ) return; //reparent( ses->widgetStack(), QPoint() ); addTab( ses->widgetStack(), "console/konsole", ses->name() ); //addTab( ses->widgetStack(), ses->name() ); diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp index 6870487..087476b 100644 --- a/noncore/apps/opie-console/terminalwidget.cpp +++ b/noncore/apps/opie-console/terminalwidget.cpp @@ -1,14 +1,19 @@ +#include "terminalwidget.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qlabel.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qradiobutton.h> #include <qhgroupbox.h> #include <qhbuttongroup.h> #include <qlayout.h> -#include "terminalwidget.h" - namespace { enum TermIds { id_term_vt100 = 0, id_term_vt102, @@ -68,9 +73,9 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent, m_lroot->add( m_groupOptions ); m_lroot->addStretch( 0 ); // Fill in some options - qWarning("Options for terminal box"); + owarn << "Options for terminal box" << oendl; m_terminalBox->insertItem( tr("VT 100"), 0 ); // /*, id_term_vt100*/ ); m_terminalBox->insertItem( tr("VT 102"), 1 ); // /* , id_term_vt102 */); m_terminalBox->insertItem( tr("Linux Console"), 2 ); //, id_term_linux ); m_terminalBox->insertItem( tr("X-Terminal"), 3 ); //, id_term_xterm ); diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp index df27055..45fd11d 100644 --- a/noncore/apps/opie-console/test/senderui.cpp +++ b/noncore/apps/opie-console/test/senderui.cpp @@ -25,17 +25,17 @@ SenderUI::SenderUI() QString str = "/dev/bty0"; prof.writeEntry("Device",str ); prof.writeEntry("Baud", 19200 ); - qWarning("prof " + prof.readEntry("Device") + " " + str); + owarn << "prof " + prof.readEntry("Device") + " " + str << oendl; ser = new IOSerial(prof); connect(ser, SIGNAL(received(const QByteArray&) ), this, SLOT(got(const QByteArray&) ) ); if ( ser->open() ) - qWarning("opened!!!"); + owarn << "opened!!!" << oendl; else - qWarning("could not open"); + owarn << "could not open" << oendl; } SenderUI::~SenderUI() { @@ -51,29 +51,29 @@ void SenderUI::slotSendFile() { } void SenderUI::slotSend() { QCString str = MultiLineEdit1->text().utf8(); - qWarning("sending: %s", str.data() ); + owarn << "sending: " << str.data() << "" << oendl; str = str.replace( QRegExp("\n"), "\r"); ser->send( str ); } void SenderUI::got(const QByteArray& ar) { - qWarning("got:"); + owarn << "got:" << oendl; for ( uint i = 0; i < ar.count(); i++ ) { printf("%c", ar[i] ); } printf("\n"); } void SenderUI::fileTransComplete() { - qWarning("file transfer complete"); + owarn << "file transfer complete" << oendl; } void SenderUI::send() { } void SenderUI::slotRev(){ -qWarning("Going to receive!"); +owarn << "Going to receive!" << oendl; FileReceive *rev = new FileReceive( FileReceive::SZ, ser ); rev->receive(); } diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp index e17dfd4..c51983f 100644 --- a/noncore/apps/opie-console/widget.cpp +++ b/noncore/apps/opie-console/widget.cpp @@ -994,9 +994,9 @@ bool Widget::eventFilter( QObject *obj, QEvent *e ) #ifdef FAKE_CTRL_AND_ALT static bool control = FALSE; static bool alt = FALSE; -// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); +// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; bool dele=FALSE; if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { QKeyEvent* ke = (QKeyEvent*)e; bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); @@ -1033,13 +1033,13 @@ bool Widget::eventFilter( QObject *obj, QEvent *e ) QKeyEvent* ke = (QKeyEvent*)e; actSel=0; // Key stroke implies a screen update, so Widget won't // know where the current selection is. -// qDebug("key pressed is 0x%x",ke->key()); +// odebug << "key pressed is 0x" << ke->key() << "" << oendl; if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker -// qDebug("key pressed 2 is 0x%x",ke->key()); +// odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl; emitText("\\"); // expose } else emit keyPressedSignal(ke); // expose ke->accept(); diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp index 96dda1c..ab25919 100644 --- a/noncore/apps/opie-console/widget_layer.cpp +++ b/noncore/apps/opie-console/widget_layer.cpp @@ -74,9 +74,9 @@ bool WidgetLayer::eventFilter( QObject *obj, QEvent *e ) #ifdef FAKE_CTRL_AND_ALT static bool control = false; static bool alt = false; -// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); +// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; bool dele = false; if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { QKeyEvent* ke = (QKeyEvent*)e; bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); @@ -114,9 +114,9 @@ QChar(a,0)); QKeyEvent* ke = (QKeyEvent*)e; //actSel=0; // Key stroke implies a screen update, so Widget won't // know where the current selection is. -// qDebug("key pressed is 0x%x",ke->key()); +// odebug << "key pressed is 0x" << ke->key() << "" << oendl; if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker insertText("\\"); // expose } else diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp index 90e1a70..aa03060 100644 --- a/noncore/apps/opie-write/mainwindow.cpp +++ b/noncore/apps/opie-write/mainwindow.cpp @@ -19,14 +19,18 @@ ** **********************************************************************/ #include "mainwindow.h" + +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/fileselector.h> #include <qpe/applnk.h> #include <qpe/resource.h> #include <qpe/fontdatabase.h> +using namespace Opie::Core; -//#include "qspellchecker.h" +/* QT */ #include "qtextedit.h" #include <qaction.h> #include <qtoolbar.h> #include <qtoolbutton.h> @@ -443,9 +447,9 @@ void MainWindow::fileOpen() } void MainWindow::fileRevert() { - qDebug( "QMainWindow::fileRevert needs to be done" ); + odebug << "QMainWindow::fileRevert needs to be done" << oendl; } void MainWindow::fileNew() { @@ -455,9 +459,9 @@ void MainWindow::fileNew() } void MainWindow::insertTable() { - qDebug( "MainWindow::insertTable() needs to be done" ); + odebug << "MainWindow::insertTable() needs to be done" << oendl; } void MainWindow::newFile( const DocLnk &dl ) { @@ -474,9 +478,9 @@ void MainWindow::openFile( const DocLnk &dl ) { FileManager fm; QString txt; if ( !fm.loadFile( dl, txt ) ) - qDebug( "couldn't open file" ); + odebug << "couldn't open file" << oendl; clear(); editorStack->raiseWidget( editor ); editor->viewport()->setFocus(); doc = new DocLnk( dl ); diff --git a/noncore/apps/opie-write/opie-write.pro b/noncore/apps/opie-write/opie-write.pro index 044ce7e..8e514d4 100644 --- a/noncore/apps/opie-write/opie-write.pro +++ b/noncore/apps/opie-write/opie-write.pro @@ -1,8 +1,7 @@ CONFIG += qt warn on quick-app - HEADERS = qcleanuphandler.h \ qcomplextext_p.h \ qrichtext_p.h \ qstylesheet.h \ diff --git a/noncore/apps/opie-write/qcomplextext.cpp b/noncore/apps/opie-write/qcomplextext.cpp index 473f184..00a91c5 100644 --- a/noncore/apps/opie-write/qcomplextext.cpp +++ b/noncore/apps/opie-write/qcomplextext.cpp @@ -105,9 +105,9 @@ QBidiContext::~QBidiContext() rightChar() returns true if the char to the right is a right join-causing char */ static inline const QChar *prevChar( const QString &str, int pos ) { - //qDebug("leftChar: pos=%d", pos); + //odebug << "leftChar: pos=" << pos << "" << oendl; pos--; const QChar *ch = str.unicode() + pos; while( pos > -1 ) { if( !ch->isMark() ) @@ -123,9 +123,9 @@ static inline const QChar *nextChar( const QString &str, int pos) pos++; int len = str.length(); const QChar *ch = str.unicode() + pos; while( pos < len ) { - //qDebug("rightChar: %d isLetter=%d, joining=%d", pos, ch.isLetter(), ch.joining()); + //odebug << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << "" << oendl; if( !ch->isMark() ) return ch; // assume it's a transparent char, this might not be 100% correct pos++; diff --git a/noncore/apps/opie-write/qrichtext.cpp b/noncore/apps/opie-write/qrichtext.cpp index b77a0fc..c27eb1e 100644 --- a/noncore/apps/opie-write/qrichtext.cpp +++ b/noncore/apps/opie-write/qrichtext.cpp @@ -36,13 +36,19 @@ **********************************************************************/ #include "qrichtext_p.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include "qdragobject.h" #include "qpaintdevicemetrics.h" #include "qdrawutil.h" #include "qcleanuphandler.h" +/* STD */ #include <stdlib.h> using namespace Qt3; @@ -183,9 +189,9 @@ QTextDeleteCommand::~QTextDeleteCommand() QTextCursor *QTextDeleteCommand::execute( QTextCursor *c ) { QTextParagraph *s = doc ? doc->paragAt( id ) : parag; if ( !s ) { - qWarning( "can't locate parag at %d, last parag: %d", id, doc->lastParagraph()->paragId() ); + owarn << "can't locate parag at " << id << ", last parag: " << doc->lastParagraph()->paragId() << "" << oendl; return 0; } cursor.setParagraph( s ); @@ -211,9 +217,9 @@ QTextCursor *QTextDeleteCommand::execute( QTextCursor *c ) QTextCursor *QTextDeleteCommand::unexecute( QTextCursor *c ) { QTextParagraph *s = doc ? doc->paragAt( id ) : parag; if ( !s ) { - qWarning( "can't locate parag at %d, last parag: %d", id, doc->lastParagraph()->paragId() ); + owarn << "can't locate parag at " << id << ", last parag: " << doc->lastParagraph()->paragId() << "" << oendl; return 0; } cursor.setParagraph( s ); @@ -1543,12 +1549,12 @@ void QTextDocument::setRichTextInternal( const QString &text, QTextCursor* curso QImage img; QString bg = attr["background"]; const QMimeSource* m = factory_->data( bg, contxt ); if ( !m ) { - qWarning("QRichText: no mimesource for %s", bg.latin1() ); + owarn << "QRichText: no mimesource for " << bg.latin1() << "" << oendl; } else { if ( !QImageDrag::decode( m, img ) ) { - qWarning("QTextImage: cannot decode %s", bg.latin1() ); + owarn << "QTextImage: cannot decode " << bg.latin1() << "" << oendl; } } if ( !img.isNull() ) { QPixmap pm; @@ -2151,9 +2157,9 @@ QString QTextDocument::richText() const QStyleSheetItem* item_ul = styleSheet()->item("ul"); QStyleSheetItem* item_ol = styleSheet()->item("ol"); QStyleSheetItem* item_li = styleSheet()->item("li"); if ( !item_p || !item_ul || !item_ol || !item_li ) { - qWarning( "QTextEdit: cannot export HTML due to insufficient stylesheet (lack of p, ul, ol, or li)" ); + owarn << "QTextEdit: cannot export HTML due to insufficient stylesheet (lack of p, ul, ol, or li)" << oendl; return QString::null; } int pastListDepth = 0; int listDepth = 0; @@ -4095,9 +4101,9 @@ int QTextParagraph::lineHeightOfChar( int i, int *bl, int *y ) const break; --it; } - qWarning( "QTextParagraph::lineHeightOfChar: couldn't find lh for %d", i ); + owarn << "QTextParagraph::lineHeightOfChar: couldn't find lh for " << i << "" << oendl; return 15; } QTextStringChar *QTextParagraph::lineStartOfChar( int i, int *index, int *line ) const @@ -4121,9 +4127,9 @@ QTextStringChar *QTextParagraph::lineStartOfChar( int i, int *index, int *line ) --it; --l; } - qWarning( "QTextParagraph::lineStartOfChar: couldn't find %d", i ); + owarn << "QTextParagraph::lineStartOfChar: couldn't find " << i << "" << oendl; return 0; } int QTextParagraph::lines() const @@ -4148,9 +4154,9 @@ QTextStringChar *QTextParagraph::lineStartOfLine( int line, int *index ) const *index = i; return &str->at( i ); } - qWarning( "QTextParagraph::lineStartOfLine: couldn't find %d", line ); + owarn << "QTextParagraph::lineStartOfLine: couldn't find " << line << "" << oendl; return 0; } int QTextParagraph::leftGap() const @@ -5696,9 +5702,9 @@ QTextFormat *QTextFormatCollection::format( const QFont &f, const QColor &c ) cachedFormat = createFormat( f, c ); cachedFormat->collection = this; cKey.insert( cachedFormat->key(), cachedFormat ); if ( cachedFormat->key() != key ) - qWarning("ASSERT: keys for format not identical: '%s '%s'", cachedFormat->key().latin1(), key.latin1() ); + owarn << "ASSERT: keys for format not identical: '" << cachedFormat->key().latin1() << " '" << key.latin1() << "'" << oendl; return cachedFormat; } void QTextFormatCollection::remove( QTextFormat *f ) @@ -6082,13 +6088,13 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co QImage img; const QMimeSource* m = factory.data( imageName, context ); if ( !m ) { - qWarning("QTextImage: no mimesource for %s", imageName.latin1() ); + owarn << "QTextImage: no mimesource for " << imageName.latin1() << "" << oendl; } else { if ( !QImageDrag::decode( m, img ) ) { - qWarning("QTextImage: cannot decode %s", imageName.latin1() ); + owarn << "QTextImage: cannot decode " << imageName.latin1() << "" << oendl; } } if ( !img.isNull() ) { diff --git a/noncore/apps/opie-write/qrichtext_p.cpp b/noncore/apps/opie-write/qrichtext_p.cpp index 6783e0b..2e8b09c 100644 --- a/noncore/apps/opie-write/qrichtext_p.cpp +++ b/noncore/apps/opie-write/qrichtext_p.cpp @@ -34,8 +34,11 @@ ** not clear to you. ** **********************************************************************/ +#include <opie2/odebug.h> +using namespace Opie::Core; + #include "qrichtext_p.h" using namespace Qt3; @@ -136,9 +139,9 @@ void QTextCursor::gotoPosition( QTextParagraph* p, int index ) } para = p; if ( index < 0 || index >= para->length() ) { #if defined(QT_CHECK_RANGE) - qWarning( "QTextCursor::gotoParagraph Index: %d out of range", index ); + owarn << "QTextCursor::gotoParagraph Index: " << index << " out of range" << oendl; #endif index = index < 0 ? 0 : para->length() - 1; } @@ -476,9 +479,9 @@ bool QTextParagraph::fullSelected( int id ) const int QTextParagraph::lineY( int l ) const { if ( l > (int)lineStarts.count() - 1 ) { - qWarning( "QTextParagraph::lineY: line %d out of range!", l ); + owarn << "QTextParagraph::lineY: line " << l << " out of range!" << oendl; return 0; } if ( !isValid() ) @@ -492,9 +495,9 @@ int QTextParagraph::lineY( int l ) const int QTextParagraph::lineBaseLine( int l ) const { if ( l > (int)lineStarts.count() - 1 ) { - qWarning( "QTextParagraph::lineBaseLine: line %d out of range!", l ); + owarn << "QTextParagraph::lineBaseLine: line " << l << " out of range!" << oendl; return 10; } if ( !isValid() ) @@ -508,9 +511,9 @@ int QTextParagraph::lineBaseLine( int l ) const int QTextParagraph::lineHeight( int l ) const { if ( l > (int)lineStarts.count() - 1 ) { - qWarning( "QTextParagraph::lineHeight: line %d out of range!", l ); + owarn << "QTextParagraph::lineHeight: line " << l << " out of range!" << oendl; return 15; } if ( !isValid() ) @@ -524,10 +527,10 @@ int QTextParagraph::lineHeight( int l ) const void QTextParagraph::lineInfo( int l, int &y, int &h, int &bl ) const { if ( l > (int)lineStarts.count() - 1 ) { - qWarning( "QTextParagraph::lineInfo: line %d out of range!", l ); - qDebug( "%d %d", (int)lineStarts.count() - 1, l ); + owarn << "QTextParagraph::lineInfo: line " << l << " out of range!" << oendl; + odebug << "" << (int)lineStarts.count() - 1 << " " << l << "" << oendl; y = 0; h = 15; bl = 10; return; diff --git a/noncore/apps/qashmoney/accountdisplay.cpp b/noncore/apps/qashmoney/accountdisplay.cpp index 0fe5b09..046d997 100755 --- a/noncore/apps/qashmoney/accountdisplay.cpp +++ b/noncore/apps/qashmoney/accountdisplay.cpp @@ -1,13 +1,18 @@ -#include <qmessagebox.h> -#include <qheader.h> - #include "accountdisplay.h" #include "newaccount.h" #include "transaction.h" #include "transferdialog.h" #include "transfer.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qmessagebox.h> +#include <qheader.h> + extern Account *account; extern Transaction *transaction; extern Transfer *transfer; extern Preferences *preferences; @@ -266,9 +271,9 @@ void AccountDisplay::getTransferAccounts ( QListViewItem * item ) { // set the cleared integer if the checkbox is checked if ( td->clearedcheckbox->isChecked() == TRUE ) cleared = 1; - qDebug("Year from transferdialog = %i",td->getYear()); + odebug << "Year from transferdialog = " << td->getYear() << "" << oendl; // add the transfer with a new date if its been edited or use the default date if ( td->getDateEdited () == TRUE ) transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, account->getParentAccountID ( secondaccountid ), td->getDay(), td->getMonth(), td->getYear(), td->amount->text().toFloat(), cleared ); else diff --git a/noncore/apps/qashmoney/config.in b/noncore/apps/qashmoney/config.in index 91739fe..aeed298 100644 --- a/noncore/apps/qashmoney/config.in +++ b/noncore/apps/qashmoney/config.in @@ -1,4 +1,4 @@ config QASHMONEY boolean "opie-qashmoney (money manager)" default "n" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/apps/qashmoney/qashmoney.pro b/noncore/apps/qashmoney/qashmoney.pro index 6ad3db3..8a4302f 100755 --- a/noncore/apps/qashmoney/qashmoney.pro +++ b/noncore/apps/qashmoney/qashmoney.pro @@ -42,8 +42,8 @@ DEPENDPATH = $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/bin unix:LIBS += -lm -LIBS += -lqpe -lqte -lsqlite +LIBS += -lqpe -lopiecore2 -lsqlite include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index dbf9370..6e544ba 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp @@ -16,17 +16,25 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include <stdlib.h> +#include "common.h" +#include "datacache.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/timestring.h> +using namespace Opie::Core; + +/* QT */ #include <qstring.h> #include <qheader.h> #include <qvector.h> #include <qdatetime.h> -#include <qpe/timestring.h> -#include "common.h" -#include "datacache.h" + +/* STD */ #include <assert.h> +#include <stdlib.h> static const int del_flag = 0x1; static const int new_flag = 0x2; @@ -311,9 +319,9 @@ void TVVariant::load(QDataStream &s ) d->value.i = x; } break; default: - qFatal("Unrecognized data type"); + ofatal << "Unrecognized data type" << oendl; } } void TVVariant::save( QDataStream &s ) const @@ -1077,9 +1085,9 @@ QDataStream &operator>>( QDataStream &s, DataElem &d) int index = 0; s >> size; /* redundent data but makes streaming easier */ if (size != d.getNumFields()) { - qWarning("DataSize mis-match"); + owarn << "DataSize mis-match" << oendl; return s; /* sanity check failed.. don't load */ } for(i = 0; i < size; i++) { @@ -1376,9 +1384,9 @@ bool DataElem::contains(int i, TVVariant v) const case TVVariant::Time: case TVVariant::Date: break; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1402,9 +1410,9 @@ bool DataElem::startsWith(int i, TVVariant v) const case TVVariant::Time: case TVVariant::Date: return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1428,9 +1436,9 @@ bool DataElem::endsWith(int i, TVVariant v) const case TVVariant::Time: case TVVariant::Date: return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1460,9 +1468,9 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) if(d2) { if (type != d2->getField(column).type()) { /* can't do compare */ - qWarning("Tried to compare two incompatable types"); + owarn << "Tried to compare two incompatable types" << oendl; return FALSE; } return target.closer(d1->getField(column), d2->getField(column)); } diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp index 7c14eef..6380e1b 100644 --- a/noncore/apps/tableviewer/db/datacache.cpp +++ b/noncore/apps/tableviewer/db/datacache.cpp @@ -25,11 +25,19 @@ #include "datacache.h" #include "xmlsource.h" #include "csvsource.h" -#include <stdlib.h> + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qheader.h> +/* STD */ +#include <stdlib.h> + #define INIT_TABLE_SIZE 128 /*! \class DBStore datastore.h @@ -149,9 +157,9 @@ void DBStore::addItem(DataElem *delem) void DBStore::addItemInternal(DataElem *delem) { /* if already full, don't over fill, do a qWarning though */ if (full) { - qWarning("Attempted to add items to already full table"); + owarn << "Attempted to add items to already full table" << oendl; return; } master_table.insert(number_elems, delem); diff --git a/noncore/apps/tableviewer/db/xmlsource.cpp b/noncore/apps/tableviewer/db/xmlsource.cpp index 94fec36..4ca6aee 100644 --- a/noncore/apps/tableviewer/db/xmlsource.cpp +++ b/noncore/apps/tableviewer/db/xmlsource.cpp @@ -17,14 +17,20 @@ ** not clear to you. ** **********************************************************************/ #include "xmlsource.h" -#include <qdict.h> -#include <stdlib.h> -#include <qtextstream.h> #include "../xmlencodeattr.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ +#include <qdict.h> +#include <qtextstream.h> + +/* STD */ +#include <stdlib.h> DBXml::DBXml(DBStore *d) { dstore = d; @@ -139,9 +145,9 @@ DBXmlHandler::~DBXmlHandler() } QString DBXmlHandler::errorProtocol() { - qWarning("Error reading file"); + owarn << "Error reading file" << oendl; return errorProt; } bool DBXmlHandler::startDocument() @@ -171,9 +177,9 @@ bool DBXmlHandler::startElement(const QString&, const QString&, state = StateKey; last_key_type = TVVariant::String; key = atts.value("name"); if (key.isEmpty()) { - qWarning("empty key name"); + owarn << "empty key name" << oendl; return FALSE; } if(!atts.value("type").isEmpty()) last_key_type = TVVariant::nameToType(atts.value("type")); @@ -189,15 +195,15 @@ bool DBXmlHandler::startElement(const QString&, const QString&, state = StateField; /* the qName is the name of a key */ if (!keyIndexList[qName]) { /* invalid key, we failed */ - qWarning("Invalid key in record"); + owarn << "Invalid key in record" << oendl; return FALSE; } keyIndex = *keyIndexList[qName]; return TRUE; } - qWarning("Unable to determine tag type"); + owarn << "Unable to determine tag type" << oendl; return FALSE; } bool DBXmlHandler::endElement(const QString&, const QString&, @@ -224,9 +230,9 @@ bool DBXmlHandler::endElement(const QString&, const QString&, // we are done... break; default: // should only get a 'endElement' from one of the above states. - qWarning("Invalid end tag"); + owarn << "Invalid end tag" << oendl; return FALSE; break; } return TRUE; @@ -253,9 +259,9 @@ bool DBXmlHandler::characters(const QString& ch) current_data->setField(keyIndex, ch_simplified); return TRUE; } - qWarning("Junk characters found... ignored"); + owarn << "Junk characters found... ignored" << oendl; return TRUE; } QString DBXmlHandler::errorString() @@ -269,9 +275,9 @@ bool DBXmlHandler::warning(const QXmlParseException& exception) .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } bool DBXmlHandler::error(const QXmlParseException& exception) @@ -280,9 +286,9 @@ bool DBXmlHandler::error(const QXmlParseException& exception) .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } bool DBXmlHandler::fatalError(const QXmlParseException& exception) @@ -291,7 +297,7 @@ bool DBXmlHandler::fatalError(const QXmlParseException& exception) .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp index 102b94c..9538cb3 100644 --- a/noncore/apps/tableviewer/tableviewer.cpp +++ b/noncore/apps/tableviewer/tableviewer.cpp @@ -17,29 +17,31 @@ ** not clear to you. ** **********************************************************************/ -/* local includes */ #include "tableviewer.h" #include "ui/tvbrowseview.h" #include "ui/tvfilterview.h" #include "ui/tvlistview.h" #include "ui/tveditview.h" #include "ui/tvkeyedit.h" #include "db/datacache.h" -/* QPE includes */ +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/fileselector.h> #include <qpe/resource.h> -#include <qtoolbar.h> +using namespace Opie::Core; -/* QTE includes */ +/* QT */ #include <qmenubar.h> +#include <qtoolbar.h> #include <qpopupmenu.h> #include <qapplication.h> #include <qwidgetstack.h> #include <qlayout.h> #include <qbuffer.h> + /*! \class TableViewerWindow \brief The main window widget of the application @@ -200,9 +202,9 @@ void TableViewerWindow::saveDocument() FileManager fm; QIODevice *dev = fm.saveFile(doc); if(!ds->saveSource(dev, doc.type())){ - qWarning("Save unsuccessful"); + owarn << "Save unsuccessful" << oendl; return; } dev->close(); dirty = FALSE; @@ -287,9 +289,9 @@ void TableViewerWindow::openDocument(const DocLnk &f) setCaption(tr(scratch)); dirty = FALSE; } else { - qWarning(tr("could not load Document")); + owarn << tr("could not load Document") << oendl; } dev->close(); } diff --git a/noncore/apps/tableviewer/tableviewer.pro b/noncore/apps/tableviewer/tableviewer.pro index 1de23bb..564f50f 100644 --- a/noncore/apps/tableviewer/tableviewer.pro +++ b/noncore/apps/tableviewer/tableviewer.pro diff --git a/noncore/apps/tableviewer/ui/tvlistview.cpp b/noncore/apps/tableviewer/ui/tvlistview.cpp index b10ff1d..c3e6432 100644 --- a/noncore/apps/tableviewer/ui/tvlistview.cpp +++ b/noncore/apps/tableviewer/ui/tvlistview.cpp @@ -16,10 +16,17 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ + #include "tvlistview.h" #include "../db/common.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qtoolbutton.h> #include <qlistview.h> #include <qlayout.h> @@ -162,9 +169,9 @@ void TVListView::first() } void TVListView::last() { - qWarning("TVListView::last not yet implemented"); + owarn << "TVListView::last not yet implemented" << oendl; } void TVListView::next() { diff --git a/noncore/apps/tinykate/libkate/libkate.pro b/noncore/apps/tinykate/libkate/libkate.pro index 11ee275..1552dff 100644 --- a/noncore/apps/tinykate/libkate/libkate.pro +++ b/noncore/apps/tinykate/libkate/libkate.pro @@ -25,9 +25,8 @@ HEADERS = microkde/kapplication.h \ microkde/klistview.h \ microkde/kglobalsettings.h \ microkde/kcolorbtn.h \ \ - \ qt3back/qregexp3.h \ microkde/ksharedptr.h \ document/katebuffer.h document/katedialogs.h \ document/katetextline.h \ @@ -57,9 +56,8 @@ SOURCES = microkde/kapplication.cpp \ microkde/kglobal.cpp \ microkde/kglobalsettings.cpp \ microkde/kcolorbtn.cpp \ \ - \ qt3back/qregexp3.cpp \ ktexteditor/ktexteditor.cpp \ document/katebuffer.cpp document/katedialogs.cpp \ document/katehighlight.cpp \ @@ -69,9 +67,8 @@ SOURCES = microkde/kapplication.cpp \ view/kateundohistory.cpp \ view/kateview.cpp \ view/kateviewdialog.cpp \ interfaces/interfaces.cpp - INTERFACES = INCLUDEPATH += $(OPIEDIR)/include \ $(OPIEDIR)/noncore/apps/tinykate/libkate \ $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ diff --git a/noncore/apps/tinykate/tinykate.pro b/noncore/apps/tinykate/tinykate.pro index 6f4baa8..d34e519 100644 --- a/noncore/apps/tinykate/tinykate.pro +++ b/noncore/apps/tinykate/tinykate.pro @@ -2,18 +2,16 @@ TEMPLATE = app CONFIG = qt warn_on quick-app DESTDIR = $(OPIEDIR)/bin HEADERS = tinykate.h SOURCES = tinykate.cpp main.cpp -INTERFACES = INCLUDEPATH += $(OPIEDIR)/include \ $(OPIEDIR)/noncore/apps/tinykate/libkate \ $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ $(OPIEDIR)/noncore/apps/tinykate/libkate/document \ $(OPIEDIR)/noncore/apps/tinykate/libkate/view \ $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \ $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \ $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back - DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -ltinykate -lopiecore2 -lopieui2 TARGET = kate diff --git a/noncore/apps/zsafe/config.in b/noncore/apps/zsafe/config.in index 6e321f3..b6d3ffe 100644 --- a/noncore/apps/zsafe/config.in +++ b/noncore/apps/zsafe/config.in @@ -1,5 +1,5 @@ config ZSAFE boolean "zsafe (Zaurus Password Manager)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI diff --git a/noncore/apps/zsafe/scqtfiledlg.cpp b/noncore/apps/zsafe/scqtfiledlg.cpp index 52b8d0d..c67bbd5 100644 --- a/noncore/apps/zsafe/scqtfiledlg.cpp +++ b/noncore/apps/zsafe/scqtfiledlg.cpp @@ -1,14 +1,11 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'scqtfiledlg.ui' -** -** Created: Sun Jun 8 15:51:12 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ #include "scqtfiledlg.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qcombobox.h> #include <qlineedit.h> #include <qlistview.h> #include <qtoolbutton.h> @@ -215,42 +212,42 @@ ScQtFileDlg::~ScQtFileDlg() } void ScQtFileDlg::slotCancel() { - qWarning( "ScQtFileDlg::slotCancel(): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotCancel(): Not implemented yet!" << oendl; } void ScQtFileDlg::slotDirComboBoxChanged( int ) { - qWarning( "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" << oendl; } void ScQtFileDlg::slotDoubleClicked(QListViewItem *) { - qWarning( "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" << oendl; } void ScQtFileDlg::slotFileTextChanged( const QString & ) { - qWarning( "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" << oendl; } void ScQtFileDlg::slotMkDir() { - qWarning( "ScQtFileDlg::slotMkDir(): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotMkDir(): Not implemented yet!" << oendl; } void ScQtFileDlg::slotOK() { - qWarning( "ScQtFileDlg::slotOK(): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotOK(): Not implemented yet!" << oendl; } void ScQtFileDlg::slotSelectionChanged(QListViewItem *) { - qWarning( "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" << oendl; } void ScQtFileDlg::slotTypeComboBoxChanged( int ) { - qWarning( "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" ); + owarn << "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" << oendl; } diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 3df55eb..bf8f7f4 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -28,19 +28,18 @@ #ifndef DESKTOP #ifndef NO_OPIE #include <opie2/ofiledialog.h> - +#include <opie2/odebug.h> +using namespace Opie::Core; using namespace Opie::Ui; #else #include "scqtfileedit.h" #endif #endif #include <qclipboard.h> -#include <stdio.h> - #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> @@ -2068,9 +2067,8 @@ int ZSafe::loadInit(const char* _filename, const char *password) #ifndef WIN32 size = read(fileno (fd), (unsigned char *) (charbuf + count), 8); #else - printf ("LoadInit() read1"); size = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); #endif if (size < 8) @@ -2088,9 +2086,8 @@ int ZSafe::loadInit(const char* _filename, const char *password) while ((count = read (fileno (fd), (unsigned char *) charbuf, 8)) > 0) { while (count < 8) { count2 = read (fileno (fd), (unsigned char *) (charbuf + count), 8); #else - printf ("LoadInit() read2"); while ((count = fread ((unsigned char *) (charbuf), sizeof(unsigned char), 8, fd)) > 0) { while (count < 8) { count2 = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); #endif @@ -2258,9 +2255,9 @@ bool ZSafe::saveDocument(const char* _filename, retval = saveEntry(entry); for (int z=0; z<i; z++) free(entry[z]); if (retval == PWERR_DATA) { - qWarning("1: Error writing file, contents not saved"); + owarn << "1: Error writing file, contents not saved" << oendl; saveFinalize(); return false; } // #ifndef WIN32 @@ -2302,18 +2299,18 @@ bool ZSafe::saveDocument(const char* _filename, { free(entry[z]); } if (retval == PWERR_DATA) { - qWarning("1: Error writing file, contents not saved"); + owarn << "1: Error writing file, contents not saved" << oendl; saveFinalize(); return false; } } } if (saveFinalize() == PWERR_DATA) { - qWarning("2: Error writing file, contents not saved"); + owarn << "2: Error writing file, contents not saved" << oendl; return false; } else { #ifndef DESKTOP Global::statusMessage (tr("Password file saved.")); @@ -3189,9 +3186,9 @@ void ZSafe::editCategory() icon = dialog->IconField->currentText()+".png"; if (cat) { - qWarning("Category found"); + owarn << "Category found" << oendl; // if (!icon.isEmpty() && !icon.isNull()) if (icon != "predefined.png") { diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro index 72c8fe9..3cae706 100644 --- a/noncore/apps/zsafe/zsafe.pro +++ b/noncore/apps/zsafe/zsafe.pro @@ -9,9 +9,9 @@ SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \ scqtfiledlg.cpp INTERFACES = newdialog.ui searchdialog.ui passworddialog.ui categorydialog.ui infoform.ui wait.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -Wl,-rpath,$(OPIEDIR)/lib -L$(OPIEDIR)/lib -lqpe -lopiecore2 -lopieui2 +LIBS += -lqpe -lopiecore2 -lopieui2 TARGET = zsafe include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/comm/keypebble/config.in b/noncore/comm/keypebble/config.in index 20384aa..8a800b9 100644 --- a/noncore/comm/keypebble/config.in +++ b/noncore/comm/keypebble/config.in @@ -1,4 +1,4 @@ config KEYPEBBLE boolean "opie-keypebble (Virtual Network Computing VNC viewer)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/comm/keypebble/keypebble.pro b/noncore/comm/keypebble/keypebble.pro index 3515016..7631e4e 100644 --- a/noncore/comm/keypebble/keypebble.pro +++ b/noncore/comm/keypebble/keypebble.pro @@ -22,14 +22,13 @@ SOURCES = d3des.c \ kvnc.cpp \ kvncconndlg.cpp \ kvncbookmarkdlg.cpp \ main.cpp -INTERFACES = kvncconndlgbase.ui \ - kvncbookmarkdlgbase.ui +INTERFACES = kvncconndlgbase.ui kvncbookmarkdlgbase.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 TARGET = keypebble include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/comm/keypebble/krfbbuffer.cpp b/noncore/comm/keypebble/krfbbuffer.cpp index 4cec0c2..4b29612 100644 --- a/noncore/comm/keypebble/krfbbuffer.cpp +++ b/noncore/comm/keypebble/krfbbuffer.cpp @@ -1,17 +1,25 @@ -#include <assert.h> -#include <qimage.h> -#include <qpainter.h> -#include <qapplication.h> #include "krfbdecoder.h" #include "krfbbuffer.h" #include "krfbconnection.h" #include "krfbserverinfo.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qimage.h> +#include <qpainter.h> +#include <qapplication.h> + +/* STD */ +#include <assert.h> + // // Endian stuff // -#ifndef KDE_USE_FINAL +#ifndef OPIE_NO_DEBUG const int endianTest = 1; #endif #define Swap16IfLE(s) \ @@ -38,9 +46,9 @@ KRFBBuffer::~KRFBBuffer() } void KRFBBuffer::resize( int w, int h ) { - qWarning( "Resizing buffer" ); + owarn << "Resizing buffer" << oendl; pix->resize( w, h ); QPalette pal = qApp->palette(); @@ -60,9 +68,9 @@ void KRFBBuffer::mouseEvent( QMouseEvent *e ) } void KRFBBuffer::keyPressEvent( QKeyEvent *e ) { - qWarning( "Buffer got a key" ); + owarn << "Buffer got a key" << oendl; decoder->sendKeyPressEvent( e ); } @@ -73,9 +81,9 @@ void KRFBBuffer::keyReleaseEvent( QKeyEvent *e ) void KRFBBuffer::copyRect( int srcX, int srcY, int destX, int destY, int w, int h ) { -// qWarning( "Got copy rect" ); +// owarn << "Got copy rect" << oendl; bitBlt( pix, destX, destY, pix, srcX, srcY, w, h, CopyROP ); emit updated( destX, destY, w, h ); } diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index cd1fda0..b3525df 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -1,10 +1,14 @@ #include "krfbconnection.h" #include "krfbcanvas.h" #include "krfbbuffer.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qclipboard.h> KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) : QScrollView( parent, name ) @@ -41,9 +45,9 @@ void KRFBCanvas::openConnection(KRFBServer server) void KRFBCanvas::openURL( const QUrl &url ) { if ( loggedIn_ ) { - qWarning( "openURL invoked when logged in\n" ); + owarn << "openURL invoked when logged in\n" << oendl; return; } QCString host = url.host().latin1(); @@ -73,9 +77,9 @@ void KRFBCanvas::bell() } void KRFBCanvas::loggedIn() { - qWarning( "Ok, we're logged in" ); + owarn << "Ok, we're logged in" << oendl; // // Get ready for action // diff --git a/noncore/comm/keypebble/krfbconnection.cpp b/noncore/comm/keypebble/krfbconnection.cpp index b447046..33e0563 100644 --- a/noncore/comm/keypebble/krfbconnection.cpp +++ b/noncore/comm/keypebble/krfbconnection.cpp @@ -1,14 +1,21 @@ -#include <assert.h> -#include <qsocket.h> -#include <qtimer.h> -#include <string.h> - #include "krfbconnection.h" #include "krfblogin.h" #include "krfbdecoder.h" #include "krfbbuffer.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qsocket.h> +#include <qtimer.h> + +/* STD */ +#include <assert.h> +#include <string.h> + KRFBConnection::KRFBConnection( QObject *parent ) : QObject( parent, "KRFBConnection" ) { portBase_ = 5900; @@ -42,17 +49,17 @@ void KRFBConnection::connectTo( KRFBServer server) // Connect to something to notice connection or error connect( sock, SIGNAL( error(int) ), SLOT( gotSocketError(int) ) ); connect( sock, SIGNAL( connected() ), SLOT( gotSocketConnection() ) ); - qWarning( "Connecting..." ); + owarn << "Connecting..." << oendl; currentState_ = Connecting; sock->connectToHost( options_->hostname.latin1(), portBase_ + options_->display ); } void KRFBConnection::disconnect() { - qWarning( "Disconnecting from server" ); + owarn << "Disconnecting from server" << oendl; if ( ( currentState_ != Disconnected ) && ( currentState_ != Disconnecting ) && sock ) { @@ -81,9 +88,9 @@ void KRFBConnection::disconnectDone() void KRFBConnection::gotSocketConnection() { currentState_ = LoggingIn; - qWarning( "Connected, logging in..." ); + owarn << "Connected, logging in..." << oendl; static QString statusMsg = tr( "Connected" ); emit statusChanged( statusMsg ); @@ -92,9 +99,9 @@ void KRFBConnection::gotSocketConnection() } void KRFBConnection::gotRFBConnection() { - qWarning( "Logged into server" ); + owarn << "Logged into server" << oendl; currentState_ = Connected; emit connected(); @@ -121,9 +128,9 @@ void KRFBConnection::gotSocketError( int err ) { currentState_ = Error; // Do some error handling stuff - qWarning( "KRFBConnection: Socket error %d", err ); + owarn << "KRFBConnection: Socket error " << err << "" << oendl; static QString refused = tr( "Connection Refused" ); static QString host = tr( "Host not found" ); static QString read = tr( "Read Error: QSocket reported an error reading\n" @@ -171,13 +178,13 @@ void KRFBConnection::waitForData( unsigned int sz ) assert( sz > 0 ); assert( currentState_ != Error ); if ( sock->size() >= sz ) { - // qWarning( "No need to wait for data" ); + // owarn << "No need to wait for data" << oendl; emit gotEnoughData(); } else { - // qWarning( "Waiting for %u bytes", sz ); + // owarn << "Waiting for " << sz << " bytes" << oendl; minData_ = sz; connect( sock, SIGNAL( readyRead() ), SLOT( gotMoreData() ) ); } } diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index db95154..69457e2 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -2,17 +2,22 @@ #include "krfbserverinfo.h" #include "krfbdecoder.h" #include "krfbbuffer.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ #include <qpixmap.h> +/* STD */ #include <assert.h> // // Endian stuff // -#ifndef KDE_USE_FINAL +#ifndef OPIE_NO_DEBUG const int endianTest = 1; #endif #define Swap16IfLE(s) \ @@ -134,9 +139,9 @@ void KRFBDecoder::sendClientInit() { con->write( &( con->options()->shared ), 1 ); // Wait for server init - qWarning( "Waiting for server init" ); + owarn << "Waiting for server init" << oendl; static QString statusMsg = tr( "Waiting for server initialization..." ); emit status( statusMsg ); @@ -146,9 +151,9 @@ void KRFBDecoder::sendClientInit() } void KRFBDecoder::gotServerInit() { - qWarning( "Got server init" ); + owarn << "Got server init" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) ); if ( info ) delete info; @@ -180,9 +185,9 @@ void KRFBDecoder::gotServerInit() con->read( &(info->nameLength), 4 ); info->nameLength = Swap32IfLE( info->nameLength ); - qWarning( "Width = %d, Height = %d", info->width, info->height ); + owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", info->bpp, info->depth, info->bigEndian, info->trueColor ); qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", info->redMax, info->greenMax, info->blueMax ); @@ -191,9 +196,9 @@ void KRFBDecoder::gotServerInit() buf->resize( info->width/con->options()->scaleFactor, info->height /con->options()->scaleFactor); // Wait for desktop name - qWarning( "Waiting for desktop name" ); + owarn << "Waiting for desktop name" << oendl; static QString statusMsg = tr( "Waiting for desktop name..." ); emit status( statusMsg ); @@ -206,9 +211,9 @@ void KRFBDecoder::gotDesktopName() { assert( info ); assert( currentState == AwaitingDesktopName ); - qWarning( "Got desktop name" ); + owarn << "Got desktop name" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotDesktopName() ) ); @@ -218,9 +223,9 @@ void KRFBDecoder::gotDesktopName() con->read( buf, info->nameLength ); buf[ info->nameLength ] = '\0'; info->name = buf; - qWarning( "Desktop: %s", info->name.latin1() ); + owarn << "Desktop: " << info->name.latin1() << "" << oendl; delete buf; // Get the format we'll really use and tell the server @@ -370,9 +375,9 @@ void KRFBDecoder::sendUpdateRequest( bool incremental ) void KRFBDecoder::gotUpdateHeader() { assert( currentState == AwaitingUpdate ); - // qWarning( "Got update header" ); + // owarn << "Got update header" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotUpdateHeader() ) ); @@ -405,9 +410,9 @@ void KRFBDecoder::gotUpdateHeader() con->read( &noRects, 2 ); noRects = Swap16IfLE( noRects ); - // qWarning( "Expecting %d rects", noRects ); + // owarn << "Expecting " << noRects << " rects" << oendl; // Now wait for the data currentState = AwaitingRectHeader; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) ); @@ -417,9 +422,9 @@ void KRFBDecoder::gotUpdateHeader() void KRFBDecoder::gotRectHeader() { assert( currentState == AwaitingRectHeader ); - // qWarning( "Got rect header" ); + // owarn << "Got rect header" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotRectHeader() ) ); @@ -445,33 +450,33 @@ void KRFBDecoder::gotRectHeader() // Our constants have already been byte swapped, so we use // the remote value as is. // if ( encoding == RawEncoding ) { - // qWarning( "Raw encoding" ); + // owarn << "Raw encoding" << oendl; handleRawRect(); } else if ( encoding == CopyRectEncoding ) { -// qWarning( "CopyRect encoding" ); +// owarn << "CopyRect encoding" << oendl; handleCopyRect(); } else if ( encoding == RreEncoding ) { - qWarning( "RRE encoding" ); + owarn << "RRE encoding" << oendl; handleRRERect(); } else if ( encoding == CorreEncoding ) { - qWarning( "CoRRE encoding" ); + owarn << "CoRRE encoding" << oendl; handleCoRRERect(); } else if ( encoding == HexTileEncoding ) { - qWarning( "HexTile encoding" ); + owarn << "HexTile encoding" << oendl; handleHexTileRect(); } else { int msg = Swap32IfLE( encoding ); QString protocolError = tr( "Protocol Error: An unknown encoding was " "used by the server %1" ).arg( msg ); currentState = Error; - qWarning( "Unknown encoding, %d", msg ); + owarn << "Unknown encoding, " << msg << "" << oendl; emit error( protocolError ); return; } } @@ -485,9 +490,9 @@ void KRFBDecoder::handleRawRect() // We need something a bit cleverer here to handle large // rectanges nicely. The chunking should be based on the // overall size (but has to be in complete lines). - // qWarning( "Handling a raw rect chunk" ); + // owarn << "Handling a raw rect chunk" << oendl; // CARD32 lineCount = w * format->bpp / 8; if ( h > RectChunkSize ) { @@ -508,9 +513,9 @@ void KRFBDecoder::getRawRectChunk( int lines ) this->lines = lines; CARD32 count = lines * w * format->bpp / 8; // Wait for server init - // qWarning( "Waiting for raw rect chunk, %ld", count ); + // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; currentState = AwaitingRawRectChunk; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRawRectChunk() ) ); con->waitForData( count ); @@ -522,9 +527,9 @@ void KRFBDecoder::gotRawRectChunk() disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotRawRectChunk() ) ); - // qWarning( "Got raw rect chunk" ); + // owarn << "Got raw rect chunk" << oendl; // // Read the rect data and copy it to the buffer. // @@ -545,9 +550,9 @@ void KRFBDecoder::gotRawRectChunk() } else { noRects--; - // qWarning( "There are %d rects left", noRects ); + // owarn << "There are " << noRects << " rects left" << oendl; if ( noRects ) { currentState = AwaitingRectHeader; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) ); @@ -589,9 +594,9 @@ void KRFBDecoder::gotCopyRectPos() buf->copyRect( srcX, srcY, x, y, w, h ); noRects--; - // qWarning( "There are %d rects left", noRects ); + // owarn << "There are " << noRects << " rects left" << oendl; if ( noRects ) { currentState = AwaitingRectHeader; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) ); @@ -602,19 +607,19 @@ void KRFBDecoder::gotCopyRectPos() } void KRFBDecoder::handleRRERect() { - qWarning( "RRE not implemented" ); + owarn << "RRE not implemented" << oendl; } void KRFBDecoder::handleCoRRERect() { - qWarning( "CoRRE not implemented" ); + owarn << "CoRRE not implemented" << oendl; } void KRFBDecoder::handleHexTileRect() { - qWarning( "HexTile not implemented" ); + owarn << "HexTile not implemented" << oendl; } void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) { @@ -672,9 +677,9 @@ void KRFBDecoder::sendCutEvent( const QString &unicode ) } void KRFBDecoder::gotServerCut() { - qWarning( "Got server cut" ); + owarn << "Got server cut" << oendl; currentState = AwaitingServerCutLength; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotServerCutLength() ) ); con->waitForData( ServerCutLenLength ); @@ -720,9 +725,9 @@ void KRFBDecoder::gotServerCutText() cutbuf[ serverCutTextLen ] = '\0'; /* For some reason QApplication::clipboard()->setText() segfaults when called * from within keypebble's mass of signals and slots - qWarning( "Server cut: %s", cutbuf ); + owarn << "Server cut: " << cutbuf << "" << oendl; QString cutText( cutbuf ); // DANGER!! qApp->clipboard()->setText( cutText ); */ @@ -737,16 +742,16 @@ void KRFBDecoder::gotServerCutText() else if ( oldState == Idle ) { currentState = Idle; } else { - qWarning( "Async handled in weird state" ); + owarn << "Async handled in weird state" << oendl; currentState = oldState; }; } void KRFBDecoder::gotBell() { - qWarning( "Got server bell" ); + owarn << "Got server bell" << oendl; buf->soundBell(); // Now wait for the update (again) if ( oldState == AwaitingUpdate ) { @@ -757,9 +762,9 @@ void KRFBDecoder::gotBell() else if ( oldState == Idle ) { currentState = Idle; } else { - qWarning( "Async handled in weird state" ); + owarn << "Async handled in weird state" << oendl; currentState = oldState; }; } diff --git a/noncore/comm/keypebble/krfblogin.cpp b/noncore/comm/keypebble/krfblogin.cpp index 2bbd110..92005d2 100644 --- a/noncore/comm/keypebble/krfblogin.cpp +++ b/noncore/comm/keypebble/krfblogin.cpp @@ -1,15 +1,20 @@ -#include <assert.h> +#include "krfblogin.h" +#include "krfbconnection.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qtimer.h> +/* STD */ +#include <assert.h> extern "C" { #include "vncauth.h" } -#include "krfblogin.h" -#include "krfbconnection.h" -#include <qtimer.h> - // The length of the various messages (used to decide how many bytes to // wait for). const int ServerVersionLength = 12; const int ClientVersionLength = 12; @@ -51,9 +56,9 @@ KRFBLogin::KRFBLogin( KRFBConnection *con ) connect( this, SIGNAL( error(const QString&) ), con, SIGNAL( error(const QString&) ) ); - qWarning( "Waiting for server version..." ); + owarn << "Waiting for server version..." << oendl; static QString statusMsg = tr( "Waiting for server version..." ); emit status( statusMsg ); @@ -73,9 +78,9 @@ KRFBLogin::State KRFBLogin::state() const } void KRFBLogin::gotServerVersion() { - qWarning( "Got server version" ); + owarn << "Got server version" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerVersion() ) ); @@ -91,9 +96,9 @@ void KRFBLogin::gotServerVersion() if ( rfbString.find( regexp ) == -1 ) { static QString msg = tr( "Error: Invalid server version, %1" ).arg( rfbString ); - qWarning( msg ); + owarn << msg << oendl; emit error( msg ); currentState = Error; return; } @@ -105,22 +110,22 @@ void KRFBLogin::gotServerVersion() serverMinor = (serverVersion[8] - '0') * 100 + (serverVersion[9] - '0') * 10 + (serverVersion[10] - '0'); - qWarning("Server Version: %03d.%03d", serverMajor, serverMinor ); + owarn << "Server Version: " << serverMajor << "." << serverMinor << "" << oendl; if ( serverMajor != 3 ) { QString msg = tr( "Error: Unsupported server version, %1" ) .arg( rfbString ); - qWarning( msg ); + owarn << msg << oendl; emit error( msg ); currentState = Error; return; } if ( serverMinor != 3 ) { - qWarning( "Minor version mismatch: %d", serverMinor ); + owarn << "Minor version mismatch: " << serverMinor << "" << oendl; } // Setup for the next state sendClientVersion(); @@ -142,9 +147,9 @@ void KRFBLogin::gotAuthScheme() static QString statusMsgOk = tr( "Logged in" ); switch ( scheme ) { case 0: - qWarning( "Failed" ); + owarn << "Failed" << oendl; // Handle failure connect( con, SIGNAL( gotEnoughData() ), SLOT( gotFailureReasonSize() ) ); con->waitForData( FailureReasonSizeLength ); break; @@ -158,9 +163,9 @@ void KRFBLogin::gotAuthScheme() connect( con, SIGNAL( gotEnoughData() ), SLOT( gotChallenge() ) ); con->waitForData( ChallengeLength ); break; default: - qWarning( "Unknown authentication scheme, 0x%08lx", scheme ); + owarn << "Unknown authentication scheme, 0x" << scheme << "" << oendl; currentState = Error; break; }; } @@ -180,9 +185,9 @@ void KRFBLogin::getPassword() con->read( challenge, ChallengeLength ); // Last chance to enter a password if ( con->options_->password.isNull() ) { - qWarning( "krfblogin needs a password" ); + owarn << "krfblogin needs a password" << oendl; emit passwordRequired( con ); } if ( con->options_->password.isNull() ) { @@ -215,9 +220,9 @@ void KRFBLogin::gotAuthResult() long result; con->read( &result, AuthResultLength ); result = Swap32IfLE( result ); - qWarning( "Authentication Result is 0x%08lx", result ); + owarn << "Authentication Result is 0x" << result << "" << oendl; static QString failed = tr( "Error: The password you specified was incorrect." ); static QString tooMany = tr( "Error: Too many invalid login attempts have been made\n" "to this account, please try later." ); @@ -231,23 +236,23 @@ void KRFBLogin::gotAuthResult() emit status( statusMsgOk ); con->gotRFBConnection(); break; case AuthFailed: - qWarning( "Dammit" ); + owarn << "Dammit" << oendl; emit status( statusMsgFailed ); emit error( failed ); break; case AuthTooMany: emit status( statusMsgTooMany ); emit error( tooMany ); break; default: - qWarning( "Invalid authentication result, %lx", result ); + owarn << "Invalid authentication result, " << result << "" << oendl; break; } } void KRFBLogin::sendClientVersion() { - qWarning( "Sending client version" ); + owarn << "Sending client version" << oendl; con->write( (void*)"RFB 003.003\n", ClientVersionLength ); } diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp index ef2fa12..149c398 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp +++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp @@ -1,9 +1,15 @@ +#include "kvncbookmarkdlg.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/global.h> +using namespace Opie::Core; + +/* QT */ #include <qdir.h> #include <qtextstream.h> #include <qlistbox.h> -#include <qpe/global.h> -#include "kvncbookmarkdlg.h" KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent, const char * name, WFlags f ) : KVNCBookmarkDlgBase( parent, name,f) @@ -174,9 +180,9 @@ void KVNCBookmarkDlg::writeBookmarks(void) int n = 1; KRFBServer *server; for ( server=servers.first(); server != 0; server=servers.next() ) { - qDebug(server->name); + odebug << server->name << oendl; t << "server=" << server->name << '\n'; t << "\thostname=" << server->hostname << '\n'; t << "\tpassword=" << encipher(server->password )<< '\n'; t << "\tdisplay=" << server->display << '\n'; diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp index 51020a0..bdb1c78 100644 --- a/noncore/games/backgammon/backgammon.cpp +++ b/noncore/games/backgammon/backgammon.cpp @@ -1,20 +1,24 @@ #include "backgammon.h" - #include "aidialog.h" #include "filedialog.h" #include "playerdialog.h" #include "rulesdialog.h" #include "themedialog.h" +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> +#include <qpe/config.h> +#include <qpe/resource.h> +using namespace Opie::Core; + +/* QT */ #include <qfile.h> #include <qlayout.h> #include <qmessagebox.h> #include <qtimer.h> -#include <qpe/qpeapplication.h> -#include <qpe/config.h> #include <qmenubar.h> -#include <qpe/resource.h> #include <stdlib.h> @@ -32,9 +36,9 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) //load the default theme Config conf("backgammon"); if(!conf.isValid()) { - qDebug("config file does not exist"); + odebug << "config file does not exist" << oendl; conf.setGroup("general"); conf.writeEntry("theme","default"); conf.setGroup("rules"); conf.writeEntry("move_with_pieces_out",false); @@ -77,9 +81,9 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) //get the theme component names Config theme(theme_file,Config::File); if(!theme.isValid()) { - qDebug("theme file does not exist"); + odebug << "theme file does not exist" << oendl; theme.setGroup("theme"); theme.writeEntry("board","casino_board_1"); theme.writeEntry("pieces1","casino_pieces_blue"); theme.writeEntry("pieces2","casino_pieces_white"); diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index 7de7147..a4145cc 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp @@ -456,9 +456,9 @@ int MoveEngine::getPossibleMoves() } void MoveEngine::move(const int& from, int to, const int& dice) { - //qDebug("%d moves from %d to %d (%d) with dice %d",player,from,to,to-from,dice); + //odebug << "" << player << " moves from " << from << " to " << to << " (" << to-from << ") with dice " << dice << "" << oendl; if(player==1 && to==25) to=26; if(player==2 && to==0) diff --git a/noncore/games/bounce/bounce.pro b/noncore/games/bounce/bounce.pro index ba745c8..56a325c 100644 --- a/noncore/games/bounce/bounce.pro +++ b/noncore/games/bounce/bounce.pro @@ -1,5 +1,4 @@ -#CONFIG = qt warn_on CONFIG = qt warn_on quick-app HEADERS = game.h kbounce.h SOURCES = game.cpp kbounce.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include diff --git a/noncore/games/bounce/game.cpp b/noncore/games/bounce/game.cpp index 1f1f8cd..bbd3d0b 100644 --- a/noncore/games/bounce/game.cpp +++ b/noncore/games/bounce/game.cpp @@ -16,13 +16,20 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <stdlib.h> -#include <qtimer.h> +#include "game.h" + +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; -#include "game.h" +/* QT */ +#include <qtimer.h> + +/* STD */ +#include <stdlib.h> #define TILE_SIZE 9 #define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2)) @@ -366,9 +373,9 @@ JezzGame::~JezzGame() } void JezzGame::display( QString text, int size ) { - qDebug("This function \"display\" shouldn't be called!!!"); + odebug << "This function \"display\" shouldn't be called!!!" << oendl; if ( !text.isEmpty() ) { QFont font( "Helvetica", size, QFont::Bold ); font.setStyleHint( QFont::Helvetica ); diff --git a/noncore/games/go/go.pro b/noncore/games/go/go.pro index b73bbb0..72425a5 100644 --- a/noncore/games/go/go.pro +++ b/noncore/games/go/go.pro @@ -14,6 +14,5 @@ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 TARGET = go - include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp index d134540..ec03c1d 100644 --- a/noncore/games/go/gowidget.cpp +++ b/noncore/games/go/gowidget.cpp @@ -19,21 +19,22 @@ **********************************************************************/ #include "gowidget.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ #include <qpainter.h> #include <qtoolbar.h> #include <qmenubar.h> #include <qaction.h> #include <qapplication.h> //processEvents() #include <qlabel.h> -//#include <stdio.h> - - static const enum bVal computer_color = BLACK; static int current_handicap = 1; @@ -447,9 +448,9 @@ void placestone (enum bVal c, short x, short y ) } void intrMoveReport(enum bVal c ,char *coord ,char *reason ) { - qDebug( "intrMoveReport colour %d, %s %s", c, coord, reason ); + odebug << "intrMoveReport colour " << c << ", " << coord << " " << reason << "" << oendl; } void intrPrisonerReport( short blackcnt, short whitecnt ) { diff --git a/noncore/games/kpacman/kpacman.pro b/noncore/games/kpacman/kpacman.pro index 8453f78..45314f9 100644 --- a/noncore/games/kpacman/kpacman.pro +++ b/noncore/games/kpacman/kpacman.pro @@ -1,8 +1,6 @@ TEMPLATE = app -#CONFIG = qt warn_on CONFIG = qt warn_on -#TMAKE_CXXFLAGS += HEADERS = kpacmanwidget.h \ referee.h \ status.h \ painter.h \ @@ -33,9 +31,9 @@ SOURCES = kpacmanwidget.cpp \ kpacman.cpp \ main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 DESTDIR = $(OPIEDIR)/bin TARGET = kpacman include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/kpacman/kpacmanwidget.cpp b/noncore/games/kpacman/kpacmanwidget.cpp index 9631495..b59dd02 100644 --- a/noncore/games/kpacman/kpacmanwidget.cpp +++ b/noncore/games/kpacman/kpacmanwidget.cpp @@ -12,9 +12,10 @@ #include <qpe/config.h> #include "kpacmanwidget.h" #endif - +#include <opie2/odebug.h> +using namespace Opie::Core; KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name) : QWidget( parent, name ) { @@ -138,9 +139,9 @@ void KpacmanWidget::setScheme(int Scheme, int Mode) } void KpacmanWidget::resizeEvent( QResizeEvent * ) { - qWarning("Resize"); + owarn << "Resize" << oendl; referee->setGeometry(0, bitfont->height()*3, referee->width(), referee->height()); referee->setBackgroundColor(BLACK); if(!status ) return; diff --git a/noncore/games/kpacman/status.cpp b/noncore/games/kpacman/status.cpp index 02ff63d..db6938e 100644 --- a/noncore/games/kpacman/status.cpp +++ b/noncore/games/kpacman/status.cpp @@ -12,16 +12,19 @@ #include <qpe/config.h> #include "status.h" #endif +#include <opie2/odebug.h> +using namespace Opie::Core; + #include <qbitmap.h> #include <qmsgbox.h> #include <qfileinfo.h> Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) : QWidget( parent, name ) { - qWarning("Status::Status"); + owarn << "Status::Status" << oendl; actualLifes = 0; actualLevel = 0; lifesPix = NULL; diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp index 2b924c6..1f554d2 100644 --- a/noncore/games/mindbreaker/mindbreaker.cpp +++ b/noncore/games/mindbreaker/mindbreaker.cpp @@ -89,9 +89,9 @@ static void setupBoardSize(int w, int h) adjusted_board_height = adjusted_title_height + (adjusted_panel_height * 9); adjusted_board_width = adjusted_panel_width + (adjusted_bin_margin * 2) + adjusted_peg_size; -// qDebug("Adjusted width %d height %d", adjusted_board_width, adjusted_board_height); +// odebug << "Adjusted width " << adjusted_board_width << " height " << adjusted_board_height << "" << oendl; } /* helper class, */ diff --git a/noncore/games/oyatzee/oyatzee.cpp b/noncore/games/oyatzee/oyatzee.cpp index a55aa73..27c0a9f 100644 --- a/noncore/games/oyatzee/oyatzee.cpp +++ b/noncore/games/oyatzee/oyatzee.cpp @@ -1,11 +1,17 @@ #include "oyatzee.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qmessagebox.h> #include <qpushbutton.h> #include <qpainter.h> #include <qlayout.h> +/* STD */ #include <stdlib.h> OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( parent , name , fl ) { @@ -40,9 +46,9 @@ OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( } void OYatzee::slotEndRound( int item ) { - qDebug( "Der User hat Nummer %d ausgewählt" , item ); + odebug << "Der User hat Nummer " << item << " ausgewählt" << oendl; /* * if the user clicked on Total, Bonus or Score and thus not on a * selectable item return and do nothing @@ -108,9 +114,9 @@ void OYatzee::slotEndRound( int item ) sb->nextRB(currentPlayer-1)->updateMap( item , points ); nextPlayer(); - qDebug( "Punkte: %d" , points ); + odebug << "Punkte: " << points << "" << oendl; } void OYatzee::nextPlayer() { @@ -155,9 +161,9 @@ OYatzee::~OYatzee() void OYatzee::detectPosibilities() { posibilities.clear(); - qDebug( "running detectPosibilities()" ); + odebug << "running detectPosibilities()" << oendl; Dice *d = dw->diceList.first(); QValueListInt numbers; @@ -260,49 +266,49 @@ void OYatzee::detectPosibilities() void OYatzee::displayPossibilites() { //X for ( QValueListInt::Iterator it = posibilities.begin() ; it != posibilities.end(); ++it ) //X { -//X qDebug( QString::number( *it ) ); +//X odebug << QString::number( *it ) << oendl; //X switch ( *it ) //X { //X case Ones: -//X qDebug( "1er" ); +//X odebug << "1er" << oendl; //X break; //X case Twos: -//X qDebug( "2er" ); +//X odebug << "2er" << oendl; //X break; //X case Threes: -//X qDebug( "3er" ); +//X odebug << "3er" << oendl; //X break; //X case Fours: -//X qDebug( "4er" ); +//X odebug << "4er" << oendl; //X break; //X case Fives: -//X qDebug( "5er" ); +//X odebug << "5er" << oendl; //X break; //X case Sixes: -//X qDebug( "6er" ); +//X odebug << "6er" << oendl; //X break; //X case ThreeOfAKind: -//X qDebug( "3oaK" ); +//X odebug << "3oaK" << oendl; //X break; //X case FourOfAKind: -//X qDebug( "4oaK" ); +//X odebug << "4oaK" << oendl; //X break; //X case FullHouse: -//X qDebug( "Full House" ); +//X odebug << "Full House" << oendl; //X break; //X case SStraight: -//X qDebug( "Short S" ); +//X odebug << "Short S" << oendl; //X break; //X case LStraight: -//X qDebug( "Long S" ); +//X odebug << "Long S" << oendl; //X break; //X case Yatzee: -//X qDebug( "Yatzee!" ); +//X odebug << "Yatzee!" << oendl; //X break; //X case Chance: -//X qDebug( "Chance" ); +//X odebug << "Chance" << oendl; //X break; //X } //X } @@ -334,9 +340,9 @@ void OYatzee::slotStartGame() } void OYatzee::slotRollDices() { - qDebug( "Roll nummer: %d" , ps.at( currentPlayer-1 )->turn ); + odebug << "Roll nummer: " << ps.at( currentPlayer-1 )->turn << "" << oendl; if ( ps.at( currentPlayer-1 )->turn == 3 ) { QMessageBox::information( this, @@ -352,11 +358,11 @@ void OYatzee::slotRollDices() if ( !d->isSelected ) d->roll(); } -// qDebug( "Roll nummer (vorher): %d" , ps.at( currentPlayer-1 )->turn ); +// odebug << "Roll nummer (vorher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; ps.at(currentPlayer-1)->turn++; -// qDebug( "Roll nummer (nachher): %d" , ps.at( currentPlayer-1 )->turn ); +// odebug << "Roll nummer (nachher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; detectPosibilities(); } @@ -390,9 +396,9 @@ Resultboard* Scoreboard::nextRB( int currentPlayer ) Resultboard *b; b = rbList.at( currentPlayer ); - qDebug( "Anzahl: %d" , rbList.count() ); + odebug << "Anzahl: " << rbList.count() << "" << oendl; return b; } @@ -607,9 +613,9 @@ void Resultboard::paintEvent( QPaintEvent* ) pointMap::Iterator it = pMap.begin(); for ( ; it != pMap.end() ; ++it ) { int i = it.key(); - qDebug( "ok: %d , %d" , i , it.data() ); + odebug << "ok: " << i << " , " << it.data() << "" << oendl; p.drawText( 0, i*cell_height , cell_width , cell_height , Qt::AlignCenter , QString::number( it.data() ) ); } p.drawText( 0,0,cell_width,cell_height, Qt::AlignCenter , pName ); //Playername diff --git a/noncore/games/oyatzee/oyatzee.pro b/noncore/games/oyatzee/oyatzee.pro index 754abd2..f505c66 100644 --- a/noncore/games/oyatzee/oyatzee.pro +++ b/noncore/games/oyatzee/oyatzee.pro @@ -5,7 +5,7 @@ HEADERS = oyatzee.h SOURCES = main.cpp oyatzee.cpp TARGET = oyatzee INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp index a80bd35..47d6725 100644 --- a/noncore/games/wordgame/wordgame.cpp +++ b/noncore/games/wordgame/wordgame.cpp @@ -674,9 +674,9 @@ void ComputerPlayer::noteChoice(const Tile** tiles, int n, const QPoint& d, cons if (s>0 || current==QPoint(5,1)){ QString st; for ( int i=0; i<n; i++ ) st += tiles[i]->text(); -qDebug("%d,%d: %s (%d) for %d",current.x(),current.y(),st.latin1(),n,s); +odebug << "" << current.x() << "," << current.y() << ": " << st.latin1() << " (" << n << ") for " << s << "" << oendl; } */ if ( s > best_score ) { int i; diff --git a/noncore/graphics/opie-eye/config.in b/noncore/graphics/opie-eye/config.in index 996dcf3..d7f9963 100644 --- a/noncore/graphics/opie-eye/config.in +++ b/noncore/graphics/opie-eye/config.in @@ -1,9 +1,9 @@ config OPIE_EYE boolean "opie-eye The Image Viewer and Browser" default "y" - depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI + depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI config OPIE_EYE_SLAVE boolean default "y" if OPIE_EYE - depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI + depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp index 79f4510..5599ad1 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp @@ -2,17 +2,21 @@ * GPLv2 * zecke@handhelds.org */ +#include "dir_ifaceinfo.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +using namespace Opie::Core; + +/* QT */ #include <qwidget.h> #include <qcheckbox.h> #include <qhbox.h> #include <qlabel.h> -#include <qpe/config.h> - -#include "dir_ifaceinfo.h" - namespace { class DirImageWidget : public QHBox { public: DirImageWidget() { @@ -40,8 +44,8 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) { return wid; } void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) { - qWarning( "Write Config" ); + owarn << "Write Config" << oendl; DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); cfg.writeEntry("Dir_Check_All_Files", wid->chkbox->isChecked() ); } diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp index ffea29e..0a5cff4 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp @@ -5,21 +5,23 @@ #include "dir_lister.h" #include <lib/slavemaster.h> - +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qdir.h> #include <qfileinfo.h> - Dir_DirLister::Dir_DirLister( bool list ) : PDirLister( "dir_dir_lister" ) { m_allFiles = list; - qWarning("All Files %d", m_allFiles ); + owarn << "All Files " << m_allFiles << "" << oendl; SlaveMaster* master = SlaveMaster::self(); connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) ); diff --git a/noncore/graphics/opie-eye/lib/slavemaster.cpp b/noncore/graphics/opie-eye/lib/slavemaster.cpp index 4e28535..5bb7ab8 100644 --- a/noncore/graphics/opie-eye/lib/slavemaster.cpp +++ b/noncore/graphics/opie-eye/lib/slavemaster.cpp @@ -1,9 +1,13 @@ #include "slavemaster.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie::Core; +/* QT */ #include <qcopchannel_qws.h> #include <qtimer.h> QDataStream & operator << (QDataStream & str, bool b) @@ -22,9 +26,9 @@ QDataStream & operator >> (QDataStream & str, bool & b) /* * ! We don't put a Pixmap in!!!! */ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { - qWarning( "Image request is %s %d %d", inf.file.latin1(), inf.width, inf.height ); + owarn << "Image request is " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl; return s << inf.file << inf.width << inf.height; } QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { s >> inf.file >> inf.pixmap >> inf.width >> inf.height; @@ -77,12 +81,12 @@ void SlaveMaster::imageInfo( const QString& str ) { } void SlaveMaster::thumbNail( const QString& str, int w, int h ) { if ( str.isEmpty() ) { - qWarning( "Asking for empty nail" ); + owarn << "Asking for empty nail" << oendl; return; } - qWarning( "Asking for thumbNail in size %d %d" + str, w,h ); + owarn << "Asking for thumbNail in size " << w << " " << h << "" + str << oendl; PixmapInfo item; item.file = str; item.width = w; item.height = h; item.pixmap = QPixmap(); m_inThumbNail.append( item ); @@ -104,9 +108,9 @@ void SlaveMaster::recieve( const QCString& str, const QByteArray& at) { stream >> pixinfos; else if ( str == "pixmapsHandled(StringList)" ) stream >> infos; - qWarning( "PixInfos %d", pixinfos.count() ); + owarn << "PixInfos " << pixinfos.count() << "" << oendl; bool got_data = ( !infos.isEmpty() || !pixinfos.isEmpty() ); if ( got_data ) { emit sig_start(); diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro index 17fa22c..0e2202a 100644 --- a/noncore/graphics/opie-eye/phunk_view.pro +++ b/noncore/graphics/opie-eye/phunk_view.pro @@ -30,7 +30,7 @@ INCLUDEPATH += . $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopieui2 +LIBS += -lqpe -lopiecore2 -lopieui2 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp index 086b47f..fb7d5de 100644 --- a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp +++ b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp @@ -1,11 +1,15 @@ #include "jpeg_slave.h" - #include "thumbnailtool.h" PHUNK_VIEW_INTERFACE( "JPEG", JpegSlave ) -#include <qtopia/timestring.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/timestring.h> +using namespace Opie::Core; + +/* QT */ #include <qobject.h> #include <qimage.h> /** @@ -118,9 +122,9 @@ public: class FatalError { const char* ex; public: FatalError(const char* s) { ex = s; } - void debug_print() const { qWarning("exception: %s", ex ); } + void debug_print() const { owarn << "exception: " << ex << "" << oendl; } }; @@ -261,9 +265,9 @@ int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode) if (marker != 0xff) break; if (a >= 6){ - qWarning( "too many padding bytes" ); + owarn << "too many padding bytes" << oendl; return false; } } @@ -326,9 +330,9 @@ int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode) } return true; case M_EOI: // in case it's a tables-only JPEG stream - qWarning( "No image in jpeg!" ); + owarn << "No image in jpeg!" << oendl; return false; case M_COM: // Comment section // pieczy 2002-02-12 @@ -725,9 +729,9 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa if (SubdirStart < OffsetBase+ExifLength+20){ // Jhead 1.3 or earlier would crop the whole directory! // As Jhead produces this form of format incorrectness, // I'll just let it pass silently - qWarning( "Thumbnail removed with Jhead 1.3 or earlier" ); + owarn << "Thumbnail removed with Jhead 1.3 or earlier" << oendl; }else{ return; } }else{ @@ -912,9 +916,9 @@ bool ExifData::scan(const QString & path) // Scan the JPEG headers. ret = ReadJpegSections(f, READ_EXIF); if (ret == false){ - qWarning( "Not JPEG file!" ); + owarn << "Not JPEG file!" << oendl; DiscardData(); f.close(); return false; } diff --git a/noncore/graphics/opie-eye/slave/main.cpp b/noncore/graphics/opie-eye/slave/main.cpp index 37020e6..5b90483 100644 --- a/noncore/graphics/opie-eye/slave/main.cpp +++ b/noncore/graphics/opie-eye/slave/main.cpp @@ -30,28 +30,28 @@ int main( int argc, char* argv[] ) { int main( int argc, char* argv[] ) { QString str = QString::fromLatin1(argv[2] ); QApplication app( argc, argv ); GifSlave slave; - qWarning( str +" "+slave.iconViewName(str ) ); - qWarning( str+" "+slave.fullImageInfo( str ) ); + owarn << str +" "+slave.iconViewName(str ) << oendl; + owarn << str+" "+slave.fullImageInfo( str ) << oendl; PNGSlave pngslave; - qWarning( str + " " + pngslave.iconViewName(str) ); - qWarning( str + " " + pngslave.fullImageInfo(str)); + owarn << str + " " + pngslave.iconViewName(str) << oendl; + owarn << str + " " + pngslave.fullImageInfo(str) << oendl; JpegSlave jpgslave; - qWarning( str + " " + jpgslave.iconViewName(str ) ); - qWarning( str + " " + jpgslave.fullImageInfo( str ) ); + owarn << str + " " + jpgslave.iconViewName(str ) << oendl; + owarn << str + " " + jpgslave.fullImageInfo( str ) << oendl; //return app.exec(); QPixmap pix = ThumbNailTool::getThumb( str, 24, 24 ); if ( pix.isNull() ) { - qWarning( "No Thumbnail" ); + owarn << "No Thumbnail" << oendl; pix = slave.pixmap(str, 24, 24); } if (!pix.isNull() ) { - qWarning( "Saving Thumbnail" ); + owarn << "Saving Thumbnail" << oendl; ThumbNailTool::putThumb( str, pix, 24, 24 ); } } diff --git a/noncore/graphics/opie-eye/slave/slave.pro b/noncore/graphics/opie-eye/slave/slave.pro index 3f42495..903d667 100644 --- a/noncore/graphics/opie-eye/slave/slave.pro +++ b/noncore/graphics/opie-eye/slave/slave.pro @@ -1,5 +1,5 @@ -CONFIG += qte +CONFIG = qt TEMPLATE = app TARGET = opie-eye_slave DESTDIR = $(OPIEDIR)/bin @@ -12,7 +12,7 @@ SOURCES = main.cpp gif_slave.cpp slavereciever.cpp \ INCLUDEPATH += $(OPIEDIR)/include ../ DEPENDSPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 include ( $(OPIEDIR)/include.pro )
\ No newline at end of file diff --git a/noncore/graphics/opie-eye/slave/slavereciever.cpp b/noncore/graphics/opie-eye/slave/slavereciever.cpp index bbbbb30..82b3d23 100644 --- a/noncore/graphics/opie-eye/slave/slavereciever.cpp +++ b/noncore/graphics/opie-eye/slave/slavereciever.cpp @@ -4,11 +4,15 @@ #include "slavereciever.h" #include "slaveiface.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qtimer.h> static SlaveObjects* _slaveObj = 0; @@ -36,9 +40,9 @@ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { * GUI sends no QPIxmap!!! */ QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { s >> inf.file >> inf.width >> inf.height; - qWarning( "Recieved %s %d %d", inf.file.latin1(), inf.width, inf.height ); + owarn << "Recieved " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl; return s; } QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { return s << i.kind << i.file << i.info; @@ -81,9 +85,9 @@ SlaveReciever::SlaveReciever( QObject* par) SlaveReciever::~SlaveReciever() { } void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) { - qWarning( "String is %s", string.data() ); + owarn << "String is " << string.data() << "" << oendl; QDataStream stream(ar, IO_ReadOnly ); QStringList lst; static ImageInfo inf; static PixmapInfo pix; @@ -93,9 +97,9 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) m_inList.append(inf); }else if ( string == "thumbInfos(QStringList)" ) { stream >> lst; for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - qWarning( "Adding thumbinfo for file "+ *it ); + owarn << "Adding thumbinfo for file "+ *it << oendl; inf.file = (*it); m_inList.append(inf); } }else if ( string == "fullInfo(QString)" ) { @@ -104,9 +108,9 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) m_inList.append(inf); }else if ( string == "fullInfos(QStringList)" ) { stream >> lst; for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - qWarning( "Adding fullInfo for"+ *it ); + owarn << "Adding fullInfo for"+ *it << oendl; inf.file = (*it); inf.kind = true; m_inList.append(inf); } @@ -116,9 +120,9 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) }else if ( string == "pixmapInfos(PixmapInfos)" ) { PixmapList list; stream >> list; for(PixmapList::Iterator it = list.begin(); it != list.end(); ++it ) { - qWarning( "Got %d %d " + (*it).file, (*it).width , (*it).height ); + owarn << "Got " << (*it).width << " " << (*it).height << " " + (*it).file << oendl; m_inPix.append(*it); } }else if ( string == "refUp()" ) { m_refs++; @@ -180,9 +184,9 @@ void SlaveReciever::slotThumbNail() { for(it = map->begin(); it != map->end(); ++it ) { SlaveInterface* iface = it.data(); if( iface->supports(inf.file ) ) { /* pixmap */ - qWarning( "Asking for thumbNail in size %d %d for "+inf.file, inf.width, inf.height ); + owarn << "Asking for thumbNail in size " << inf.width << " " << inf.height << " for "+inf.file << oendl; inf.pixmap = iface->pixmap(inf.file, 64, 64); m_outPix.append( inf ); break; } @@ -199,25 +203,25 @@ void SlaveReciever::slotThumbNail() { void SlaveReciever::slotSend() { m_out->stop(); - qWarning( "Sending %d %d", outPix().count(), outInf().count() ); + owarn << "Sending " << outPix().count() << " " << outInf().count() << "" << oendl; /* queue it and send */ /* if this ever gets a service introduce request queues * so we can differinatate between different clients */ if (! m_outPix.isEmpty() ) { QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(PixmapList)" ); answer << outPix(); for ( PixmapList::Iterator it = m_outPix.begin();it!=m_outPix.end();++it ) { - qWarning( "Sending out %s %d %d", (*it).file.latin1(), (*it).width, (*it).height ); + owarn << "Sending out " << (*it).file.latin1() << " " << (*it).width << " " << (*it).height << "" << oendl; } } if ( !m_outList.isEmpty() ) { QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(StringList)" ); answer << outInf(); for ( StringList::Iterator it = m_outList.begin();it!=m_outList.end();++it ) { - qWarning( "Sending out2 " + (*it).file ); + owarn << "Sending out2 " + (*it).file << oendl; } } m_outList.clear(); diff --git a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp index a202457..d2e169c 100644 --- a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp +++ b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp @@ -1,6 +1,11 @@ #include "thumbnailtool.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qfileinfo.h> #include <qdir.h> #include <qimage.h> #include <qpixmap.h> @@ -25,24 +30,24 @@ static bool makeThumbDir( const QFileInfo& inf, bool make = false) { * check for a png in /foo/bar/.opie-eye/%dx%d-imagefoo.gif */ QPixmap ThumbNailTool::getThumb( const QString& path, int width, int height ) { QFileInfo inf( path ); - qWarning( "Get Thumb" ); + owarn << "Get Thumb" << oendl; if ( !makeThumbDir( inf ) ) { QPixmap pix; return pix; } QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); - qWarning( inf.dirPath()+str ); + owarn << inf.dirPath()+str << oendl; return QPixmap( inf.dirPath()+str,"PNG" ); } void ThumbNailTool::putThumb( const QString& path, const QPixmap& pix, int width, int height ) { QFileInfo inf( path ); makeThumbDir( inf, true ); QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); - qWarning( inf.dirPath()+str ); + owarn << inf.dirPath()+str << oendl; pix.save( inf.dirPath()+str, "PNG" ); } diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 28a42eb..36def67 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -132,9 +132,9 @@ void AudioWidget::sliderReleased() { mediaPlayerState.setPosition( val ); } void AudioWidget::setPosition( long i ) { - // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); + // odebug << "<<<<<<<<<<<<<<<<<<<<<<<<set position " << i << "" << oendl; updateSlider( i, mediaPlayerState.length() ); } @@ -186,9 +186,9 @@ void AudioWidget::loadSkin() void AudioWidget::setSeekable( bool isSeekable ) { if ( !isSeekable ) { - qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); + odebug << "<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>" << oendl; if( !slider.isHidden()) { slider.hide(); } disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); @@ -198,9 +198,9 @@ void AudioWidget::setSeekable( bool isSeekable ) { } else { // this stops the slider from being moved, thus // does not stop stream when it reaches the end slider.show(); - qDebug( " CONNECT SET POSTION " ); + odebug << " CONNECT SET POSTION " << oendl; connect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); connect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); @@ -270,9 +270,9 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) { case Key_Home: break; case Key_F9: //activity hide(); - // qDebug("Audio F9"); + // odebug << "Audio F9" << oendl; e->accept(); break; case Key_F10: //contacts break; diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index a42b8e5..5c24dbe 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp @@ -105,12 +105,12 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) } void Lib::run() { - qDebug( "Lib::run() started" ); + odebug << "Lib::run() started" << oendl; initialize(); m_initialized = true; - qDebug( "Lib::run() finished" ); + odebug << "Lib::run() finished" << oendl; } void Lib::initialize() { @@ -214,9 +214,9 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) { void Lib::stop() { assert( m_initialized ); - qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); + odebug << "<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>" << oendl; xine_stop( m_stream ); } void Lib::pause( bool toggle ) { @@ -326,11 +326,11 @@ void Lib::ensureInitialized() { if ( m_initialized ) return; - qDebug( "waiting for initialization thread to finish" ); + odebug << "waiting for initialization thread to finish" << oendl; wait(); - qDebug( "initialization thread finished!" ); + odebug << "initialization thread finished!" << oendl; } void Lib::setWidget( XineVideoWidget *widget ) { @@ -421,9 +421,9 @@ void Lib::xine_display_frame( void* user_data, uint8_t *frame, void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) { assert( m_initialized ); if ( !m_video ) { - qWarning("not showing video now"); + owarn << "not showing video now" << oendl; return; } assert( m_wid ); diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index a236775..7e38fc7 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -151,9 +151,9 @@ void MediaPlayer::next() { } else { mediaPlayerState.setList(); } } else { //if playing from file list, let's just stop - qDebug("<<<<<<<<<<<<<<<<<stop for filelists"); + odebug << "<<<<<<<<<<<<<<<<<stop for filelists" << oendl; mediaPlayerState.setPlaying(false); mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection ); if(l) mediaPlayerState.setLooping(l); if(r) mediaPlayerState.setShuffled(r); @@ -284,9 +284,9 @@ void MediaPlayer::blank( bool b ) { fl= open( "/dev/fl", O_RDWR ); #endif if (fd != -1) { if ( b ) { - qDebug("do blanking"); + odebug << "do blanking" << oendl; #ifdef QT_QWS_SL5XXX ioctl( fd, FBIOBLANK, 1 ); if(fl !=-1) { ioctl( fl, 2 ); @@ -296,9 +296,9 @@ void MediaPlayer::blank( bool b ) { ioctl( fd, FBIOBLANK, 3 ); #endif isBlanked = TRUE; } else { - qDebug("do unblanking"); + odebug << "do unblanking" << oendl; ioctl( fd, FBIOBLANK, 0); #ifdef QT_QWS_SL5XXX if(fl != -1) { ioctl( fl, 1); @@ -308,9 +308,9 @@ void MediaPlayer::blank( bool b ) { isBlanked = FALSE; } close( fd ); } else { - qDebug("<< /dev/fb0 could not be opened >>"); + odebug << "<< /dev/fb0 could not be opened >>" << oendl; } } void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { @@ -324,13 +324,13 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { break; case Key_F11: //menu break; case Key_F12: //home - qDebug("Blank here"); + odebug << "Blank here" << oendl; // mediaPlayerState->toggleBlank(); break; case Key_F13: //mail - qDebug("Blank here"); + odebug << "Blank here" << oendl; // mediaPlayerState->toggleBlank(); break; } } diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp index 26d5e15..95dbab5 100644 --- a/noncore/multimedia/opieplayer2/om3u.cpp +++ b/noncore/multimedia/opieplayer2/om3u.cpp @@ -36,32 +36,32 @@ //extern PlayListWidget *playList; Om3u::Om3u( const QString &filePath, int mode) : QStringList (){ -qDebug("<<<<<<<new m3u "+filePath); +odebug << "<<<<<<<new m3u "+filePath << oendl; f.setName(filePath); f.open(mode); } Om3u::~Om3u(){} void Om3u::readM3u() { -// qDebug("<<<<<<reading m3u "+f.name()); +// odebug << "<<<<<<reading m3u "+f.name() << oendl; QTextStream t(&f); t.setEncoding(QTextStream::UnicodeUTF8); QString s; while ( !t.atEnd() ) { s=t.readLine(); -// qDebug(s); +// odebug << s << oendl; if( s.find( "#", 0, TRUE) == -1 ) { if( s.left(2) == "E:" || s.left(2) == "P:" ) { s = s.right( s.length() -2 ); QFileInfo f( s ); QString name = f.baseName(); name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 ); s=s.replace( QRegExp( "\\" ), "/" ); append(s); -// qDebug(s); +// odebug << s << oendl; } else { // is url QString name; name = s; append(name); @@ -79,9 +79,9 @@ void Om3u::readPls() { //it's a pls file if( s.left(4) == "File" ) { s = s.right( s.length() - s.find("=",0,true)-1 ); s = s.stripWhiteSpace(); s.replace( QRegExp( "%20" )," "); -// qDebug( "adding " + s + " to playlist" ); +// odebug << "adding " + s + " to playlist" << oendl; // numberofentries=2 // File1=http // Title // Length @@ -113,9 +113,9 @@ void Om3u::write() { //writes list to m3u file QTextStream t(&f); t.setEncoding(QTextStream::UnicodeUTF8); if(count()>0) { for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { -// qDebug(*it); +// odebug << *it << oendl; t << *it << "\n"; } } // f.close(); @@ -129,9 +129,9 @@ void Om3u::remove(const QString &filePath) { //removes from m3u list QString list, currentFile; if(count()>0) { for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { currentFile=*it; - // qDebug(*it); + // odebug << *it << oendl; if( filePath != currentFile) list += currentFile+"\n"; } diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp index 015896f..3499837 100644 --- a/noncore/multimedia/opieplayer2/playlistselection.cpp +++ b/noncore/multimedia/opieplayer2/playlistselection.cpp @@ -43,9 +43,9 @@ private: PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) : QListView( parent, name ) { -// qDebug("starting playlistselector"); +// odebug << "starting playlistselector" << oendl; // #ifdef USE_PLAYLIST_BACKGROUND // setStaticBackground( TRUE ); // setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) ); @@ -64,9 +64,9 @@ PlayListSelection::~PlayListSelection() { // #ifdef USE_PLAYLIST_BACKGROUND void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { -// qDebug("drawBackground"); +// odebug << "drawBackground" << oendl; p->fillRect( r, QBrush( white ) ); // QImage logo = Resource::loadImage( "launcher/opielogo" ); // if ( !logo.isNull() ) // p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); @@ -183,20 +183,20 @@ void PlayListSelection::writeCurrent( Config& cfg ) { cfg.setGroup("PlayList"); QListViewItem *item = selectedItem(); if ( item ) cfg.writeEntry("current", item->text(0) ); - qDebug(item->text(0)); + odebug << item->text(0) << oendl; } void PlayListSelection::setSelectedItem(const QString &strk ) { unSelect(); QListViewItemIterator it( this ); for ( ; it.current(); ++it ) { -// qDebug( it.current()->text(0)); +// odebug << it.current()->text(0) << oendl; if( strk == it.current()->text(0)) { -// qDebug( "We have a match "+strk); +// odebug << "We have a match "+strk << oendl; setSelected( it.current(), TRUE); ensureItemVisible( it.current() ); return; } diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 4460833..956d206 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -181,13 +181,13 @@ void PlayListWidget::writeDefaultPlaylist() { QString filename=QPEApplication::documentDir() + "/default.m3u"; QString currentString = config.readEntry( "CurrentPlaylist", filename); if( currentString == filename) { Om3u *m3uList; - // qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>"); + // odebug << "<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>" << oendl; if( d->selectedFiles->first() ) { m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); do { - // qDebug(d->selectedFiles->current()->file()); + // odebug << d->selectedFiles->current()->file() << oendl; m3uList->add( d->selectedFiles->current()->file() ); } while ( d->selectedFiles->next() ); @@ -324,9 +324,9 @@ void PlayListWidget::addAllVideoToList() { } void PlayListWidget::setDocument( const QString& fileref ) { - // qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref ); + // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl; fromSetDocument = TRUE; QFileInfo fileInfo(fileref); if ( !fileInfo.exists() ) { @@ -400,9 +400,9 @@ bool PlayListWidget::prev() { } bool PlayListWidget::next() { -//qDebug("<<<<<<<<<<<<next()"); +//odebug << "<<<<<<<<<<<<next()" << oendl; if ( mediaPlayerState->isShuffled() ) { return prev(); } else { if ( !d->selectedFiles->next() ) { @@ -611,9 +611,9 @@ void PlayListWidget::openURL() { fileDlg = new InputDialog(this,tr("Add URL"),TRUE, 0); fileDlg->exec(); if( fileDlg->result() == 1 ) { filename = fileDlg->text(); - qDebug( "Selected filename is " + filename ); + odebug << "Selected filename is " + filename << oendl; // Om3u *m3uList; DocLnk lnk; Config cfg( "OpiePlayer" ); cfg.setGroup("PlayList"); @@ -687,9 +687,9 @@ void PlayListWidget::openFile() { cfg.writeEntry( "LastDirectory" ,QFileInfo( str ).dirPath() ); if( !str.isEmpty() ) { - qDebug( "Selected filename is " + str ); + odebug << "Selected filename is " + str << oendl; filename = str; DocLnk lnk; if( filename.right( 3) == "m3u" || filename.right(3) == "pls" ) { @@ -705,9 +705,9 @@ void PlayListWidget::openFile() { } void PlayListWidget::readListFromFile( const QString &filename ) { - qDebug( "read list filename " + filename ); + odebug << "read list filename " + filename << oendl; QFileInfo fi(filename); Om3u *m3uList; QString s, name; m3uList = new Om3u( filename, IO_ReadOnly ); @@ -718,9 +718,9 @@ void PlayListWidget::readListFromFile( const QString &filename ) { DocLnk lnk; for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) { s = *it; - // qDebug(s); + // odebug << s << oendl; if(s.left(4)=="http") { lnk.setName( s ); //sets file name lnk.setIcon("opieplayer2/musicfile"); lnk.setFile( s ); //sets file name @@ -752,9 +752,9 @@ void PlayListWidget::readListFromFile( const QString &filename ) { } // writes current playlist to current m3u file */ void PlayListWidget::writeCurrentM3u() { - qDebug("writing to current m3u"); + odebug << "writing to current m3u" << oendl; Config cfg( "OpiePlayer" ); cfg.setGroup("PlayList"); QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default"); @@ -762,13 +762,13 @@ void PlayListWidget::readListFromFile( const QString &filename ) { m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); if( d->selectedFiles->first()) { do { - // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); + // odebug << "add writeCurrentM3u " +d->selectedFiles->current()->file() << oendl; m3uList->add( d->selectedFiles->current()->file() ); } while ( d->selectedFiles->next() ); - // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); + // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl; m3uList->write(); m3uList->close(); } delete m3uList; @@ -811,9 +811,9 @@ void PlayListWidget::writem3u() { if( !str.isEmpty() ) { name = str; // name = fileDlg->text(); -// qDebug( filename ); +// odebug << filename << oendl; if( name.find("/",0,true) != -1) {// assume they specify a file path filename = name; name = name.right(name.length()- name.findRev("/",-1,true) - 1 ); } @@ -829,9 +829,9 @@ void PlayListWidget::writem3u() { do { m3uList->add( d->selectedFiles->current()->file()); } while ( d->selectedFiles->next() ); - // qDebug( list ); + // odebug << list << oendl; m3uList->write(); m3uList->close(); delete m3uList; @@ -841,17 +841,17 @@ void PlayListWidget::writem3u() { lnk.setFile( filename); lnk.setIcon("opieplayer2/playlist2"); lnk.setName( name); //sets file name - // qDebug(filename); + // odebug << filename << oendl; Config config( "OpiePlayer" ); config.setGroup( "PlayList" ); config.writeEntry("CurrentPlaylist",filename); currentPlayList=filename; if(!lnk.writeLink()) { - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } setCaption(tr("OpiePlayer: ") + name); } @@ -883,9 +883,9 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) { case Key_R: //remove from playlist removeSelected(); break; // case Key_P: //play - // qDebug("Play"); + // odebug << "Play" << oendl; // playSelected(); // break; case Key_Space: // playSelected(); puh @@ -913,9 +913,9 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) { } } void PlayListWidget::pmViewActivated(int index) { -// qDebug("%d", index); +// odebug << "" << index << "" << oendl; switch(index) { case -16: { mediaPlayerState->toggleFullscreen(); @@ -943,9 +943,9 @@ void PlayListWidget::populateSkinsMenu() { QFileInfoListIterator it( *skinslist ); QFileInfo *fi; while ( ( fi = it.current() ) ) { skinName = fi->fileName(); -// qDebug( fi->fileName() ); +// odebug << fi->fileName() << oendl; if( skinName != "." && skinName != ".." && skinName !="CVS" ) { item = skinsMenu->insertItem( fi->fileName() ) ; } if( skinName == "default" ) { @@ -999,9 +999,9 @@ QString PlayListWidget::currentFileListPathName() const { } void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { - qDebug("qcop message "+msg ); + odebug << "qcop message "+msg << oendl; QDataStream stream ( data, IO_ReadOnly ); if ( msg == "play()" ) { //plays current selection btnPlay( true); } else if ( msg == "stop()" ) { diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 2ff190d..922f9d7 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp @@ -182,9 +182,9 @@ void PlayListWidgetGui::setView( char view ) { } void PlayListWidgetGui::setActiveWindow() { - // qDebug("SETTING active window"); + // odebug << "SETTING active window" << oendl; // When we get raised we need to ensure that it switches views MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate mediaPlayerState->setDisplayType( origDisplayType ); // now switch back diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index 7c38983..84f5f87 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp @@ -177,13 +177,13 @@ SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &file SkinData *data = m_cache.take( key ); if ( !data ) data = new SkinData; else - qDebug( "SkinCache: hit" ); + odebug << "SkinCache: hit" << oendl; QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath ); if ( bgPixmap ) { - qDebug( "SkinCache: hit on bgpixmap" ); + odebug << "SkinCache: hit on bgpixmap" << oendl; data->backgroundPixmap = *bgPixmap; } else data->backgroundPixmap = QPixmap(); @@ -217,34 +217,34 @@ SkinLoader::IncrementalLoader::IncrementalLoader( const Info &info ) SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadStep() { switch ( m_currentState ) { case LoadBackgroundPixmap: - qDebug( "load bgpixmap" ); + odebug << "load bgpixmap" << oendl; m_skin.backgroundPixmap(); m_currentState = LoadButtonUpImage; break; case LoadButtonUpImage: - qDebug( "load upimage" ); + odebug << "load upimage" << oendl; m_skin.buttonUpImage(); m_currentState = LoadButtonDownImage; break; case LoadButtonDownImage: - qDebug( "load downimage" ); + odebug << "load downimage" << oendl; m_skin.buttonDownImage(); m_currentState = LoadButtonMasks; m_currentButton = 0; break; case LoadButtonMasks: - qDebug( "load button masks %i", m_currentButton ); + odebug << "load button masks " << m_currentButton << "" << oendl; m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName ); m_currentButton++; if ( m_currentButton >= m_info.buttonCount ) m_currentState = LoadButtonMask; break; case LoadButtonMask: - qDebug( "load whole mask" ); + odebug << "load whole mask" << oendl; m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount ); return LoadingCompleted; } @@ -257,9 +257,9 @@ SkinLoader::SkinLoader() } SkinLoader::~SkinLoader() { - qDebug( "SkinLoader::~SkinLoader()" ); + odebug << "SkinLoader::~SkinLoader()" << oendl; killTimers(); delete m_currentLoader; } @@ -276,9 +276,9 @@ void SkinLoader::schedule( const QString &skinName, const MediaWidget::GUIInfo & void SkinLoader::start() { assert( m_timerId == -1 ); m_timerId = startTimer( 100 /* ms */ ); - qDebug( "SkinLoader::start() %d jobs", pendingSkins.count() ); + odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl; } void SkinLoader::timerEvent( QTimerEvent *ev ) { @@ -289,9 +289,9 @@ void SkinLoader::timerEvent( QTimerEvent *ev ) if ( !m_currentLoader ) { if ( pendingSkins.isEmpty() ) { - qDebug( "all jobs done" ); + odebug << "all jobs done" << oendl; killTimer( m_timerId ); m_timerId = -1; // ### qt3: use deleteLater(); QTimer::singleShot( 0, this, SLOT( deleteMe() ) ); @@ -301,17 +301,17 @@ void SkinLoader::timerEvent( QTimerEvent *ev ) Info nfo = *pendingSkins.begin(); pendingSkins.remove( pendingSkins.begin() ); m_currentLoader = new IncrementalLoader( nfo ); - qDebug( "new loader %i jobs left", pendingSkins.count() ); + odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl; } if ( m_currentLoader->loadStep() == IncrementalLoader::LoadingCompleted ) { delete m_currentLoader; m_currentLoader = 0; } - qDebug( "finished step" ); + odebug << "finished step" << oendl; } void SkinLoader::deleteMe() { diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp index fb951b4..d8b8abe 100644 --- a/noncore/multimedia/opieplayer2/threadutil.cpp +++ b/noncore/multimedia/opieplayer2/threadutil.cpp @@ -186,18 +186,18 @@ void Thread::start() { AutoLock lock( d->guard ); if ( d->isRunning ) { - qDebug( "ThreadUtil::Thread::start() called for running thread." ); + odebug << "ThreadUtil::Thread::start() called for running thread." << oendl; return; } pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM ); int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d ); if ( err != 0 ) { - qDebug( "ThreadUtil::Thread::start() : can't create thread: %s", strerror( err ) ); + odebug << "ThreadUtil::Thread::start() : can't create thread: " << strerror( err ) << "" << oendl; pthread_attr_destroy( &attributes ); return; } pthread_attr_destroy( &attributes ); @@ -283,9 +283,9 @@ ChannelMessage::~ChannelMessage() void ChannelMessage::reply() { if ( !m_isCall ) { - qDebug( "ChannelMessage::reply() - can't reply oneway message!" ); + odebug << "ChannelMessage::reply() - can't reply oneway message!" << oendl; return; } if ( m_inEventHandler ) diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 8f11b2e..94f99f8 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -92,9 +92,9 @@ void XineControl::play( const QString& fileName ) { hasVideoChannel = FALSE; hasAudioChannel = FALSE; m_fileName = fileName; - qDebug("<<FILENAME: " + fileName + ">>>>"); + odebug << "<<FILENAME: " + fileName + ">>>>" << oendl; if ( !libXine->play( fileName, 0, 0 ) ) { QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); // toggle stop so the the play button is reset @@ -105,14 +105,14 @@ void XineControl::play( const QString& fileName ) { MediaPlayerState::DisplayType displayType; if ( !libXine->hasVideo() ) { displayType = MediaPlayerState::Audio; - qDebug("HAS AUDIO"); + odebug << "HAS AUDIO" << oendl; libXine->setShowVideo( false ); hasAudioChannel = TRUE; } else { displayType = MediaPlayerState::Video; - qDebug("HAS VIDEO"); + odebug << "HAS VIDEO" << oendl; libXine->setShowVideo( true ); hasVideoChannel = TRUE; } // determine if slider is shown @@ -242,9 +242,9 @@ QString XineControl::getMetaInfo() { QString XineControl::getErrorCode() { int errorCode = libXine->error(); - qDebug( QString("ERRORCODE: %1 ").arg(errorCode) ); + odebug << QString("ERRORCODE: %1 ").arg(errorCode) << oendl; if ( errorCode == 1 ) { return tr( "No input plugin found for this media type" ); } else if ( errorCode == 2 ) { diff --git a/noncore/multimedia/opierec/device.cpp b/noncore/multimedia/opierec/device.cpp index ce49e96..5319d97 100644 --- a/noncore/multimedia/opierec/device.cpp +++ b/noncore/multimedia/opierec/device.cpp @@ -1,22 +1,22 @@ // device.cpp #include "device.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie::Core; - +/* STD */ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/soundcard.h> #include <unistd.h> #include<sys/wait.h> -// #include <sys/stat.h> -// #include <sys/time.h> -// #include <sys/types.h> #include <unistd.h> #include <errno.h> //extern QtRec *qperec; @@ -31,12 +31,12 @@ Device::Device( QObject * parent, const char * dsp, const char * mixr, bool reco devCh=-1; devRate=-1; if( !record){ //playing - qDebug("setting up DSP for playing"); + odebug << "setting up DSP for playing" << oendl; flags = O_WRONLY; } else { //recording - qDebug("setting up DSP for recording"); + odebug << "setting up DSP for recording" << oendl; flags = O_RDWR; // flags = O_RDONLY; // selectMicInput(); @@ -95,9 +95,9 @@ void Device::changedOutVolume(int vol) { Config cfg("qpe"); cfg.setGroup("Volume"); cfg.writeEntry("VolumePercent", QString::number( vol )); QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; - qWarning("changing output vol %d", vol); + owarn << "changing output vol " << vol << "" << oendl; } ::close(fd); } @@ -110,9 +110,9 @@ void Device::changedInVolume(int vol ) { Config cfg("qpe"); cfg.setGroup("Volume"); cfg.writeEntry("Mic", QString::number(vol )); QCopEnvelope( "QPE/System", "micChange(bool)" ) << false; - qWarning("changing input volume %d", vol); + owarn << "changing input volume " << vol << "" << oendl; } ::close(fd); } @@ -148,24 +148,24 @@ exit(1); perror("The fork failed!"); break; case 0: { */ -qDebug("Opening %s",dspstr); +odebug << "Opening " << dspstr << "" << oendl; if (( sd = ::open( dspstr, flags)) == -1) { perror("open(\"/dev/dsp\")"); QString errorMsg="Could not open audio device\n /dev/dsp\n" +(QString)strerror(errno); - qDebug("XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg); + odebug << "XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; return -1; } -qDebug("Opening mixer"); +odebug << "Opening mixer" << oendl; int mixerHandle=0; if (( mixerHandle = open("/dev/mixer",O_RDWR))<0) { perror("open(\"/dev/mixer\")"); QString errorMsg="Could not open audio device\n /dev/dsp\n" +(QString)strerror(errno); - qDebug("XXXXXXXXXXXXXXXXXXXXXX "+errorMsg); + odebug << "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; } if(ioctl(sd,SNDCTL_DSP_RESET,0)<0){ perror("ioctl RESET"); @@ -179,9 +179,9 @@ qDebug("Opening mixer"); */ /* close(pipefd[0]); write(pipefd[1], message, sizeof(message)); close(pipefd[1]); - // qDebug("%d",soundDevice->sd ); + // odebug << "" << soundDevice->sd << "" << oendl; _exit(0); } default: // pid greater than zero is parent getting the child's pid @@ -205,15 +205,15 @@ qDebug("Opening mixer"); // } */ // bool ok; // sd = s.toInt(&ok, 10); -// qDebug("<<<<<<<<<<<<<>>>>>>>>>>>>"+s); +// odebug << "<<<<<<<<<<<<<>>>>>>>>>>>>"+s << oendl; // f2.close(); // } ::close(mixerHandle ); -// qDebug("open device %s", dspstr); -// qDebug("success! %d",sd); +// odebug << "open device " << dspstr << "" << oendl; +// odebug << "success! " << sd << "" << oendl; return sd; } bool Device::closeDevice( bool) { @@ -229,14 +229,14 @@ bool Device::closeDevice( bool) { ::close( sd); //close sound device // sdfd=0; // sd=0; -// qDebug("closed dsp"); +// odebug << "closed dsp" << oendl; return true; } bool Device::setDeviceFormat( int form) { - qDebug("set device res %d %d", form, sd); + odebug << "set device res " << form << " " << sd << "" << oendl; if (ioctl( sd, SNDCTL_DSP_SETFMT, &form)==-1) { //set format perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); return false; } @@ -244,9 +244,9 @@ bool Device::setDeviceFormat( int form) { return true; } bool Device::setDeviceChannels( int ch) { - qDebug("set channels %d %d", ch, sd); + odebug << "set channels " << ch << " " << sd << "" << oendl; if (ioctl( sd, SNDCTL_DSP_CHANNELS, &ch)==-1) { perror("ioctl(\"SNDCTL_DSP_CHANNELS\")"); return false; } @@ -254,9 +254,9 @@ bool Device::setDeviceChannels( int ch) { return true; } bool Device::setDeviceRate( int rate) { - qDebug("set rate %d %d", rate, sd); + odebug << "set rate " << rate << " " << sd << "" << oendl; if (ioctl( sd, SNDCTL_DSP_SPEED, &rate) == -1) { perror("ioctl(\"SNDCTL_DSP_SPEED\")"); return false; } @@ -317,11 +317,11 @@ int Device::getDeviceChannels() { int Device::getDeviceFragSize() { int frag_size; if (ioctl( sd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) { - qDebug("no fragsize"); + odebug << "no fragsize" << oendl; } else { - qDebug("driver says frag size is %d", frag_size); + odebug << "driver says frag size is " << frag_size << "" << oendl; } return frag_size; } diff --git a/noncore/multimedia/opierec/helpwindow.cpp b/noncore/multimedia/opierec/helpwindow.cpp index 6aebaa1..7f984c3 100644 --- a/noncore/multimedia/opierec/helpwindow.cpp +++ b/noncore/multimedia/opierec/helpwindow.cpp @@ -8,25 +8,30 @@ ** *****************************************************************************/ #include "helpwindow.h" -#include <qlayout.h> -#include <qtoolbar.h> +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ +#include <qlayout.h> +#include <qtoolbar.h> #include <qaction.h> #include <qmenubar.h> +/* STD */ #include <ctype.h> HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name ) : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() { QGridLayout *layout = new QGridLayout( this ); layout->setSpacing( 2); layout->setMargin( 2); - qDebug(_path); + odebug << _path << oendl; browser = new QTextBrowser( this ); QStringList Strlist; Strlist.append( home_); browser->mimeSourceFactory()->setFilePath( Strlist ); diff --git a/noncore/multimedia/opierec/opierec.pro b/noncore/multimedia/opierec/opierec.pro index 7b08f0e..ea1bae3 100644 --- a/noncore/multimedia/opierec/opierec.pro +++ b/noncore/multimedia/opierec/opierec.pro @@ -1,7 +1,5 @@ -#CONFIG = qt warn_on pdaudio -CONFIG = qt warn_on opie -#CONFIG = qt warn_on quick-app +CONFIG = qt warn_on HEADERS = adpcm.h \ pixmaps.h \ helpwindow.h \ qtrec.h \ @@ -28,9 +26,9 @@ contains(CONFIG, pdaudio) { # DESTDIR=$(QPEDIR)/bin } -contains(CONFIG, opie) { +!contains(CONFIG, pdaudio) { INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include DESTDIR=$(OPIEDIR)/bin LIBS += -lqpe -lopiecore2 -lpthread diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 1c64ab1..2187d5a 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp @@ -7,26 +7,24 @@ #include "pixmaps.h" #include "qtrec.h" #include "waveform.h" - -#include <pthread.h> - extern "C" { #include "adpcm.h" } -#include <sys/soundcard.h> - +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/storage.h> +using namespace Opie::Core; +/* QT */ #include <qcheckbox.h> #include <qcombobox.h> -//#include <qdatetime.h> #include <qdir.h> #include <qgroupbox.h> #include <qlabel.h> #include <qlayout.h> @@ -37,8 +35,9 @@ extern "C" { #include <qslider.h> #include <qtabwidget.h> #include <qtimer.h> +/* STD */ #include <errno.h> #include <fcntl.h> #include <math.h> #include <mntent.h> @@ -52,9 +51,9 @@ extern "C" { #include <sys/vfs.h> #include <unistd.h> #include <sys/wait.h> #include <sys/signal.h> - +#include <pthread.h> #ifdef PDAUDIO //ALSA #include <alsa/asoundlib.h> static int deviceSampleRates[8] = { 32000, 44100, 48000, 88200, 96000, 176400, 192000, -1 }; @@ -135,19 +134,19 @@ void quickRec() QString num; int level = 0; int threshold = 0; // int bits = filePara.resolution; -// qDebug("bits %d", bits); +// odebug << "bits " << bits << "" << oendl; if( filePara.resolution == 16 ) { //AFMT_S16_LE) -// qDebug("AFMT_S16_LE size %d", filePara.SecondsToRecord); -// qDebug("samples to record %d", filePara.samplesToRecord); -// qDebug("%d", filePara.sd); +// odebug << "AFMT_S16_LE size " << filePara.SecondsToRecord << "" << oendl; +// odebug << "samples to record " << filePara.samplesToRecord << "" << oendl; +// odebug << "" << filePara.sd << "" << oendl; level = 7; threshold = 0; if( filePara.format == WAVE_FORMAT_DVI_ADPCM) { -// qDebug("start recording WAVE_FORMAT_DVI_ADPCM"); +// odebug << "start recording WAVE_FORMAT_DVI_ADPCM" << oendl; // <<<<<<<<<<<<<<<<<<<<<<<<<<< WAVE_FORMAT_DVI_ADPCM >>>>>>>>>>>>>>>>>>>>>> char abuf[ BUFSIZE/2 ]; short sbuf[ BUFSIZE ]; short sbuf2[ BUFSIZE ]; @@ -156,18 +155,18 @@ void quickRec() memset( sbuf2, 0, BUFSIZE); for(;;) { if ( stopped) { -// qDebug("quickRec:: stopped"); +// odebug << "quickRec:: stopped" << oendl; break; } // number=::read( filePara.sd, sbuf, BUFSIZE); number = soundDevice ->devRead( filePara.sd, sbuf, BUFSIZE); if(number <= 0) { perror("recording error "); - qDebug( "%s %d", filePara.fileName, number); + odebug << "" << filePara.fileName << " " << number << "" << oendl; stopped = true; return; } //if(stereo == 2) { @@ -191,16 +190,16 @@ void quickRec() } } } else { // <<<<<<<<<<<<<<<<<<<<<<<<<<< WAVE_FORMAT_PCM >>>>>>>>>>>>>>>>>>>>>> - qDebug("start recording WAVE_FORMAT_PCM"); + odebug << "start recording WAVE_FORMAT_PCM" << oendl; short inbuffer[ BUFSIZE ], outbuffer[ BUFSIZE ]; memset( inbuffer, 0, BUFSIZE); memset( outbuffer, 0, BUFSIZE); for(;;) { if ( stopped) { - qDebug("quickRec:: stopped"); + odebug << "quickRec:: stopped" << oendl; stopped = true; break; // stop if playing was set to false return; } @@ -209,9 +208,9 @@ void quickRec() waveform->newSamples( inbuffer, number ); if( number <= 0) { perror( "recording error "); - qDebug( filePara.fileName); + odebug << filePara.fileName << oendl; stopped = true; return; } @@ -249,9 +248,9 @@ void quickRec() memset( unsigned_outbuffer, 0, BUFSIZE); for(;;) { if ( stopped) { - qDebug("quickRec:: stopped"); + odebug << "quickRec:: stopped" << oendl; break; // stop if playing was set to false } number = ::read( filePara.sd, unsigned_inbuffer, BUFSIZE); @@ -372,9 +371,9 @@ void playIt() qApp->processEvents(); if( /*total >= filePara.numberSamples || */ bytesWritten == 0) { - qWarning("Jane! Stop this crazy thing!"); + owarn << "Jane! Stop this crazy thing!" << oendl; stopped = true; // playing = false; break; } @@ -717,9 +716,9 @@ void QtRec::initIconView() { QString temp; QPixmap image0( ( const char** ) image0_data ); int nFiles = cfg.readNumEntry("NumberofFiles",0); -// qDebug("init number of files %d", nFiles); +// odebug << "init number of files " << nFiles << "" << oendl; for(int i=1;i<= nFiles;i++) { QListViewItem * item; @@ -859,9 +858,9 @@ void QtRec::initConfig() { inMuteCheckBox->setChecked( cofg.readBoolEntry( "MicMute",0)); } void QtRec::stop() { - qWarning("STOP"); + owarn << "STOP" << oendl; setRecordButton(false); if( !recording) endPlaying(); @@ -921,22 +920,22 @@ bool QtRec::rec() { //record // soundDevice->getDeviceRate(), // soundDevice->getDeviceChannels()); //filePara.sampleRate = cfg.readNumEntry("samplerate", 22050); -// qDebug("sample rate is %d", filePara.sampleRate); +// odebug << "sample rate is " << filePara.sampleRate << "" << oendl; filePara.SecondsToRecord = getCurrentSizeLimit(); -// qDebug("size limit %d sec", filePara.SecondsToRecord); +// odebug << "size limit " << filePara.SecondsToRecord << " sec" << oendl; int diskSize = checkDiskSpace( (const QString &) wavFile->trackName()); if( filePara.SecondsToRecord == 0) { fileSize = diskSize; } else if( filePara.format == WAVE_FORMAT_PCM) { -// qDebug("WAVE_FORMAT_PCM"); +// odebug << "WAVE_FORMAT_PCM" << oendl; fileSize = (filePara.SecondsToRecord ) * filePara.channels * filePara.sampleRate * ( filePara.resolution / 8) + 1000; } else { -// qDebug("WAVE_FORMAT_DVI_ADPCM"); +// odebug << "WAVE_FORMAT_DVI_ADPCM" << oendl; fileSize = ((filePara.SecondsToRecord) * filePara.channels * filePara.sampleRate * ( filePara.resolution / 8) ) / 4 + 250; } @@ -946,9 +945,9 @@ bool QtRec::rec() { //record if( paused) { paused = false; } // else { - qDebug("Setting timeslider %d", filePara.samplesToRecord); + odebug << "Setting timeslider " << filePara.samplesToRecord << "" << oendl; // if(fileSize != 0) timeSlider->setRange(0, filePara.samplesToRecord); // } @@ -965,9 +964,9 @@ bool QtRec::rec() { //record #ifdef DEV_VERSION setCaption( msg); #endif filePara.fileName=currentFile.latin1(); - qDebug("Start recording thread"); + odebug << "Start recording thread" << oendl; stopped = false; #ifdef THREADED pthread_t thread1; @@ -1009,15 +1008,15 @@ void QtRec::thisTab(QWidget* widg) { } void QtRec::getOutVol( ) { filePara.outVol = soundDevice->getOutVolume(); -// qDebug("out vol %d", filePara.outVol); +// odebug << "out vol " << filePara.outVol << "" << oendl; OutputSlider->setValue( -filePara.outVol); } void QtRec::getInVol() { filePara.inVol = soundDevice->getInVolume(); -// qDebug("in vol %d", filePara.inVol); +// odebug << "in vol " << filePara.inVol << "" << oendl; InputSlider->setValue( -filePara.inVol); } void QtRec::changedOutVolume() { @@ -1089,13 +1088,13 @@ bool QtRec::setupAudio( bool b) { sampleformat = AFMT_U8; if( !compressionCheckBox->isChecked()) { filePara.format = WAVE_FORMAT_PCM; -// qDebug("WAVE_FORMAT_PCM"); +// odebug << "WAVE_FORMAT_PCM" << oendl; } else { filePara.format = WAVE_FORMAT_DVI_ADPCM; sampleformat = AFMT_S16_LE; -// qDebug("WAVE_FORMAT_DVI_ADPCM"); +// odebug << "WAVE_FORMAT_DVI_ADPCM" << oendl; } #endif stereo = filePara.channels; @@ -1109,17 +1108,17 @@ bool QtRec::setupAudio( bool b) { recording = true; } // if(soundDevice) delete soundDevice; - qDebug("<<<<<<<<<<<<<<<<<<<open dsp %d %d %d", filePara.sampleRate, filePara.channels, sampleformat); - qWarning("change waveform settings"); + odebug << "<<<<<<<<<<<<<<<<<<<open dsp " << filePara.sampleRate << " " << filePara.channels << " " << sampleformat << "" << oendl; + owarn << "change waveform settings" << oendl; waveform->changeSettings( filePara.sampleRate, filePara.channels ); soundDevice = new Device( this, dspString, mixerString, b); // soundDevice->openDsp(); soundDevice->reset(); - qDebug("device has been made %d", soundDevice->sd); + odebug << "device has been made " << soundDevice->sd << "" << oendl; ////////////////// <<<<<<<<<<<<>>>>>>>>>>>> soundDevice->setDeviceFormat( sampleformat); soundDevice->setDeviceChannels( filePara.channels); @@ -1148,9 +1147,9 @@ bool QtRec::setupAudio( bool b) { } bool QtRec::setUpFile() { //setup file for recording -// qDebug("Setting up wavfile"); +// odebug << "Setting up wavfile" << oendl; // if(wavFile) delete wavFile; wavFile = new WavFile( this, (const QString &)"", true, filePara.sampleRate, @@ -1181,9 +1180,9 @@ bool QtRec::doPlay() { stopped = false; recording = false; QString num; - qDebug( "Play number of samples %d", filePara.numberSamples); + odebug << "Play number of samples " << filePara.numberSamples << "" << oendl; // timeSlider->setRange( 0, filePara.numberSamples); timeString.sprintf("%f", filePara.numberOfRecordedSeconds); @@ -1233,9 +1232,9 @@ void QtRec::changesamplerateCombo(int i) { bool ok; rate = sampleRateComboBox->text(i).toInt(&ok, 10); cfg.writeEntry( "samplerate",rate); filePara.sampleRate=rate; - qDebug( "Change sample rate %d", rate); + odebug << "Change sample rate " << rate << "" << oendl; cfg.write(); } @@ -1253,9 +1252,9 @@ void QtRec::changeDirCombo(int index) { (*it)->name() == sName ) { const QString path = (*it)->path(); recDir = path; cfg.writeEntry("directory", recDir); - qDebug("new rec dir "+recDir); + odebug << "new rec dir "+recDir << oendl; } } cfg.write(); } @@ -1373,9 +1372,9 @@ void QtRec::keyPressEvent( QKeyEvent *e) { case Key_Down: // newSound(); break; case Key_Left: { - qDebug("rewinding"); + odebug << "rewinding" << oendl; if( !e->isAutoRepeat()) rewindPressed(); } break; @@ -1427,21 +1426,21 @@ void QtRec::keyReleaseEvent( QKeyEvent *e) { deleteSound(); break; case Key_Up: // stop(); - qDebug("Up"); + odebug << "Up" << oendl; break; case Key_Down: // start(); - // qDebug("Down"); + // odebug << "Down" << oendl; // newSound(); break; case Key_Left: - qDebug("Left"); + odebug << "Left" << oendl; rewindReleased(); break; case Key_Right: - qDebug("Right"); + odebug << "Right" << oendl; FastforwardReleased(); break; } } @@ -1474,13 +1473,13 @@ void QtRec::endRecording() { if( wavFile->isTempFile()) { // move tmp file to regular file QString cmd; cmd.sprintf("mv "+ wavFile->trackName() + " " + wavFile->currentFileName); -// qDebug("moving tmp file to "+currentFileName); +// odebug << "moving tmp file to "+currentFileName << oendl; system( cmd.latin1()); } - qDebug("Just moved " + wavFile->currentFileName); + odebug << "Just moved " + wavFile->currentFileName << oendl; Config cfg("OpieRec"); cfg.setGroup("Sounds"); int nFiles = cfg.readNumEntry( "NumberofFiles",0); @@ -1494,12 +1493,12 @@ void QtRec::endRecording() { QString time; time.sprintf("%.2f", filePara.numberOfRecordedSeconds); cfg.writeEntry( wavFile->currentFileName, time ); -// qDebug("writing config numberOfRecordedSeconds "+time); +// odebug << "writing config numberOfRecordedSeconds "+time << oendl; cfg.write(); - qDebug("finished recording"); + odebug << "finished recording" << oendl; timeLabel->setText(""); } if(soundDevice) delete soundDevice; @@ -1515,9 +1514,9 @@ void QtRec::endPlaying() { playing = false; stopped = true; waveform->reset(); // errorStop(); -// qDebug("end playing"); +// odebug << "end playing" << oendl; setRecordButton( false); toBeginningButton->setEnabled( true); toEndButton->setEnabled( true); @@ -1527,20 +1526,20 @@ void QtRec::endPlaying() { soundDevice->closeDevice( false); soundDevice->sd = -1; // if(soundDevice) delete soundDevice; -// qDebug("file and sound device closed"); +// odebug << "file and sound device closed" << oendl; timeLabel->setText(""); total = 0; filePara.numberSamples = 0; filePara.sd = -1; // wavFile->closeFile(); filePara.fd = 0; // if(wavFile) delete wavFile; //this crashes -// qDebug("track closed"); +// odebug << "track closed" << oendl; killTimers(); - qWarning("reset slider"); + owarn << "reset slider" << oendl; timeSlider->setValue(0); if(soundDevice) delete soundDevice; @@ -1560,9 +1559,9 @@ bool QtRec::openPlayFile() { int nFiles = cfg.readNumEntry( "NumberofFiles", 0); for(int i=0;i<nFiles+1;i++) { //look for file if( cfg.readEntry( QString::number(i),"").find( currentFile,0,true) != -1) { currentFileName = cfg.readEntry( currentFile, "" ); - qDebug("opening for play: " + currentFileName); + odebug << "opening for play: " + currentFileName << oendl; } } wavFile = new WavFile(this, currentFileName, @@ -1585,12 +1584,12 @@ bool QtRec::openPlayFile() { filePara.channels = wavFile->getChannels(); timeSlider->setPageStep(1); monitoring = true; - qDebug("file %d, samples %d %d", filePara.fd, filePara.numberSamples, filePara.sampleRate); + odebug << "file " << filePara.fd << ", samples " << filePara.numberSamples << " " << filePara.sampleRate << "" << oendl; int sec = (int) (( filePara.numberSamples / filePara.sampleRate) / filePara.channels) / ( filePara.channels*( filePara.resolution/8)); - qWarning("seconds %d", sec); + owarn << "seconds " << sec << "" << oendl; timeSlider->setRange(0, filePara.numberSamples ); } @@ -1689,9 +1688,9 @@ void QtRec::doRename() { } void QtRec::okRename() { - qDebug(renameBox->text()); + odebug << renameBox->text() << oendl; QString filename = renameBox->text(); cancelRename(); if( ListView1->currentItem() == NULL) @@ -1701,9 +1700,9 @@ void QtRec::okRename() { cfg.setGroup("Sounds"); QString file = ListView1->currentItem()->text(0); - qDebug("filename is " + filename); + odebug << "filename is " + filename << oendl; int nFiles = cfg.readNumEntry("NumberofFiles",0); for(int i=0;i<nFiles+1;i++) { //look for file @@ -1772,9 +1771,9 @@ void QtRec::doVolMuting(bool b) { QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << b; } void QtRec::doMicMuting(bool b) { - // qDebug("mic mute"); + // odebug << "mic mute" << oendl; Config cfg( "qpe" ); cfg. setGroup( "Volume" ); cfg.writeEntry( "MicMute",b); cfg.write(); @@ -1828,9 +1827,9 @@ long QtRec::checkDiskSpace(const QString &path) { // char f_fname[6]; /* Volumename */ // char f_fpack[6]; /* Pack name */ void QtRec::receive( const QCString &msg, const QByteArray & ) { - qDebug("Voicerecord received message "+msg); + odebug << "Voicerecord received message "+msg << oendl; } @@ -1853,9 +1852,9 @@ void QtRec::timerEvent( QTimerEvent * ) { if( recording && filePara.SecondsToRecord < secCount && filePara.SecondsToRecord != 0) { stop(); } - qDebug( "%d", secCount ); + odebug << "" << secCount << "" << oendl; QString timeString; #ifdef DEV_VERSION QString msg; msg.sprintf("%d, %d, %d", filePara.sampleRate, filePara.channels, filePara.resolution); @@ -1869,9 +1868,9 @@ void QtRec::timerEvent( QTimerEvent * ) { } void QtRec::changeTimeSlider(int index) { if( ListView1->currentItem() == 0 || !wavFile->track.isOpen()) return; - // qDebug("Slider moved to %d",index); + // odebug << "Slider moved to " << index << "" << oendl; paused = true; stopped = true; sliderPos=index; @@ -1884,18 +1883,18 @@ void QtRec::changeTimeSlider(int index) { } void QtRec::timeSliderPressed() { if( ListView1->currentItem() == 0) return; - // qDebug("slider pressed"); + // odebug << "slider pressed" << oendl; paused = true; stopped = true; } void QtRec::timeSliderReleased() { if( ListView1->currentItem() == 0) return; sliderPos = timeSlider->value(); - // qDebug("slider released %d", sliderPos); + // odebug << "slider released " << sliderPos << "" << oendl; stopped = false; int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); total = newPos*4; filePara.numberOfRecordedSeconds = (float)sliderPos / (float)filePara.sampleRate * (float)2; @@ -1923,9 +1922,9 @@ void QtRec::rewindTimerTimeout() { int sliderValue = timeSlider->value(); sliderValue = sliderValue - ( filePara.numberSamples / 100); // if(toBeginningButton->isDown()) timeSlider->setValue( sliderValue ) ; - // qDebug("%d", sliderValue); + // odebug << "" << sliderValue << "" << oendl; QString timeString; filePara.numberOfRecordedSeconds = (float)sliderValue / (float)filePara.sampleRate * (float)2; timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); timeLabel->setText( timeString+ tr(" seconds")); @@ -1937,9 +1936,9 @@ void QtRec::rewindReleased() { sliderPos=timeSlider->value(); stopped = false; int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); total = newPos * 4; - // qDebug("rewind released %d", total); + // odebug << "rewind released " << total << "" << oendl; startTimer( 1000); doPlay(); } } @@ -2001,9 +2000,9 @@ QString QtRec::getStorage(const QString &fileName) { storage = name; // const QString options = (*it)->options(); // if( name.find( tr("Internal"),0,true) == -1) { // storageComboBox->insertItem( name +" -> "+disk); - // qDebug(name); + // odebug << name << oendl; } return storage; // struct mntent *me; // // if(fileName == "/etc/mtab") { diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index 35bc14d..7e9b50f 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp @@ -1,19 +1,22 @@ //wavFile.cpp #include "wavFile.h" #include "qtrec.h" +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +using namespace Opie::Core; + +/* QT */ #include <qmessagebox.h> #include <qdir.h> -#include <qpe/config.h> - +/* STD */ #include <errno.h> - #include <sys/time.h> #include <sys/types.h> #include <sys/vfs.h> - #include <fcntl.h> #include <math.h> #include <mntent.h> #include <stdio.h> @@ -23,9 +26,9 @@ WavFile::WavFile( QObject * parent,const QString &fileName, bool makeNwFile, int sampleRate, int channels, int resolution, int format ) : QObject( parent) { -//qDebug("new wave file"); +//odebug << "new wave file" << oendl; bool b = makeNwFile; wavSampleRate=sampleRate; wavFormat=format; wavChannels=channels; @@ -39,9 +42,9 @@ WavFile::WavFile( QObject * parent,const QString &fileName, bool makeNwFile, int } bool WavFile::newFile() { -// qDebug("Set up new file"); +// odebug << "Set up new file" << oendl; Config cfg("OpieRec"); cfg.setGroup("Settings"); currentFileName=cfg.readEntry("directory",QDir::homeDirPath()); @@ -59,9 +62,9 @@ bool WavFile::newFile() { else currentFileName += date; currentFileName+=".wav"; -// qDebug("set up file for recording: "+currentFileName); +// odebug << "set up file for recording: "+currentFileName << oendl; char pointer[] = "/tmp/opierec-XXXXXX"; int fd = 0; if( currentFileName.find("/mnt",0,true) == -1 @@ -74,9 +77,9 @@ bool WavFile::newFile() { perror("mkstemp failed"); return false; } -// qDebug("Opening tmp file %s",pointer); +// odebug << "Opening tmp file " << pointer << "" << oendl; track.setName( pointer); } else { //just use regular file.. no moving @@ -84,9 +87,9 @@ bool WavFile::newFile() { track.setName( currentFileName); } if(!track.open( IO_ReadWrite | IO_Truncate)) { QString errorMsg=(QString)strerror(errno); - qDebug(errorMsg); + odebug << errorMsg << oendl; QMessageBox::message("Note", "Error opening file.\n" +errorMsg); return false; } else { @@ -105,16 +108,16 @@ void WavFile::closeFile() { track.close(); } int WavFile::openFile(const QString ¤tFileName) { -// qDebug("open play file "+currentFileName); +// odebug << "open play file "+currentFileName << oendl; closeFile(); track.setName(currentFileName); if(!track.open(IO_ReadOnly)) { QString errorMsg=(QString)strerror(errno); - qDebug("<<<<<<<<<<< "+errorMsg+currentFileName); + odebug << "<<<<<<<<<<< "+errorMsg+currentFileName << oendl; QMessageBox::message("Note", "Error opening file.\n" +errorMsg); return -1; } else { parseWavHeader( track.handle()); @@ -130,13 +133,13 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { (*hdr).fmtLen = 16; // format length = 16 if( wavFormat == WAVE_FORMAT_PCM) { (*hdr).fmtTag = 1; // PCM -// qDebug("set header WAVE_FORMAT_PCM"); +// odebug << "set header WAVE_FORMAT_PCM" << oendl; } else { (*hdr).fmtTag = WAVE_FORMAT_DVI_ADPCM; //intel ADPCM - // qDebug("set header WAVE_FORMAT_DVI_ADPCM"); + // odebug << "set header WAVE_FORMAT_DVI_ADPCM" << oendl; } // (*hdr).nChannels = 1;//filePara.channels;// ? 2 : 1*/; // channels (*hdr).nChannels = wavChannels;// ? 2 : 1*/; // channels @@ -159,54 +162,54 @@ bool WavFile::adjustHeaders(int fd, int total) { int i = total + 36; write( fd, &i, sizeof(i)); lseek( fd, 40, SEEK_SET); write( fd, &total, sizeof(total)); - qDebug("adjusting header %d", total); + odebug << "adjusting header " << total << "" << oendl; return true; } int WavFile::parseWavHeader(int fd) { - qDebug("Parsing wav header"); + odebug << "Parsing wav header" << oendl; char string[4]; int found; short fmt; unsigned short ch, bitrate; unsigned long samplerrate, longdata; if (read(fd, string, 4) < 4) { - qDebug(" Could not read from sound file.\n"); + odebug << " Could not read from sound file.\n" << oendl; return -1; } if (strncmp(string, "RIFF", 4)) { - qDebug(" not a valid WAV file.\n"); + odebug << " not a valid WAV file.\n" << oendl; return -1; } lseek(fd, 4, SEEK_CUR); if (read(fd, string, 4) < 4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } if (strncmp(string, "WAVE", 4)) { - qDebug("not a valid WAV file.\n"); + odebug << "not a valid WAV file.\n" << oendl; return -1; } found = 0; while (!found) { if (read(fd, string, 4) < 4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } if (strncmp(string, "fmt ", 4)) { if (read(fd, &longdata, 4) < 4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } lseek(fd, longdata, SEEK_CUR); } else { lseek(fd, 4, SEEK_CUR); if (read(fd, &fmt, 2) < 2) { - qDebug("Could not read format chunk.\n"); + odebug << "Could not read format chunk.\n" << oendl; return -1; } if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { qDebug("Wave file contains unknown format." @@ -214,53 +217,53 @@ int WavFile::parseWavHeader(int fd) { return -1; } wavFormat = fmt; // compressionFormat=fmt; - qDebug("compressionFormat is %d", fmt); + odebug << "compressionFormat is " << fmt << "" << oendl; if (read(fd, &ch, 2) < 2) { - qDebug("Could not read format chunk.\n"); + odebug << "Could not read format chunk.\n" << oendl; return -1; } else { wavChannels = ch; - qDebug("File has %d channels", ch); + odebug << "File has " << ch << " channels" << oendl; } if (read(fd, &samplerrate, 4) < 4) { - qDebug("Could not read from format chunk.\n"); + odebug << "Could not read from format chunk.\n" << oendl; return -1; } else { wavSampleRate = samplerrate; // sampleRate = samplerrate; - qDebug("File has samplerate of %d",(int) samplerrate); + odebug << "File has samplerate of " << (int) samplerrate << "" << oendl; } lseek(fd, 6, SEEK_CUR); if (read(fd, &bitrate, 2) < 2) { - qDebug("Could not read format chunk.\n"); + odebug << "Could not read format chunk.\n" << oendl; return -1; } else { wavResolution=bitrate; // resolution = bitrate; - qDebug("File has bitrate of %d", bitrate); + odebug << "File has bitrate of " << bitrate << "" << oendl; } found++; } } found = 0; while (!found) { if (read(fd, string, 4) < 4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } if (strncmp(string, "data", 4)) { if (read(fd, &longdata, 4)<4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } lseek(fd, longdata, SEEK_CUR); } else { if (read(fd, &longdata, 4) < 4) { - qDebug("Could not read from sound file.\n"); + odebug << "Could not read from sound file.\n" << oendl; return -1; } else { wavNumberSamples = longdata; qDebug("file has length of %d \nlasting %d seconds", (int)longdata, diff --git a/noncore/multimedia/opierec/waveform.cpp b/noncore/multimedia/opierec/waveform.cpp index 9cc40b4..7c9a25f 100644 --- a/noncore/multimedia/opierec/waveform.cpp +++ b/noncore/multimedia/opierec/waveform.cpp @@ -18,10 +18,14 @@ ** **********************************************************************/ #include "waveform.h" -#include <qpainter.h> +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ +#include <qpainter.h> Waveform::Waveform( QWidget *parent, const char *name, WFlags fl ) : QWidget( parent, name, fl ) { @@ -37,11 +41,11 @@ Waveform::Waveform( QWidget *parent, const char *name, WFlags fl ) void Waveform::changeSettings( int frequency, int channels ) { makePixmap(); -// qWarning("change waveform %d, %d", frequency, channels); +// owarn << "change waveform " << frequency << ", " << channels << "" << oendl; samplesPerPixel = frequency * channels / (5 * windowSize); - qWarning("Waveform::changeSettings %d", samplesPerPixel); + owarn << "Waveform::changeSettings " << samplesPerPixel << "" << oendl; if ( !samplesPerPixel ) samplesPerPixel = 1; currentValue = 0; numSamples = 0; @@ -95,9 +99,9 @@ void Waveform::newSamples( const short *buf, int len ) } } // Copy the final state back to the object. -//qWarning("%d, %d, %d", currentValue, numSamples, windowPosn); +//owarn << "" << currentValue << ", " << numSamples << ", " << windowPosn << "" << oendl; this->currentValue = currentValue; this->numSamples = numSamples; this->windowPosn = windowPosn; } diff --git a/noncore/multimedia/powerchord/config.in b/noncore/multimedia/powerchord/config.in index ab1512b..5db784a 100644 --- a/noncore/multimedia/powerchord/config.in +++ b/noncore/multimedia/powerchord/config.in @@ -1,7 +1,7 @@ config POWERCHORD boolean "opie-powerchord (guitar chord generator and tuning)" default "n" - depends ( LIBQPE || LIBQPE-X11 ) - comment "opie-powerchord needs a libqpe" - depends !(( LIBQPE || LIBQPE-X11 ) ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + comment "opie-powerchord needs a libqpe and libopiecore2" + depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE ) diff --git a/noncore/multimedia/powerchord/powerchord.pro b/noncore/multimedia/powerchord/powerchord.pro index 917c88f..f7af6d6 100644 --- a/noncore/multimedia/powerchord/powerchord.pro +++ b/noncore/multimedia/powerchord/powerchord.pro @@ -17,10 +17,9 @@ SOURCES = main.cpp \ powerchordbase.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -#INTERFACES = powerchordbase.ui +LIBS += -lqpe -lopiecore2 DESTDIR = $(OPIEDIR)/bin TARGET = powerchord include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp index 4fb5dda..0694ba3 100644 --- a/noncore/multimedia/powerchord/powerchordbase.cpp +++ b/noncore/multimedia/powerchord/powerchordbase.cpp @@ -6,21 +6,25 @@ ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "powerchordbase.h" - #include "fretboard.h" #include "vumeter.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/resource.h> +using namespace Opie::Core; + +/* QT */ #include <qcombobox.h> #include <qlabel.h> #include <qlistbox.h> #include <qpushbutton.h> #include <qspinbox.h> #include <qtabwidget.h> #include <qlayout.h> #include <qtooltip.h> -#include <qpe/resource.h> - /* * Constructs a PowerchordBase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' @@ -579,7 +583,7 @@ PowerchordBase::~PowerchordBase() } void PowerchordBase::change_handler() { - qWarning( "PowerchordBase::change_handler(): Not implemented yet!" ); + owarn << "PowerchordBase::change_handler(): Not implemented yet!" << oendl; } diff --git a/noncore/multimedia/showimg/ImageFileSelector.cpp b/noncore/multimedia/showimg/ImageFileSelector.cpp index 79ee925..53cc883 100644 --- a/noncore/multimedia/showimg/ImageFileSelector.cpp +++ b/noncore/multimedia/showimg/ImageFileSelector.cpp @@ -1,15 +1,17 @@ +#include "ImageFileSelector.h" +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> +using namespace Opie::Core; -#include "qpe/qpeapplication.h" - -#include <stdlib.h> - +/* QT */ #include <qlabel.h> #include <qfileinfo.h> -#include "ImageFileSelector.h" - +/* STD */ +#include <stdlib.h> ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w) : QWidget( parent ),fl(f) { @@ -154,9 +156,9 @@ void ImageFileSelector::updateSizes() } void ImageFileSelector::reread(bool) { -// qDebug("reread"); +// odebug << "reread" << oendl; ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem(); QString oldFile; if ( item ) oldFile = item->file().file(); @@ -220,9 +222,9 @@ int ImageFileSelector::fileCount() return count; } const DocLnk * ImageFileSelector::selected() { - qDebug("image selected"); + odebug << "image selected" << oendl; ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); if ( item ) return new DocLnk( item->file() ); return 0; diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 696a57b..24377ed 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp @@ -25,25 +25,27 @@ #include "showimg.h" #include "ImageFileSelector.h" #include "settingsdialog.h" - +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/ofiledialog.h> - #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/resource.h> -#include <qtoolbar.h> +using namespace Opie::Core; +using namespace Opie::Ui; +/* QT */ +#include <qtoolbar.h> #include <qaction.h> #include <qfiledialog.h> #include <qmenubar.h> #include <qspinbox.h> +/* STD */ #include <math.h> - -using namespace Opie::Ui; ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) : QDialog(parent,0,true) { setCaption(caption); @@ -285,9 +287,9 @@ ImageViewer::ImageViewer( QWidget *parent, const char *name, int /*wFlags*/ ) cv=ImageFileSelector::THUMBNAIL; else cv=ImageFileSelector::DETAILED; - qDebug("cv = %d",cv); + odebug << "cv = " << cv << "" << oendl; fileSelector = new ImageFileSelector( cv,stack, "fs"); //switchThumbView(); @@ -412,9 +414,9 @@ void ImageViewer::settings() dlg.setRotate(rotateOnLoad); dlg.setFastLoad(fastLoad); if ( QPEApplication::execDialog(&dlg) == QDialog::Accepted ) { - qDebug("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>"); + odebug << "<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>" << oendl; slideDelay = dlg.delay(); slideRepeat = dlg.repeat(); slideReverse = dlg.reverse(); rotateOnLoad = dlg.rotate(); @@ -504,9 +506,9 @@ void ImageViewer::show() } void ImageViewer::show(const QString& fileref) { -// qDebug("Show "+fileref); +// odebug << "Show "+fileref << oendl; bFromDocView = TRUE; closeFileSelector(); DocLnk link(fileref); if ( link.isValid() ) { @@ -534,9 +536,9 @@ void ImageViewer::openFile() { void ImageViewer::openFile( const DocLnk &link ) { closeFileSelector(); // DocLnk link(file); - qDebug("open "+link.name()); + odebug << "open "+link.name() << oendl; updateCaption( link.name() ); loadImage( link.file() ); if (slideTimer->isActive()) { slideTimer->start(slideDelay * 1000, FALSE); diff --git a/noncore/multimedia/showimg/showimg.pro b/noncore/multimedia/showimg/showimg.pro index 6fd019e..c905da8 100644 --- a/noncore/multimedia/showimg/showimg.pro +++ b/noncore/multimedia/showimg/showimg.pro diff --git a/noncore/multimedia/tonleiter/config.in b/noncore/multimedia/tonleiter/config.in index d580ad7..9bd167e 100644 --- a/noncore/multimedia/tonleiter/config.in +++ b/noncore/multimedia/tonleiter/config.in @@ -1,4 +1,4 @@ config TONLEITER boolean "tonleiter (shows scales on sting instruments)" default "n" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/multimedia/tonleiter/editinst.cpp b/noncore/multimedia/tonleiter/editinst.cpp index ccb4560..a8c20c8 100644 --- a/noncore/multimedia/tonleiter/editinst.cpp +++ b/noncore/multimedia/tonleiter/editinst.cpp @@ -1,9 +1,14 @@ #include "editinst.h" -#include <qpushbutton.h> - +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; + +/* QT */ +#include <qpushbutton.h> Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) :QDialog(parent,name,true,0),data(data) { @@ -99,9 +104,9 @@ void Menu::InstEditDialog::saveInstrument() void Menu::InstEditDialog::loadInstrument() { stringlist.clear(); Instrument inst=data->getInstrument(instid); - qDebug("load Instrument : %d strings",inst.noOfStrings()); + odebug << "load Instrument : " << inst.noOfStrings() << " strings" << oendl; for(uint s=0;s<inst.noOfStrings();s++) { stringlist.append(new EditStringWidget(inst.string(s),stringwidget)); } diff --git a/noncore/multimedia/tonleiter/fretboard.cpp b/noncore/multimedia/tonleiter/fretboard.cpp index 7e63e01..58bdb86 100644 --- a/noncore/multimedia/tonleiter/fretboard.cpp +++ b/noncore/multimedia/tonleiter/fretboard.cpp @@ -1,6 +1,11 @@ #include "fretboard.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qpainter.h> Graph::FretBoard::FretBoard(TonleiterData* data,QWidget* parent,const char* name,WFlags f) :QWidget(parent,name,f),data(data) @@ -26,9 +31,9 @@ void Graph::FretBoard::paintEvent(QPaintEvent* pe) Q_UNUSED(pe); int instid=data->getCurrentInstrumentID(); inst=data->getInstrument(instid); - //qDebug("inst %d is %s",instid,inst.instName().data()); + //odebug << "inst " << instid << " is " << inst.instName().data() << "" << oendl; QRect mysize=rect(); xmargin=(int)(mysize.width()*0.05); @@ -142,19 +147,19 @@ void Graph::FretBoard::paintScale(QPainter* p) //no more than six octaves can be visualised (there is a zero octave) int octave=Note::octaveOfBaseNote(data->getCurrentBaseNote(),note)-baseoctave; if(octave<0) - qDebug("%d,%d",octave,baseoctave); + odebug << "" << octave << "," << baseoctave << "" << oendl; if(octave>5) { - qDebug("octave out of range"); + odebug << "octave out of range" << oendl; octave=5; } p->setPen(QColor(255,0,0)); int c= ( (note-12*baseoctave) - (12*octave+data->getCurrentBaseNote()) )*15; if(c<0 || c>255) - qDebug("%d = %d - ( %d + %d)",c,note,12*octave,data->getCurrentBaseNote()); + odebug << "" << c << " = " << note << " - ( " << 12*octave << " + " << data->getCurrentBaseNote() << ")" << oendl; QColor dotcolor(255,255,255); if(octave==0) dotcolor=QColor(c,c,255); diff --git a/noncore/multimedia/tonleiter/tonleiter.pro b/noncore/multimedia/tonleiter/tonleiter.pro index 4bd1bc2..4be3bef 100644 --- a/noncore/multimedia/tonleiter/tonleiter.pro +++ b/noncore/multimedia/tonleiter/tonleiter.pro @@ -1,13 +1,11 @@ TEMPLATE = app -#CONFIG = qt warn_on CONFIG = qt warn_on HEADERS = mainwidget.h tonleiterdata.h tonleiterdatahelper.h fretboard.h menuwidget.h editinst.h editstringwidget.h editscale.h pianoscale.h SOURCES = mainwidget.cpp tonleiterdata.cpp tonleiterdatahelper.cpp fretboard.cpp menuwidget.cpp main.cpp editinst.cpp editstringwidget.cpp editscale.cpp pianoscale.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -INTERFACES = +LIBS += -lqpe -lopiecore2 TARGET = tonleiter DESTDIR = $(OPIEDIR)/bin -#TMAKE_CXXFLAGS += -DQT_QWS_VERCEL_IDR -DQWS -fno-exceptions -fno-rtti + include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/multimedia/tonleiter/tonleiterdata.cpp b/noncore/multimedia/tonleiter/tonleiterdata.cpp index 33b3c49..564b7f0 100644 --- a/noncore/multimedia/tonleiter/tonleiterdata.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdata.cpp @@ -1,10 +1,11 @@ #include "tonleiterdata.h" - -#include <qpe/config.h> - using namespace Data; +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +using namespace Opie::Core; TonleiterData::TonleiterData(QObject* parent) :QObject(parent) { @@ -151,9 +152,9 @@ Instrument TonleiterData::getInstrument(int id) if(id>=0 && id<noOfInstruments()) return instruments[id]; else { - qDebug("undefined insrtument %d of %d",id,instruments.count()); + odebug << "undefined insrtument " << id << " of " << instruments.count() << "" << oendl; return Instrument(); } } @@ -173,9 +174,9 @@ Scale TonleiterData::getScale(int id) if(id>=0 && id<noOfScales()) return scales[id]; else { - qDebug("Undefined scale"); + odebug << "Undefined scale" << oendl; return Scale(); } } //**************************************************************************** diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp index d904a71..285d2c1 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp @@ -33,9 +33,9 @@ int Note::getNoteFromName(QString name,int octave) int Note::octaveOfBaseNote(int base,int note) { int normnote = (note>=base) ? note-base : (12-base)+note; int octave=getOctaveOfNote(normnote); - //qDebug("note %d of %d base is norm %d -> ocatve %d",note,base,normnote,octave); + //odebug << "note " << note << " of " << base << " base is norm " << normnote << " -> ocatve " << octave << "" << oendl; return octave; } //**************************************************************************** //**************************************************************************** @@ -130,14 +130,14 @@ bool Scale::noteInScale(int base,int note) int normnote = (note>=base) ? note-base : (12-base)+note; if(halftones.contains(normnote)>0) { - //qDebug("OK : base : %d, note %d -> norm %d",base,note,normnote); + //odebug << "OK : base : " << base << ", note " << note << " -> norm " << normnote << "" << oendl; return true; } else { - //qDebug("BAD : base : %d, note %d -> norm %d",base,note,normnote); + //odebug << "BAD : base : " << base << ", note " << note << " -> norm " << normnote << "" << oendl; return false; } } //**************************************************************************** diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 54d2da2..ae28313 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp @@ -77,9 +77,9 @@ void POP3viewItem::refresh() } RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) { - qDebug( "POP3 fetchBody" ); + odebug << "POP3 fetchBody" << oendl; return wrapper->fetchBody( mail ); } QPopupMenu * POP3viewItem::getContextMenu() @@ -268,9 +268,9 @@ void NNTPviewItem::refresh() } RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail ) { - qDebug( "NNTP fetchBody" ); + odebug << "NNTP fetchBody" << oendl; return wrapper->fetchBody( mail ); } QPopupMenu * NNTPviewItem::getContextMenu() @@ -459,9 +459,9 @@ void IMAPviewItem::refreshFolders(bool force) if ((*it)->getDisplayName().lower()=="inbox") { item = new IMAPfolderItem( (*it), this , item ); folders->remove(it); - qDebug("inbox found"); + odebug << "inbox found" << oendl; break; } } for ( it = folders->begin(); it!=folders->end(); ++it) @@ -532,9 +532,9 @@ void IMAPviewItem::createNewFolder() } void IMAPviewItem::contextMenuSelected(int id) { - qDebug("Id selected: %i",id); + odebug << "Id selected: " << id << "" << oendl; switch (id) { case 0: refreshFolders(true); @@ -670,9 +670,9 @@ void IMAPfolderItem::deleteFolder() int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName), QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (imap->getWrapper()->deleteMbox(folder)) { @@ -697,9 +697,9 @@ void IMAPfolderItem::downloadMails() } void IMAPfolderItem::contextMenuSelected(int id) { - qDebug("Selected id: %i",id); + odebug << "Selected id: " << id << "" << oendl; AccountView * view = (AccountView*)listView(); switch(id) { case 0: @@ -801,9 +801,9 @@ void MHviewItem::refresh(bool force) } RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) { - qDebug( "MH fetchBody" ); + odebug << "MH fetchBody" << oendl; return wrapper->fetchBody( mail ); } QPopupMenu * MHviewItem::getContextMenu() @@ -931,9 +931,9 @@ void MHfolderItem::deleteFolder() int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName), QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (mbox->getWrapper()->deleteMbox(folder)) { @@ -1073,9 +1073,9 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder) QObject::tr("<center>Realy delete all mails in box <br>%1</center>",contextName). arg(fname), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (wrapper->deleteAllMail(folder)) { diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index f0a163e..0052061 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -65,22 +65,22 @@ void AccountView::populate( QList<Account> list ) { if ( it->getType() == MAILLIB::A_IMAP ) { IMAPaccount *imap = static_cast<IMAPaccount *>(it); - qDebug( "added IMAP " + imap->getAccountName() ); + odebug << "added IMAP " + imap->getAccountName() << oendl; imapAccounts.append(new IMAPviewItem( imap, this )); } else if ( it->getType() == MAILLIB::A_POP3 ) { POP3account *pop3 = static_cast<POP3account *>(it); - qDebug( "added POP3 " + pop3->getAccountName() ); + odebug << "added POP3 " + pop3->getAccountName() << oendl; /* must not be hold 'cause it isn't required */ (void) new POP3viewItem( pop3, this ); } else if ( it->getType() == MAILLIB::A_NNTP ) { NNTPaccount *nntp = static_cast<NNTPaccount *>(it); - qDebug( "added NNTP " + nntp->getAccountName() ); + odebug << "added NNTP " + nntp->getAccountName() << oendl; /* must not be hold 'cause it isn't required */ (void) new NNTPviewItem( nntp, this ); } } @@ -88,9 +88,9 @@ void AccountView::populate( QList<Account> list ) void AccountView::refresh(QListViewItem *item) { - qDebug("AccountView refresh..."); + odebug << "AccountView refresh..." << oendl; if ( item ) { m_currentItem = item; QValueList<RecMailP> headerlist; @@ -161,10 +161,10 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe QMessageBox::critical(0,tr("Error creating new Folder"), tr("<center>Error while creating<br>new folder - breaking.</center>")); return; } - qDebug("Targetfolder: %s",targetFolder.latin1()); - qDebug("Fromfolder: %s",fromFolder->getName().latin1()); + odebug << "Targetfolder: " << targetFolder.latin1() << "" << oendl; + odebug << "Fromfolder: " << fromFolder->getName().latin1() << "" << oendl; fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); refreshCurrent(); } diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 988a1d9..fa703c4 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp @@ -182,9 +182,9 @@ void ComposeMail::removeAttachment() void ComposeMail::accept() { if ( checkBoxLater->isChecked() ) { - qDebug( "Send later" ); + odebug << "Send later" << oendl; } #if 0 qDebug( "Sending Mail with " + @@ -255,9 +255,9 @@ void ComposeMail::reject() if ( !sigMultiLine->text().isEmpty() ) { txt.append( "\n--\n" ); txt.append( sigMultiLine->text() ); } - qDebug(txt); + odebug << txt << oendl; mail->setMessage( txt ); /* only use the default drafts folder name! */ Storemail wrapper(AbstractMail::draftFolder()); @@ -291,9 +291,9 @@ void ComposeMail::reEditMail(const RecMailP¤t) AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) : QListViewItem( parent ) { attachment = att; - qDebug( att->getMimeType() ); + odebug << att->getMimeType() << oendl; setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? Resource::loadPixmap( "UnknownDocument-14" ) : attachment->getDocLnk().pixmap() ); setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 5c4bdf7..de064ca 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp @@ -39,9 +39,9 @@ AccountListItem::AccountListItem( QListView *parent, Account *a) EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) : EditAccountsUI( parent, name, modal, flags ) { - qDebug( "New Account Configuration Widget" ); + odebug << "New Account Configuration Widget" << oendl; settings = s; mailList->addColumn( tr( "Account" ) ); mailList->addColumn( tr( "Type" ) ); @@ -79,9 +79,9 @@ void EditAccounts::slotFillLists() } void EditAccounts::slotNewMail() { - qDebug( "New Mail Account" ); + odebug << "New Mail Account" << oendl; QString *selection = new QString(); SelectMailType selType( selection, this, 0, true ); selType.show(); if ( QDialog::Accepted == selType.exec() ) @@ -93,9 +93,9 @@ void EditAccounts::slotNewMail() void EditAccounts::slotNewAccount( const QString &type ) { if ( type.compare( "IMAP" ) == 0 ) { - qDebug( "-> config IMAP" ); + odebug << "-> config IMAP" << oendl; IMAPaccount *account = new IMAPaccount(); IMAPconfig imap( account, this, 0, true ); if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) ) { @@ -109,9 +109,9 @@ void EditAccounts::slotNewAccount( const QString &type ) } } else if ( type.compare( "POP3" ) == 0 ) { - qDebug( "-> config POP3" ); + odebug << "-> config POP3" << oendl; POP3account *account = new POP3account(); POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) ) { @@ -125,9 +125,9 @@ void EditAccounts::slotNewAccount( const QString &type ) } } else if ( type.compare( "SMTP" ) == 0 ) { - qDebug( "-> config SMTP" ); + odebug << "-> config SMTP" << oendl; SMTPaccount *account = new SMTPaccount(); SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) ) { @@ -142,9 +142,9 @@ void EditAccounts::slotNewAccount( const QString &type ) } } else if ( type.compare( "NNTP" ) == 0 ) { - qDebug( "-> config NNTP" ); + odebug << "-> config NNTP" << oendl; NNTPaccount *account = new NNTPaccount(); NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) ) { @@ -211,9 +211,9 @@ void EditAccounts::slotDeleteAccount( Account *account ) } void EditAccounts::slotEditMail() { - qDebug( "Edit Mail Account" ); + odebug << "Edit Mail Account" << oendl; if ( !mailList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), tr( "<p>Please select an account.</p>" ), @@ -240,15 +240,15 @@ void EditAccounts::slotDeleteMail() } void EditAccounts::slotNewNews() { - qDebug( "New News Account" ); + odebug << "New News Account" << oendl; slotNewAccount( "NNTP" ); } void EditAccounts::slotEditNews() { - qDebug( "Edit News Account" ); + odebug << "Edit News Account" << oendl; if ( !newsList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), tr( "<p>Please select an account.</p>" ), @@ -261,9 +261,9 @@ void EditAccounts::slotEditNews() } void EditAccounts::slotDeleteNews() { - qDebug( "Delete News Account" ); + odebug << "Delete News Account" << oendl; if ( !newsList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), tr( "<p>Please select an account.</p>" ), @@ -577,9 +577,9 @@ void NNTPconfig::save() QStringList groupList; for ( ; list_it.current(); ++list_it ) { if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { - qDebug(list_it.current()->text(0) ); + odebug << list_it.current()->text(0) << oendl; groupList.append( list_it.current()->text(0) ); } } diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 6bebb7b..1a26351 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp @@ -51,9 +51,9 @@ AbstractMail* AbstractMail::getWrapper(Account*a) } encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) { - qDebug("Decode string start"); + odebug << "Decode string start" << oendl; char*result_text; size_t index = 0; /* reset for recursive use! */ size_t target_length = 0; @@ -75,9 +75,9 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin encodedString* result = new encodedString(); if (err == MAILIMF_NO_ERROR) { result->setContent(result_text,target_length); } - qDebug("Decode string finished"); + odebug << "Decode string finished" << oendl; return result; } QString AbstractMail::convert_String(const char*text) @@ -90,12 +90,12 @@ QString AbstractMail::convert_String(const char*text) /* due a bug in libetpan it isn't usable this moment */ /* int err = mailmime_encoded_phrase_parse("iso-8859-1", text, strlen(text),&index, "iso-8859-1",&res);*/ - //qDebug("Input: %s",text); + //odebug << "Input: " << text << "" << oendl; if (err == MAILIMF_NO_ERROR && res && strlen(res)) { // result = QString(res); -// qDebug("Res: %s, length: %i",res,strlen(res)); +// odebug << "Res: " << res << ", length: " << strlen(res) << "" << oendl; } if (res) free(res); return result; } diff --git a/noncore/net/mail/libmailwrapper/generatemail.cpp b/noncore/net/mail/libmailwrapper/generatemail.cpp index cb58d82..36ec232 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.cpp +++ b/noncore/net/mail/libmailwrapper/generatemail.cpp @@ -96,9 +96,9 @@ mailimf_address_list *Generatemail::parseAddresses(const QString&addr ) { if (!literal_open) { s = addr.mid(startpos,i-startpos); if (!s.isEmpty()) { list.append(s); - qDebug("Appended %s",s.latin1()); + odebug << "Appended " << s.latin1() << "" << oendl; } // !!!! this is a MUST BE! startpos = ++i; } @@ -109,18 +109,18 @@ mailimf_address_list *Generatemail::parseAddresses(const QString&addr ) { } s = addr.mid(startpos,i-startpos); if (!s.isEmpty()) { list.append(s); - qDebug("Appended %s",s.latin1()); + odebug << "Appended " << s.latin1() << "" << oendl; } QStringList::Iterator it; for ( it = list.begin(); it != list.end(); it++ ) { int err = mailimf_address_list_add_parse( addresses, (char*)(*it).latin1() ); if ( err != MAILIMF_NO_ERROR ) { - qDebug( "Error parsing" ); - qDebug( *it ); + odebug << "Error parsing" << oendl; + odebug << *it << oendl; } else { - qDebug( "Parse success! %s",(*it).latin1()); + odebug << "Parse success! " << (*it).latin1() << "" << oendl; } } return addresses; } @@ -174,9 +174,9 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet } else { err = mailmime_set_body_text(filePart,strdup(TextContent.data()),TextContent.length()); } if (err != MAILIMF_NO_ERROR) { - qDebug("Error setting body with file %s",file); + odebug << "Error setting body with file " << file << "" << oendl; mailmime_free( filePart ); filePart = 0; } } @@ -205,25 +205,25 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet void Generatemail::addFileParts( mailmime *message,const QList<Attachment>&files ) { const Attachment *it; unsigned int count = files.count(); - qDebug("List contains %i values",count); + odebug << "List contains " << count << " values" << oendl; for ( unsigned int i = 0; i < count; ++i ) { - qDebug( "Adding file" ); + odebug << "Adding file" << oendl; mailmime *filePart; int err; it = ((QList<Attachment>)files).at(i); filePart = buildFilePart( it->getFileName(), it->getMimeType(),"" ); if ( filePart == NULL ) { - qDebug( "addFileParts: error adding file:" ); - qDebug( it->getFileName() ); + odebug << "addFileParts: error adding file:" << oendl; + odebug << it->getFileName() << oendl; continue; } err = mailmime_smart_add_part( message, filePart ); if ( err != MAILIMF_NO_ERROR ) { mailmime_free( filePart ); - qDebug("error smart add"); + odebug << "error smart add" << oendl; } } } @@ -269,9 +269,9 @@ err_free_content: mailmime_content_free( content ); err_free_param: mailmime_parameter_free( param ); err_free: - qDebug( "buildTxtPart - error" ); + odebug << "buildTxtPart - error" << oendl; return NULL; // Error :( } @@ -344,17 +344,17 @@ mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Ma c_reply = (char*)malloc( (nsize+1)*sizeof(char)); memset(c_reply,0,nsize+1); memcpy(c_reply,h.latin1(),nsize); clist_append(in_reply_to,c_reply); - qDebug("In reply to: %s",c_reply); + odebug << "In reply to: " << c_reply << "" << oendl; } } if (res) { fields = mailimf_fields_new_with_data( from, sender, reply, to, cc, bcc, in_reply_to, NULL, subject ); if ( fields == NULL ) { - qDebug("Error creating mailimf fields"); + odebug << "Error creating mailimf fields" << oendl; res = 0; } } if (res) xmailer = mailimf_field_new_custom( strdup( "User-Agent" ), @@ -434,9 +434,9 @@ err_free_message: mailmime_free( message ); err_free_fields: mailimf_fields_free( fields ); err_free: - qDebug( "createMimeMail: error" ); + odebug << "createMimeMail: error" << oendl; return NULL; // Error :( } diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 0c68280..fae4c99 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp @@ -134,9 +134,9 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) { if (current_rec >= 10) { - qDebug("too deep recursion!"); + odebug << "too deep recursion!" << oendl; } if (!message || !mime) { return; } @@ -271,9 +271,9 @@ QString Genericwrapper::parseAddressList( mailimf_address_list *list ) case MAILIMF_ADDRESS_GROUP: result.append( parseGroup( addr->ad_data.ad_group ) ); break; default: - qDebug( "Generic: unkown mailimf address type" ); + odebug << "Generic: unkown mailimf address type" << oendl; break; } } @@ -364,9 +364,9 @@ void Genericwrapper::cleanMimeCache() //it.setValue(0); if (t) delete t; } bodyCache.clear(); - qDebug("Genericwrapper: cache cleaned"); + odebug << "Genericwrapper: cache cleaned" << oendl; } QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) { @@ -393,14 +393,14 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & int r; mailmessage_list * env_list = 0; r = mailsession_get_messages_list(session,&env_list); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; return; } r = mailsession_get_envelopes_list(session, env_list); if (r != MAIL_NO_ERROR) { - qDebug("Error filling message list"); + odebug << "Error filling message list" << oendl; if (env_list) { mailmessage_list_free(env_list); } return; @@ -412,9 +412,9 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & mailmessage * msg; QBitArray mFlags(7); msg = (mailmessage*)carray_get(env_list->msg_tab, i); if (msg->msg_fields == NULL) { - //qDebug("could not fetch envelope of message %i", i); + //odebug << "could not fetch envelope of message " << i << "" << oendl; continue; } RecMailP mail = new RecMail(); mail->setWrapper(this); @@ -447,9 +447,9 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & mail->setDate( parseDateTime( single_fields.fld_orig_date->dt_date_time ) ); // crashes when accessing pop3 account? if (single_fields.fld_message_id->mid_value) { mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); - qDebug("Msgid == %s",mail->Msgid().latin1()); + odebug << "Msgid == " << mail->Msgid().latin1() << "" << oendl; } if (single_fields.fld_reply_to) { QStringList t = parseAddressList(single_fields.fld_reply_to->rt_addr_list); diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 657c2ba..35468fe 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -29,9 +29,9 @@ int IMAPwrapper::selectMbox(const QString&mbox) return MAILIMAP_NO_ERROR; } int err = mailimap_select( m_imap, (char*)mbox.latin1()); if ( err != MAILIMAP_NO_ERROR ) { - qDebug("error selecting mailbox: %s",m_imap->imap_response); + odebug << "error selecting mailbox: " << m_imap->imap_response << "" << oendl; m_Lastmbox = ""; return err; } m_Lastmbox = mbox; @@ -40,9 +40,9 @@ int IMAPwrapper::selectMbox(const QString&mbox) void IMAPwrapper::imap_progress( size_t current, size_t maximum ) { qApp->processEvents(); - qDebug( "IMAP: %i of %i", current, maximum ); + odebug << "IMAP: " << current << " of " << maximum << "" << oendl; } bool IMAPwrapper::start_tls(bool force_tls) { @@ -52,9 +52,9 @@ bool IMAPwrapper::start_tls(bool force_tls) err = mailimap_capability(m_imap,&cap_data); if (err != MAILIMAP_NO_ERROR) { Global::statusMessage("error getting capabilities!"); - qDebug("error getting capabilities!"); + odebug << "error getting capabilities!" << oendl; return false; } clistiter * cur; for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { @@ -73,9 +73,9 @@ bool IMAPwrapper::start_tls(bool force_tls) if (try_tls) { err = mailimap_starttls(m_imap); if (err != MAILIMAP_NO_ERROR && force_tls) { Global::statusMessage(tr("Server has no TLS support!")); - qDebug("Server has no TLS support!"); + odebug << "Server has no TLS support!" << oendl; try_tls = false; } else { mailstream_low * low; mailstream_low * new_low; @@ -124,9 +124,9 @@ void IMAPwrapper::login() user = login.getUser().latin1(); pass = login.getPassword().latin1(); } else { // cancel - qDebug( "IMAP: Login canceled" ); + odebug << "IMAP: Login canceled" << oendl; return; } } else { user = account->getUser().latin1(); @@ -147,9 +147,9 @@ void IMAPwrapper::login() force_tls = true; } if ( ssl ) { - qDebug( "using ssl" ); + odebug << "using ssl" << oendl; err = mailimap_ssl_connect( m_imap, (char*)server, port ); } else { err = mailimap_socket_connect( m_imap, (char*)server, port ); } @@ -175,9 +175,9 @@ void IMAPwrapper::login() bool ok = true; if (force_tls && !try_tls) { Global::statusMessage(tr("Server has no TLS support!")); - qDebug("Server has no TLS support!"); + odebug << "Server has no TLS support!" << oendl; ok = false; } @@ -316,9 +316,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() } folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); } } else { - qDebug("error fetching folders: %s",m_imap->imap_response); + odebug << "error fetching folders: " << m_imap->imap_response << "" << oendl; } mailimap_list_result_free( result ); /* @@ -326,9 +326,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() */ mask = "*" ; path = account->getPrefix().latin1(); if (!path) path = ""; - qDebug(path); + odebug << path << oendl; err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); if ( err == MAILIMAP_NO_ERROR ) { current = result->first; for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { @@ -353,9 +353,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() del = list->mb_delimiter; folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); } } else { - qDebug("error fetching folders %s",m_imap->imap_response); + odebug << "error fetching folders " << m_imap->imap_response << "" << oendl; } if (result) mailimap_list_result_free( result ); return folders; } @@ -465,10 +465,10 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { #if 0 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); - qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); - qDebug(da.toString()); + odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; + odebug << da.toString() << oendl; #endif } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { size = item->att_data.att_static->att_data.att_rfc822_size; } @@ -523,9 +523,9 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) QValueList<int> path; body_desc = item->att_data.att_static->att_data.att_body; traverseBody(mail,body_desc,body,0,path); } else { - qDebug("error fetching body: %s",m_imap->imap_response); + odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; } if (result) mailimap_fetch_list_free(result); return body; } @@ -635,9 +635,9 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int } } } } else { - qDebug("error fetching text: %s",m_imap->imap_response); + odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; } if (result) mailimap_fetch_list_free(result); return res; } @@ -662,9 +662,9 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t for (unsigned int j = 0; j < countlist.count();++j) { id+=(j>0?" ":""); id+=QString("%1").arg(countlist[j]); } - qDebug("ID = %s",id.latin1()); + odebug << "ID = " << id.latin1() << "" << oendl; currentPart->setIdentifier(id); fillSinglePart(currentPart,part1); /* important: Check for is NULL 'cause a body can be empty! And we put it only into the mail if it is the FIRST part */ @@ -703,9 +703,9 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t for (unsigned int j = 0; j < countlist.count();++j) { id+=(j>0?" ":""); id+=QString("%1").arg(countlist[j]); } - qDebug("ID(mpart) = %s",id.latin1()); + odebug << "ID(mpart) = " << id.latin1() << "" << oendl; } traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); if (current_body->bd_type==MAILIMAP_BODY_MPART) { countlist = recList; @@ -747,9 +747,9 @@ void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_tex return; } QString sub; sub = which->bd_media_text; - qDebug("Type= text/%s",which->bd_media_text); + odebug << "Type= text/" << which->bd_media_text << "" << oendl; target_part->setSubtype(sub.lower()); target_part->setLines(which->bd_lines); fillBodyFields(target_part,which->bd_fields); } @@ -759,9 +759,9 @@ void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg* if (!which) { return; } target_part->setSubtype("rfc822"); - qDebug("Message part"); + odebug << "Message part" << oendl; /* we set this type to text/plain */ target_part->setLines(which->bd_lines); fillBodyFields(target_part,which->bd_fields); } @@ -818,9 +818,9 @@ void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_ba sub = which->bd_media_basic->med_subtype; } else { sub = ""; } - qDebug("Type = %s/%s",type.latin1(),sub.latin1()); + odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; target_part->setType(type.lower()); target_part->setSubtype(sub.lower()); fillBodyFields(target_part,which->bd_fields); } @@ -894,18 +894,18 @@ void IMAPwrapper::deleteMail(const RecMailP&mail) mailimap_set_free( set ); mailimap_store_att_flags_free(store_flags); if (err != MAILIMAP_NO_ERROR) { - qDebug("error deleting mail: %s",m_imap->imap_response); + odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; return; } - qDebug("deleting mail: %s",m_imap->imap_response); + odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; /* should we realy do that at this moment? */ err = mailimap_expunge(m_imap); if (err != MAILIMAP_NO_ERROR) { - qDebug("error deleting mail: %s",m_imap->imap_response); + odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; } - qDebug("Delete successfull %s",m_imap->imap_response); + odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; } void IMAPwrapper::answeredMail(const RecMailP&mail) { @@ -929,9 +929,9 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) mailimap_set_free( set ); mailimap_store_att_flags_free(store_flags); if (err != MAILIMAP_NO_ERROR) { - qDebug("error marking mail: %s",m_imap->imap_response); + odebug << "error marking mail: " << m_imap->imap_response << "" << oendl; return; } } @@ -997,16 +997,16 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder) if (err != MAILIMAP_NO_ERROR) { Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); return 0; } - qDebug("deleting mail: %s",m_imap->imap_response); + odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; /* should we realy do that at this moment? */ err = mailimap_expunge(m_imap); if (err != MAILIMAP_NO_ERROR) { Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); return 0; } - qDebug("Delete successfull %s",m_imap->imap_response); + odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; return 1; } int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,const QString& delemiter,bool getsubfolder) @@ -1029,9 +1029,9 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons Global::statusMessage(tr("Cannot create folder %1 for holding subfolders").arg(pre)); return 0; } } - qDebug("Creating %s",pre.latin1()); + odebug << "Creating " << pre.latin1() << "" << oendl; int res = mailimap_create(m_imap,pre.latin1()); if (res != MAILIMAP_NO_ERROR) { Global::statusMessage(tr("%1").arg(m_imap->imap_response)); return 0; @@ -1088,9 +1088,9 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) break; } } } else { - qDebug("Error retrieving status"); + odebug << "Error retrieving status" << oendl; } if (status) mailimap_mailbox_data_status_free(status); if (att_list) mailimap_status_att_list_free(att_list); } @@ -1112,9 +1112,9 @@ MAILLIB::ATYPE IMAPwrapper::getType()const } const QString&IMAPwrapper::getName()const { - qDebug("Get name: %s",account->getAccountName().latin1()); + odebug << "Get name: " << account->getAccountName().latin1() << "" << oendl; return account->getAccountName(); } encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) @@ -1128,9 +1128,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { if (targetWrapper != this) { AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); - qDebug("Using generic"); + odebug << "Using generic" << oendl; return; } mailimap_set *set = 0; login(); @@ -1147,9 +1147,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, mailimap_set_free( set ); if ( err != MAILIMAP_NO_ERROR ) { QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); Global::statusMessage(error_msg); - qDebug(error_msg); + odebug << error_msg << oendl; return; } if (moveit) { deleteAllMail(fromFolder); @@ -1158,9 +1158,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); return; } mailimap_set *set = 0; @@ -1177,9 +1177,9 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra mailimap_set_free( set ); if ( err != MAILIMAP_NO_ERROR ) { QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); Global::statusMessage(error_msg); - qDebug(error_msg); + odebug << error_msg << oendl; return; } if (moveit) { deleteMail(mail); diff --git a/noncore/net/mail/libmailwrapper/logindialog.cpp b/noncore/net/mail/libmailwrapper/logindialog.cpp index 01d177e..c9ae190 100644 --- a/noncore/net/mail/libmailwrapper/logindialog.cpp +++ b/noncore/net/mail/libmailwrapper/logindialog.cpp @@ -23,7 +23,7 @@ void LoginDialog::accept() //_pass.replace( 0, _pass.length(), passLine->text() ); _user = userLine->text(); _pass = passLine->text(); - qDebug("User im accept: |%s|",_user.latin1()); + odebug << "User im accept: |" << _user.latin1() << "|" << oendl; QDialog::accept(); } diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 90b8865..6d44db4 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -12,9 +12,9 @@ RecMail::RecMail(const RecMail&old) :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) { init(); copy_old(old); - qDebug("Copy constructor RecMail"); + odebug << "Copy constructor RecMail" << oendl; } RecMail::~RecMail() { @@ -130,9 +130,9 @@ RecPart::RecPart(const RecPart&old) m_lines = old.m_lines; m_size = old.m_size; m_Parameters = old.m_Parameters; m_poslist = old.m_poslist; - qDebug("RecPart copy constructor"); + odebug << "RecPart copy constructor" << oendl; } RecPart::~RecPart() { @@ -254,9 +254,9 @@ RecBody::RecBody(const RecBody&old) { m_BodyText = old.m_BodyText; m_PartsList = old.m_PartsList; m_description = old.m_description; - qDebug("Recbody copy constructor"); + odebug << "Recbody copy constructor" << oendl; } RecBody::~RecBody() { @@ -319,16 +319,16 @@ encodedString::encodedString(char*nContent,unsigned int nSize) encodedString::encodedString(const encodedString&old) { init(); copy_old(old); - qDebug("encodedeString: copy constructor!"); + odebug << "encodedeString: copy constructor!" << oendl; } encodedString& encodedString::operator=(const encodedString&old) { init(); copy_old(old); - qDebug("encodedString: assign operator!"); + odebug << "encodedString: assign operator!" << oendl; return *this; } encodedString::~encodedString() diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index eddc0b9..2b0d112 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp @@ -50,9 +50,9 @@ IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no { // Decode IMAP foldername nameDisplay = IMAPFolder::decodeFolderName( name ); /* - qDebug( "folder " + name + " - displayed as " + nameDisplay ); + odebug << "folder " + name + " - displayed as " + nameDisplay << oendl; */ prefix = aprefix; if (prefix.length()>0) { diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index e3c75f3..df2112f 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp @@ -30,9 +30,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta mailfolder*folder; folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return; } @@ -69,16 +69,16 @@ void MBOXwrapper::deleteMail(const RecMailP & mail) mailfolder*folder; folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return; } r = mailsession_remove_message(folder->fld_session,mail->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; } mailfolder_free(folder); mailstorage_free(storage); } @@ -101,23 +101,23 @@ RecBodyP MBOXwrapper::fetchBody( const RecMailP &mail ) mailfolder*folder; folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return body; } r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; mailfolder_free(folder); mailstorage_free(storage); return body; } r = mailmessage_fetch(msg,&data,&size); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; mailfolder_free(folder); mailstorage_free(storage); mailmessage_free(msg); return body; @@ -131,9 +131,9 @@ RecBodyP MBOXwrapper::fetchBody( const RecMailP &mail ) } void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) { - qDebug("MBOX %i von %i",current,maximum); + odebug << "MBOX " << current << " von " << maximum << "" << oendl; } int MBOXwrapper::createMbox(const QString&folder,const FolderP&,const QString&,bool ) { @@ -219,9 +219,9 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> p+=mailbox; mailmbox_folder*f = 0; int r = mailmbox_init(p.latin1(),0,1,0,&f); if (r != MAIL_NO_ERROR) { - qDebug("Error init folder"); + odebug << "Error init folder" << oendl; return; } deleteMails(f,target); mailmbox_done(f); @@ -234,14 +234,14 @@ void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &targ QValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it != target.end();++it) { r = mailmbox_delete_msg(f,(*it)->getNumber()); if (r!=MAILMBOX_NO_ERROR) { - qDebug("error delete mail"); + odebug << "error delete mail" << oendl; } } r = mailmbox_expunge(f); if (r != MAILMBOX_NO_ERROR) { - qDebug("error expunge mailbox"); + odebug << "error expunge mailbox" << oendl; } } int MBOXwrapper::deleteAllMail(const FolderP&tfolder) @@ -268,9 +268,9 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder) } if (res) { r = mailsession_get_messages_list(folder->fld_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; res=0; } } for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 12472e9..cd7cecb 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp @@ -15,9 +15,9 @@ MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) if (MHPath.length()>0) { if (MHPath[MHPath.length()-1]=='/') { MHPath=MHPath.left(MHPath.length()-1); } - qDebug(MHPath); + odebug << MHPath << oendl; QDir dir(MHPath); if (!dir.exists()) { dir.mkdir(MHPath); } @@ -32,17 +32,17 @@ void MHwrapper::init_storage() if (!m_storage) { m_storage = mailstorage_new(NULL); r = mh_mailstorage_init(m_storage,(char*)pre.latin1(),0,0,0); if (r != MAIL_NO_ERROR) { - qDebug("error initializing storage"); + odebug << "error initializing storage" << oendl; mailstorage_free(m_storage); m_storage = 0; return; } } r = mailstorage_connect(m_storage); if (r!=MAIL_NO_ERROR) { - qDebug("error connecting storage"); + odebug << "error connecting storage" << oendl; mailstorage_free(m_storage); m_storage = 0; } } @@ -69,9 +69,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm } QString f = buildPath(mailbox); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("listMessages: error selecting folder!"); + odebug << "listMessages: error selecting folder!" << oendl; return; } parseList(target,m_storage->sto_session,f); Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); @@ -89,9 +89,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() mail_list*flist = 0; clistcell*current=0; int r = mailsession_list_folders(m_storage->sto_session,NULL,&flist); if (r != MAIL_NO_ERROR || !flist) { - qDebug("error getting folder list"); + odebug << "error getting folder list" << oendl; return folders; } for (current=clist_begin(flist->mb_list);current!=0;current=clist_next(current)) { QString t = (char*)current->data; @@ -109,14 +109,14 @@ void MHwrapper::deleteMail(const RecMailP&mail) return; } int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return; } r = mailsession_remove_message(m_storage->sto_session,mail->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; } } void MHwrapper::answeredMail(const RecMailP&) @@ -139,9 +139,9 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) return body; } r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; return body; } body = parseMail(msg); mailmessage_fetch_result_free(msg,data); @@ -149,9 +149,9 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) } void MHwrapper::mbox_progress( size_t current, size_t maximum ) { - qDebug("MH %i von %i",current,maximum); + odebug << "MH " << current << " von " << maximum << "" << oendl; } QString MHwrapper::buildPath(const QString&p) { @@ -182,15 +182,15 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri f = pfolder->getName(); f+="/"; f+=folder; } - qDebug(f); + odebug << f << oendl; int r = mailsession_create_folder(m_storage->sto_session,(char*)f.latin1()); if (r != MAIL_NO_ERROR) { - qDebug("error creating folder %i",r); + odebug << "error creating folder " << r << "" << oendl; return 0; } - qDebug("Folder created"); + odebug << "Folder created" << oendl; return 1; } void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) @@ -201,14 +201,14 @@ void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) } QString f = buildPath(Folder); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return; } r = mailsession_append_message(m_storage->sto_session,(char*)msg,length); if (r!=MAIL_NO_ERROR) { - qDebug("error storing mail"); + odebug << "error storing mail" << oendl; } return; } @@ -223,9 +223,9 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) char*data=0; size_t size; int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return result; } r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { @@ -247,16 +247,16 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> & { QString f = buildPath(mailbox); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("deleteMails: error selecting folder!"); + odebug << "deleteMails: error selecting folder!" << oendl; return; } QValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it!=target.end();++it) { r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; break; } } } @@ -270,15 +270,15 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder) int res = 1; if (!tfolder) return 0; int r = mailsession_select_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return 0; } mailmessage_list*l=0; r = mailsession_get_messages_list(m_storage->sto_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; res = 0; } unsigned j = 0; for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { @@ -307,9 +307,9 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail box"); + odebug << "error deleting mail box" << oendl; return 0; } QString cmd = "rm -rf "+tfolder->getName(); QStringList command; @@ -325,12 +325,12 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) *process << command; removeMboxfailed = false; if(!process->start(OProcess::Block, OProcess::All) ) { - qDebug("could not start process"); + odebug << "could not start process" << oendl; return 0; } - qDebug("mail box deleted"); + odebug << "mail box deleted" << oendl; return 1; } void MHwrapper::processEnded(OProcess *p) @@ -377,26 +377,26 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract if (!m_storage) { return; } if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; Genericwrapper::mvcpMail(mail,targetFolder,targetWrapper,moveit); return; } - qDebug("Using internal routines for move/copy"); + odebug << "Using internal routines for move/copy" << oendl; QString tf = buildPath(targetFolder); int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r != MAIL_NO_ERROR) { - qDebug("Error selecting source mailbox"); + odebug << "Error selecting source mailbox" << oendl; return; } if (moveit) { r = mailsession_move_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); } else { r = mailsession_copy_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); } if (r != MAIL_NO_ERROR) { - qDebug("Error copy/moving mail internal (%i)",r); + odebug << "Error copy/moving mail internal (" << r << ")" << oendl; } } void MHwrapper::mvcpAllMails(const FolderP&fromFolder, @@ -406,23 +406,23 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, if (!m_storage) { return; } if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; Genericwrapper::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); return; } if (!fromFolder) return; int r = mailsession_select_folder(m_storage->sto_session,(char*)fromFolder->getName().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting source folder!"); + odebug << "error selecting source folder!" << oendl; return; } QString tf = buildPath(targetFolder); mailmessage_list*l=0; r = mailsession_get_messages_list(m_storage->sto_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; } unsigned j = 0; for(unsigned int i = 0 ; l!= 0 && i < carray_count(l->msg_tab) ; ++i) { mailmessage * msg; @@ -433,9 +433,9 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, } else { r = mailsession_copy_message(m_storage->sto_session,j,(char*)tf.latin1()); } if (r != MAIL_NO_ERROR) { - qDebug("Error copy/moving mail internal (%i)",r); + odebug << "Error copy/moving mail internal (" << r << ")" << oendl; break; } } if (l) mailmessage_list_free(l); diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index cfded43..5d5011a 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp @@ -28,9 +28,9 @@ NNTPwrapper::~NNTPwrapper() { } } void NNTPwrapper::nntp_progress( size_t current, size_t maximum ) { - qDebug( "NNTP: %i of %i", current, maximum ); + odebug << "NNTP: " << current << " of " << maximum << "" << oendl; } RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { @@ -45,9 +45,9 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { } mailmessage * mailmsg; if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) { - qDebug("Message to large: %i",mail->Msgsize()); + odebug << "Message to large: " << mail->Msgsize() << "" << oendl; return body; } QFile msg_cache(msgTempName); @@ -133,9 +133,9 @@ void NNTPwrapper::login() User = login.getUser().latin1(); Pass = login.getPassword().latin1(); } else { // cancel - qDebug( "NNTP: Login canceled" ); + odebug << "NNTP: Login canceled" << oendl; return; } } else { User = account->getUser().latin1(); @@ -170,9 +170,9 @@ void NNTPwrapper::login() err = mailstorage_connect( m_nntp ); if (err != NEWSNNTP_NO_ERROR) { - qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); + odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; // Global::statusMessage(tr("Error initializing folder")); mailstorage_free(m_nntp); m_nntp = 0; diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 5467547..c586c29 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp @@ -27,9 +27,9 @@ POP3wrapper::~POP3wrapper() { } } void POP3wrapper::pop3_progress( size_t current, size_t maximum ) { - qDebug( "POP3: %i of %i", current, maximum ); + odebug << "POP3: " << current << " of " << maximum << "" << oendl; } RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { int err = MAILPOP3_NO_ERROR; @@ -44,9 +44,9 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { } mailmessage * mailmsg; if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) { - qDebug("Message to large: %i",mail->Msgsize()); + odebug << "Message to large: " << mail->Msgsize() << "" << oendl; return body; } QFile msg_cache(msgTempName); @@ -129,9 +129,9 @@ void POP3wrapper::login() user = login.getUser().latin1(); pass = login.getPassword().latin1(); } else { // cancel - qDebug( "POP3: Login canceled" ); + odebug << "POP3: Login canceled" << oendl; return; } } else { user = account->getUser().latin1(); @@ -161,9 +161,9 @@ void POP3wrapper::login() err = mailstorage_connect(m_pop3); if (err != MAIL_NO_ERROR) { - qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); + odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; Global::statusMessage(tr("Error initializing folder")); mailstorage_free(m_pop3); m_pop3 = 0; } else { @@ -235,9 +235,9 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { return; int r = mailsession_status_folder(m_pop3->sto_session,0,&target_stat.message_count, &target_stat.message_recent,&target_stat.message_unseen); if (r != MAIL_NO_ERROR) { - qDebug("error getting folter status."); + odebug << "error getting folter status." << oendl; } } encodedString* POP3wrapper::fetchRawBody(const RecMailP&mail) { diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 2c81963..de36eeb 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp @@ -25,9 +25,9 @@ Settings::Settings() void Settings::checkDirectory() { if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { system( "mkdir -p $HOME/Applications/opiemail" ); - qDebug( "$HOME/Applications/opiemail created" ); + odebug << "$HOME/Applications/opiemail created" << oendl; } } QList<Account> Settings::getAccounts() @@ -53,30 +53,30 @@ void Settings::updateAccounts() QStringList::Iterator it; QStringList imap = dir.entryList( "imap-*" ); for ( it = imap.begin(); it != imap.end(); it++ ) { - qDebug( "Added IMAP account" ); + odebug << "Added IMAP account" << oendl; IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList pop3 = dir.entryList( "pop3-*" ); for ( it = pop3.begin(); it != pop3.end(); it++ ) { - qDebug( "Added POP account" ); + odebug << "Added POP account" << oendl; POP3account *account = new POP3account( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList smtp = dir.entryList( "smtp-*" ); for ( it = smtp.begin(); it != smtp.end(); it++ ) { - qDebug( "Added SMTP account" ); + odebug << "Added SMTP account" << oendl; SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList nntp = dir.entryList( "nntp-*" ); for ( it = nntp.begin(); it != nntp.end(); it++ ) { - qDebug( "Added NNTP account" ); + odebug << "Added NNTP account" << oendl; NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } @@ -178,9 +178,9 @@ void IMAPaccount::read() } void IMAPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); conf->setGroup( "IMAP Account" ); @@ -256,9 +256,9 @@ void POP3account::read() } void POP3account::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); conf->setGroup( "POP3 Account" ); @@ -338,9 +338,9 @@ void SMTPaccount::read() } void SMTPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); conf->setGroup( "SMTP Account" ); @@ -415,9 +415,9 @@ void NNTPaccount::read() } void NNTPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); conf->setGroup( "NNTP Account" ); diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index e2cea7a..ba78c3b 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp @@ -114,9 +114,9 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) { mailmessage_free(msg); if (r != MAIL_NO_ERROR || !data) { if (data) free(data); - qDebug("Error fetching mime..."); + odebug << "Error fetching mime..." << oendl; return; } msg = 0; if (later) { @@ -207,18 +207,18 @@ void SMTPwrapper::connect_server() return; } int err = MAILSMTP_NO_ERROR; - qDebug( "Servername %s at port %i", server, port ); + odebug << "Servername " << server << " at port " << port << "" << oendl; if ( ssl ) { - qDebug( "SSL session" ); + odebug << "SSL session" << oendl; err = mailsmtp_ssl_connect( m_smtp, server, port ); } else { - qDebug( "No SSL session" ); + odebug << "No SSL session" << oendl; err = mailsmtp_socket_connect( m_smtp, server, port ); } if ( err != MAILSMTP_NO_ERROR ) { - qDebug("Error init connection"); + odebug << "Error init connection" << oendl; failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); result = 0; } @@ -245,9 +245,9 @@ void SMTPwrapper::connect_server() failuretext = tr("Error init SMTP tls: %1").arg(mailsmtpError(err)); } if (result==1 && m_SmtpAccount->getLogin() ) { - qDebug("smtp with auth"); + odebug << "smtp with auth" << oendl; if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { // get'em LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true ); @@ -263,13 +263,13 @@ void SMTPwrapper::connect_server() } else { user = m_SmtpAccount->getUser().latin1(); pass = m_SmtpAccount->getPassword().latin1(); } - qDebug( "session->auth: %i", m_smtp->auth); + odebug << "session->auth: " << m_smtp->auth << "" << oendl; if (result) { err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); if ( err == MAILSMTP_NO_ERROR ) { - qDebug("auth ok"); + odebug << "auth ok" << oendl; } else { failuretext = tr("Authentification failed"); result = 0; } @@ -306,9 +306,9 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) if (!result) { storeFailedMail(data,size,failuretext); } else { - qDebug( "Mail sent." ); + odebug << "Mail sent." << oendl; storeMail(data,size,"Sent"); } return result; } @@ -318,15 +318,15 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later mailmime * mimeMail; mimeMail = createMimeMail(mail ); if ( mimeMail == NULL ) { - qDebug( "sendMail: error creating mime mail" ); + odebug << "sendMail: error creating mime mail" << oendl; } else { sendProgress = new progressMailSend(); sendProgress->show(); sendProgress->setMaxMails(1); smtpSend( mimeMail,later); - qDebug("Clean up done"); + odebug << "Clean up done" << oendl; sendProgress->hide(); delete sendProgress; sendProgress = 0; mailmime_free( mimeMail ); @@ -377,19 +377,19 @@ int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) { /* this is a special fun */ bool SMTPwrapper::flushOutbox() { bool returnValue = true; - qDebug("Sending the queue"); + odebug << "Sending the queue" << oendl; if (!m_SmtpAccount) { - qDebug("No smtp account given"); + odebug << "No smtp account given" << oendl; return false; } bool reset_user_value = false; QString localfolders = AbstractMail::defaultLocalfolder(); AbstractMail*wrap = AbstractMail::getWrapper(localfolders); if (!wrap) { - qDebug("memory error"); + odebug << "memory error" << oendl; return false; } QString oldPw, oldUser; QValueList<RecMailP> mailsToSend; @@ -397,9 +397,9 @@ bool SMTPwrapper::flushOutbox() { QString mbox("Outgoing"); wrap->listMessages(mbox,mailsToSend); if (mailsToSend.count()==0) { delete wrap; - qDebug("No mails to send"); + odebug << "No mails to send" << oendl; return false; } oldPw = m_SmtpAccount->getPassword(); diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index b78244d..51383f6 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp @@ -42,9 +42,9 @@ void StatusMail::initAccounts(QList<Account>&accounts) currentPop3Stat.message_count+=currentStat.message_count; } current->logout(); } - qDebug("Pop3 init count: %i",currentPop3Stat.message_count); + odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl; currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; lastPop3Stat.message_recent = currentPop3Stat.message_recent; lastPop3Stat.message_count = currentPop3Stat.message_count; @@ -71,12 +71,12 @@ void StatusMail::check_current_stat(folderStat&targetStat) currentImapStat.message_recent+=currentStat.message_recent; currentImapStat.message_count+=currentStat.message_count; } else if (it->getType() == MAILLIB::A_POP3) { currentPop3Stat.message_count+=currentStat.message_count; - qDebug("Pop3 count: %i",currentPop3Stat.message_count); + odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl; } } - qDebug("Pop3 last: %i",lastPop3Stat.message_count); + odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl; if (currentPop3Stat.message_count > lastPop3Stat.message_count) { currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; currentPop3Stat.message_unseen = currentPop3Stat.message_recent; } else { diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 914a11d..546d756 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp @@ -57,9 +57,9 @@ int Storemail::storeMail(const Opie::Core::OSmartPointer<Mail>&mail) mailmime * mimeMail = 0; mimeMail = createMimeMail(mail ); if ( mimeMail == NULL ) { - qDebug( "storeMail: error creating mime mail" ); + odebug << "storeMail: error creating mime mail" << oendl; return 0; } char *data; size_t size; @@ -72,9 +72,9 @@ int Storemail::storeMail(const Opie::Core::OSmartPointer<Mail>&mail) mime_message_detach_mime(msg); mailmessage_free(msg); msg = 0; if (r != MAIL_NO_ERROR || !data) { - qDebug("Error fetching mime..."); + odebug << "Error fetching mime..." << oendl; ret = 0; } if (ret) { diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index c23ad3f..4c87d64 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -140,9 +140,9 @@ MainWindow::~MainWindow() } void MainWindow::appMessage(const QCString &, const QByteArray &) { - qDebug("appMessage not reached"); + odebug << "appMessage not reached" << oendl; } void MainWindow::slotAdjustLayout() { @@ -174,34 +174,34 @@ void MainWindow::slotEditSettings() } void MainWindow::slotShowFolders( bool ) { - qDebug( "slotShowFolders not reached" ); + odebug << "slotShowFolders not reached" << oendl; } void MainWindow::refreshMailView(const QValueList<RecMailP>&) { - qDebug( "refreshMailView not reached" ); + odebug << "refreshMailView not reached" << oendl; } void MainWindow::mailLeftClicked(int, QListViewItem *,const QPoint&,int ) { - qDebug( "mailLeftClicked not reached" ); + odebug << "mailLeftClicked not reached" << oendl; } void MainWindow::displayMail() { - qDebug("displayMail not reached"); + odebug << "displayMail not reached" << oendl; } void MainWindow::slotDeleteMail() { - qDebug("deleteMail not reached"); + odebug << "deleteMail not reached" << oendl; } void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) { - qDebug("mailHold not reached"); + odebug << "mailHold not reached" << oendl; } void MainWindow::slotSendQueued() { diff --git a/noncore/net/mail/nntpgroups.cpp b/noncore/net/mail/nntpgroups.cpp index 8741c4b..3243ee3 100644 --- a/noncore/net/mail/nntpgroups.cpp +++ b/noncore/net/mail/nntpgroups.cpp @@ -52,9 +52,9 @@ void NNTPGroups::storeValues() QListViewItemIterator list_it( GroupListView ); subscribedGroups.clear(); for ( ; list_it.current(); ++list_it ) { if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { - qDebug(list_it.current()->text(0) ); + odebug << list_it.current()->text(0) << oendl; subscribedGroups.append( list_it.current()->text(0) ); } } subscribedGroups+=subscribedGroupsNotListed; diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 5da2161..0669b5a 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -66,15 +66,15 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email) } void OpieMail::slotComposeMail() { - qDebug( "Compose Mail" ); + odebug << "Compose Mail" << oendl; slotwriteMail(0l,0l); } void OpieMail::slotSendQueued() { - qDebug( "Send Queued" ); + odebug << "Send Queued" << oendl; SMTPaccount *smtp = 0; QList<Account> list = settings->getAccounts(); QList<SMTPaccount> smtpList; @@ -119,9 +119,9 @@ void OpieMail::slotSendQueued() } void OpieMail::slotSearchMails() { - qDebug( "Search Mails" ); + odebug << "Search Mails" << oendl; } void OpieMail::slotEditSettings() { @@ -130,9 +130,9 @@ void OpieMail::slotEditSettings() } void OpieMail::slotEditAccounts() { - qDebug( "Edit Accounts" ); + odebug << "Edit Accounts" << oendl; EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); eaDialog.slotAdjustColumns(); QPEApplication::execDialog( &eaDialog ); if ( settings ) delete settings; @@ -179,9 +179,9 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) if (!mailView->currentItem()) return; MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} - qDebug("Event right/hold"); + odebug << "Event right/hold" << oendl; if (!item) return; QPopupMenu *m = new QPopupMenu(0); if (m) { @@ -203,17 +203,17 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) } void OpieMail::slotShowFolders( bool show ) { - qDebug( "Show Folders" ); + odebug << "Show Folders" << oendl; if ( show && folderView->isHidden() ) { - qDebug( "-> showing" ); + odebug << "-> showing" << oendl; folderView->show(); } else if ( !show && !folderView->isHidden() ) { - qDebug( "-> hiding" ); + odebug << "-> hiding" << oendl; folderView->hide(); } } diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index f672a36..cac9048 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -103,9 +103,9 @@ void MailApplet::slotCheck() { folderStat stat; m_statusMail->check_current_stat( stat ); int newMailsOld = m_newMails; m_newMails = stat.message_unseen; - qDebug( QString( "test %1" ).arg( m_newMails ) ); + odebug << QString( "test %1" ).arg( m_newMails ) << oendl; if ( m_newMails > 0 && newMailsOld != m_newMails ) { ODevice *device = ODevice::inst(); if ( isHidden() ) show(); diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 156e11d..a574ea1 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -138,9 +138,9 @@ void ViewMail::setBody(const RecBodyP&body ) type = body->Parts()[i]->Type()+"/"+body->Parts()[i]->Subtype(); part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin(); for (;it!=body->Parts()[i]->Parameters().end();++it) { - qDebug(it.key()); + odebug << it.key() << oendl; if (it.key().lower()=="name") { filename=it.data(); } diff --git a/noncore/net/opieftp/config.in b/noncore/net/opieftp/config.in index 96e8b27..95cf73c 100644 --- a/noncore/net/opieftp/config.in +++ b/noncore/net/opieftp/config.in @@ -1,4 +1,4 @@ config OPIEFTP boolean "opie-ftp (ftp client for Opie)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && FTPLIB + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && FTPLIB diff --git a/noncore/net/opieftp/filePermissions.cpp b/noncore/net/opieftp/filePermissions.cpp index f545c1f..991fcd5 100644 --- a/noncore/net/opieftp/filePermissions.cpp +++ b/noncore/net/opieftp/filePermissions.cpp @@ -31,9 +31,9 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal : QDialog( parent, name, modal, fl ) { if ( !name ) setName( tr("filePermissions") ); -// qDebug("FilePermissions "+fileName); +// odebug << "FilePermissions "+fileName << oendl; resize( 236, 210 ); isRemote=useRemote; setMaximumSize( QSize( 236, 210 ) ); setCaption( tr( "Set File Permissions" ) ); diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 4c39569..fe96103 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -18,13 +18,15 @@ extern "C" { } #include "inputDialog.h" -#include <qmenubar.h> +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/mimetype.h> +using namespace Opie::Core; #include <qtextstream.h> #include <qpushbutton.h> #include <qtoolbutton.h> @@ -35,16 +37,17 @@ extern "C" { #include <qspinbox.h> #include <qtabwidget.h> #include <qlayout.h> #include <qmessagebox.h> +#include <qmenubar.h> #include <qlineedit.h> #include <qlistbox.h> #include <qvbox.h> +/* STD */ #include <unistd.h> #include <stdlib.h> - QProgressBar *ProgressBar; static netbuf *conn=NULL; static int log_progress(netbuf *, int xfered, void *) @@ -60,9 +63,9 @@ static int log_progress(netbuf *, int xfered, void *) OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) : QMainWindow( parent, name, fl ) { - qDebug("OpieFtp constructor"); + odebug << "OpieFtp constructor" << oendl; setCaption( tr( "OpieFtp" ) ); fuckeduphack=FALSE; QVBox* wrapperBox = new QVBox( this ); @@ -333,9 +336,9 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) // ServerComboBox->setCurrentItem(currentServerConfig); TabWidget->setCurrentPage(2); - qDebug("Constructor done"); + odebug << "Constructor done" << oendl; } OpieFtp::~OpieFtp() { @@ -404,9 +407,9 @@ void OpieFtp::newConnection() void OpieFtp::serverComboEdited(const QString & ) { // if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { -// qDebug("ServerComboEdited"); +// odebug << "ServerComboEdited" << oendl; // // currentServerConfig = -1; // } } @@ -529,9 +532,9 @@ void OpieFtp::localUpload() FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); + odebug << "Put: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { QString msg; msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn)); @@ -590,9 +593,9 @@ void OpieFtp::remoteDownload() FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - qDebug("Get: %s, %s",localFile.latin1(),remoteFile.latin1()); + odebug << "Get: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { QString msg; msg.sprintf(tr("Unable to download \n")+"%s",FtpLastResponse(conn)); @@ -619,9 +622,9 @@ bool OpieFtp::remoteDirList(const QString &dir) if(tmp.right(1) != "/") tmp+="/._temp"; else tmp+="._temp"; -// qDebug("Listing remote dir "+tmp); +// odebug << "Listing remote dir "+tmp << oendl; // QCopEnvelope ( "QPE/System", "busy()" ); if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) { QString msg; msg.sprintf(tr("Unable to list the directory\n")+dir+"\n%s",FtpLastResponse(conn) ); @@ -641,9 +644,9 @@ bool OpieFtp::remoteChDir(const QString &dir) QString msg; msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; // QCopEnvelope ( "QPE/System", "notBusy()" ); return FALSE; } // QCopEnvelope ( "QPE/System", "notBusy()" ); @@ -663,22 +666,22 @@ void OpieFtp::populateLocalView() QFileInfo *fi; while ( (fi=it.current()) ) { if (fi->isSymLink() ){ QString symLink=fi->readLink(); - qDebug("Symlink detected "+symLink); + odebug << "Symlink detected "+symLink << oendl; QFileInfo sym( symLink); fileS.sprintf( "%10i", sym.size() ); fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); fileDate = sym.lastModified().toString(); } else { - qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); + odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; fileS.sprintf( "%10i", fi->size() ); fileL.sprintf( "%s",fi->fileName().data() ); fileDate= fi->lastModified().toString(); if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { fileL+="/"; isDir=TRUE; - qDebug( fileL); + odebug << fileL << oendl; } } if(fileL !="./" && fi->exists()) { item = new QListViewItem( Local_View,fileL, fileDate, fileS ); @@ -719,9 +722,9 @@ void OpieFtp::populateLocalView() } bool OpieFtp::populateRemoteView( ) { -// qDebug("populate remoteview"); +// odebug << "populate remoteview" << oendl; QString sfile=QDir::homeDirPath(); if(sfile.right(1) != "/") sfile+="/._temp"; else @@ -768,9 +771,9 @@ bool OpieFtp::populateRemoteView( ) file.close(); if( file.exists()) file. remove(); } else - qDebug("temp file not opened successfully "+sfile); + odebug << "temp file not opened successfully "+sfile << oendl; Remote_View->setSorting( 4,TRUE); return true; } @@ -787,17 +790,17 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) QString msg; msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string QString msg; msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } currentRemoteDir=path; } else { if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers @@ -806,15 +809,15 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) currentRemoteDir = strItem; if( !remoteChDir( (const QString &)strItem)) { currentRemoteDir = oldRemoteCurrentDir; strItem=""; -// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// odebug << "RemoteCurrentDir1 "+oldRemoteCurrentDir << oendl; } } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { currentRemoteDir = oldRemoteCurrentDir; strItem=""; -// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// odebug << "RemoteCurrentDir1 "+oldRemoteCurrentDir << oendl; } else { currentRemoteDir = currentRemoteDir+strItem; } @@ -865,9 +868,9 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) } } else { strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); if( QFile::exists(strItem ) ) { - // qDebug("upload "+strItem); + // odebug << "upload "+strItem << oendl; return; } } //end not symlink chdir(strItem.latin1()); @@ -1169,9 +1172,9 @@ void OpieFtp::fillRemoteCombo(const QString ¤tPath) { void OpieFtp::currentPathComboChanged() { QString oldRemoteCurrentDir = currentRemoteDir; -// qDebug("oldRemoteCurrentDir "+oldRemoteCurrentDir); +// odebug << "oldRemoteCurrentDir "+oldRemoteCurrentDir << oendl; if (TabWidget->currentPageIndex() == 0) { if(QDir( currentPathCombo->lineEdit()->text()).exists()) { currentDir.setPath( currentPathCombo->lineEdit()->text() ); populateLocalView(); @@ -1215,16 +1218,16 @@ void OpieFtp::readConfig() Config cfg("opieftp"); cfg.setGroup("Server"); currentServerConfig = cfg.readNumEntry("currentServer", -1); -// qDebug("Reading %d", currentServerConfig); +// odebug << "Reading " << currentServerConfig << "" << oendl; serverComboSelected( currentServerConfig-1); } void OpieFtp::writeConfig() { - qDebug("write config"); + odebug << "write config" << oendl; Config cfg("opieftp"); cfg.setGroup("Server"); QString username, remoteServerStr, remotePathStr, password, port, temp; @@ -1253,9 +1256,9 @@ void OpieFtp::writeConfig() cfg.writeEntry( temp, ServerComboBox->currentText() +":"+PortSpinBox->cleanText() ); cfg.writeEntry("currentServer", numberOfEntries+1); currentServerConfig = numberOfEntries+1; - qDebug("setting currentserverconfig to %d", currentServerConfig); + odebug << "setting currentserverconfig to " << currentServerConfig << "" << oendl; cfg.setGroup(temp); if(!newServerName.isEmpty()) cfg.writeEntry("ServerName", newServerName); @@ -1272,9 +1275,9 @@ void OpieFtp::writeConfig() } } void OpieFtp::clearCombos() { - qDebug("clearing"); + odebug << "clearing" << oendl; ServerComboBox->clear(); UsernameComboBox->clear(); PasswordEdit->clear(); serverListView->clear(); @@ -1291,20 +1294,20 @@ void OpieFtp::fillCombos() int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); for (int i = 1; i <= numberOfEntries; i++) { temp.setNum(i); - qDebug(temp); + odebug << temp << oendl; cfg.setGroup("Server"); remoteServerStr = cfg.readEntry( temp,""); - qDebug( remoteServerStr); + odebug << remoteServerStr << oendl; int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); port = remoteServerStr.right( divider - 1); bool ok; PortSpinBox->setValue( port.toInt(&ok,10)); remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); - qDebug( "remote server string "+remoteServerStr); + odebug << "remote server string "+remoteServerStr << oendl; ServerComboBox->insertItem( remoteServerStr ); cfg.setGroup(temp); @@ -1320,9 +1323,9 @@ void OpieFtp::fillCombos() void OpieFtp::serverComboSelected(int index) { currentServerConfig = index+1; - qDebug("server combo selected %d", index+1); + odebug << "server combo selected " << index+1 << "" << oendl; QString username, remoteServerStr, remotePathStr, password, port, temp; // remoteServerStr = ServerComboBox->text(index); Config cfg("opieftp"); @@ -1331,11 +1334,11 @@ void OpieFtp::serverComboSelected(int index) temp.setNum(index+1); remoteServerStr = cfg.readEntry( temp,""); - qDebug("Group" +temp); + odebug << "Group" +temp << oendl; cfg.setGroup(temp); -// qDebug(temp); +// odebug << temp << oendl; int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); port = remoteServerStr.right( divider - 1); bool ok; int portInt = port.toInt(&ok,10); @@ -1348,10 +1351,10 @@ void OpieFtp::serverComboSelected(int index) remotePath->setText(cfg.readEntry("RemotePath", "/")); username = cfg.readEntry("Username", "anonymous"); UsernameComboBox->lineEdit()->setText(username); - qDebug(username); -// qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); + odebug << username << oendl; +// odebug << "Password is "+cfg.readEntryCrypt(username << oendl; PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); // UsernameComboBox // PasswordEdit @@ -1361,9 +1364,9 @@ void OpieFtp::serverComboSelected(int index) fuckeduphack = TRUE; serverListView->setCurrentItem( index); fuckeduphack=FALSE; - qDebug("server list set selected %d",index); + odebug << "server list set selected " << index << "" << oendl; update(); } void OpieFtp::deleteServer() @@ -1390,9 +1393,9 @@ void OpieFtp::deleteServer() // username.find( cfg.readEntry("Username")) != -1) { serverListView->removeItem(i); - qDebug("OK DELETE "+tempname); + odebug << "OK DELETE "+tempname << oendl; cfg.removeEntry(QString::number(i)); for ( ; i <= numberOfEntries; i++) { cfg.setGroup("Server"); cfg.writeEntry("Server", QString::number(numberOfEntries + 1 )); @@ -1445,17 +1448,17 @@ void OpieFtp::upDir() QString msg; msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string QString msg; msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } currentRemoteDir=path; remoteDirList( (const QString &)currentRemoteDir); //this also calls populate if(currentRemoteDir.right(1) !="/") @@ -1514,9 +1517,9 @@ void OpieFtp::NewServer() { void OpieFtp::serverListClicked( const QString &item) { if(item.isEmpty()) return; Config cfg("opieftp"); - qDebug("highltined "+item); + odebug << "highltined "+item << oendl; int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); for (int i = 1; i <= numberOfEntries; i++) { cfg.setGroup(QString::number(i)); if(cfg.readEntry( "ServerName").find(item) != -1 && !fuckeduphack) diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index 2f97dc2..003b166 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro @@ -1,11 +1,10 @@ -#CONFIG += qt warn_on quick-app CONFIG += qt warn_on HEADERS = opieftp.h inputDialog.h SOURCES = opieftp.cpp inputDialog.cpp main.cpp TARGET = opieftp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lftplib +LIBS += -lqpe -lopiecore2 -lftplib DESTDIR = $(OPIEDIR)/bin include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opieirc/config.in b/noncore/net/opieirc/config.in index a61cf70..2c56523 100644 --- a/noncore/net/opieirc/config.in +++ b/noncore/net/opieirc/config.in @@ -1,4 +1,4 @@ config OPIEIRC boolean "opie-irc (chat via your favorite IRC server)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBQTAUX + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQTAUX diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp index 22387b3..6d93a34 100644 --- a/noncore/net/opieirc/ircmisc.cpp +++ b/noncore/net/opieirc/ircmisc.cpp @@ -1,7 +1,10 @@ -#include <stdio.h> #include "ircmisc.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) { } int IRCTabBar::insertTab(QTab *tab, int index) { @@ -63,9 +66,9 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { } else if (key == Key_Return) { m_history.prepend(text()); m_index = -1; } else if (key == Key_Tab) { - printf("got tab\n"); + odebug << "got tab" << oendl; return; } QLineEdit::keyPressEvent(event); } @@ -74,9 +77,9 @@ bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) { if (event->type() == QEvent::KeyPress) { QKeyEvent *k = (QKeyEvent *) event; /* Catch tab characters */ if (k->key() == Key_Tab) { - qDebug("tab!"); + odebug << "tab!" << oendl; return TRUE; } } return QLineEdit::eventFilter(object, event); diff --git a/noncore/net/opieirc/opieirc.pro b/noncore/net/opieirc/opieirc.pro index 4f9092f..2455ec4 100644 --- a/noncore/net/opieirc/opieirc.pro +++ b/noncore/net/opieirc/opieirc.pro @@ -17,9 +17,8 @@ SOURCES = ircchannel.cpp ircconnection.cpp \ ircserverlist.cpp ircservereditor.cpp \ ircquerytab.cpp ircsettings.cpp ircmisc.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopieui2 -lqtaux2 - +LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 TARGET = opieirc include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 8a7f0bc..1d93f5c 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -205,9 +205,9 @@ namespace OpieTooth { * @param the QPaintEvent */ void BluezApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint bluetooth pixmap"); + odebug << "paint bluetooth pixmap" << oendl; if (bluezactive > 0) { p.drawPixmap( 0, 1, bluezOnPixmap ); } else { diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index 09b19d2..37f2ae7 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -44,9 +44,9 @@ void StartDunConnection::start() { this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_dunConnect; } } diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index 24ac530..50afc9f 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -38,17 +38,17 @@ StartConnection::ConnectionType StartPanConnection::type() { } void StartPanConnection::start() { m_panConnect = new OProcess(); - qDebug( "IM START " + m_mac ); + odebug << "IM START " + m_mac << oendl; *m_panConnect << "pand" << "--connect" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_panConnect; } } @@ -67,18 +67,18 @@ void StartPanConnection::stop() { delete m_panConnect; m_panConnect = 0l; } m_panConnect = new OProcess(); - qDebug("IM STOP " + m_mac); + odebug << "IM STOP " + m_mac << oendl; *m_panConnect << "pand" << "--kill" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not stop" ); + owarn << "could not stop" << oendl; delete m_panConnect; } } diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 29030ab..b1cddd2 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -154,9 +154,9 @@ void BlueBase::writeConfig() * Modify the hcid.conf file to our needs */ void BlueBase::writeToHciConfig() { - qWarning("writeToHciConfig"); + owarn << "writeToHciConfig" << oendl; HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); hciconf.load(); hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); hciconf.setName( m_deviceName ); @@ -366,27 +366,27 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QMap<int, QString>::Iterator it = list.begin(); QPopupMenu *popup =0l; if ( it != list.end() ) { - qWarning("Searching id %d %s", it.key(), it.data().latin1() ); + owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; popup = m_popHelper.find( it.key(), service->services(), (BTDeviceItem*)service->parent() ); } else { - qWarning("Empty"); + owarn << "Empty" << oendl; } if ( popup == 0l ) { - qWarning("factory returned 0l"); + owarn << "factory returned 0l" << oendl; popup = new QPopupMenu(); } int test1 = popup->insertItem( tr("Test1:"), 2); ret = popup->exec( point ); - qWarning("returned from exec() "); + owarn << "returned from exec() " << oendl; if ( ret == -1 ) { ; } @@ -405,9 +405,9 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin * @param item the service item returned */ void BlueBase::addServicesToDevice( BTDeviceItem * item ) { - qDebug("addServicesToDevice"); + odebug << "addServicesToDevice" << oendl; // row of mac adress text(3) RemoteDevice device = item->remoteDevice(); m_deviceList.insert( item->mac() , item ); // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back @@ -422,9 +422,9 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) * @param servicesList the list with the service the device has. */ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) { - qDebug("fill services list"); + odebug << "fill services list" << oendl; QMap<QString,BTDeviceItem*>::Iterator it; BTDeviceItem* deviceItem = 0; @@ -606,9 +606,9 @@ void BlueBase::deviceActive( const RemoteDevice &device ) * @param connected - if it is avail. or not */ void BlueBase::deviceActive( const QString& device, bool connected ) { - qDebug("deviceActive slot"); + odebug << "deviceActive slot" << oendl; QMap<QString,BTDeviceItem*>::Iterator it; it = m_deviceList.find( device ); diff --git a/noncore/net/opietooth/manager/devicehandler.cpp b/noncore/net/opietooth/manager/devicehandler.cpp index 9c5b817..bd34351 100644 --- a/noncore/net/opietooth/manager/devicehandler.cpp +++ b/noncore/net/opietooth/manager/devicehandler.cpp @@ -32,15 +32,15 @@ QString path = QDir::homeDirPath() + "/Settings/bluetooth"; for (it = devicesFileList.begin(); it != devicesFileList.end(); ++it ) { if ( (*it) == "." || (*it) == ".." ) continue; - qDebug((*it).latin1() ); + odebug << (*it).latin1() << oendl; Config conf(path + "/"+(*it), Config::File); conf.setGroup("Info"); name = conf.readEntry("name", "Error"); mac = conf.readEntry("mac", QString::null); - qDebug("MAC: " + mac); - qDebug("NAME: " + name); + odebug << "MAC: " + mac << oendl; + odebug << "NAME: " + name << oendl; if (mac.isEmpty() ) continue; RemoteDevice currentDevice( mac , name ); list.append( currentDevice ); @@ -65,16 +65,16 @@ void DeviceHandler::save( const RemoteDevice::ValueList& list) { * Create a new dir */ rm = "mkdir "; rm += QDir::homeDirPath() + "/Settings/bluetooth"; - qWarning("out %s", rm.data() ); + owarn << "out " << rm.data() << "" << oendl; system( rm.data() ); RemoteDevice::ValueList::ConstIterator it; // write the config for ( it = list.begin(); it != list.end(); ++it ) { - qDebug( "/Settings/bluetooth/" + (*it).mac() + ".conf"); + odebug << "/Settings/bluetooth/" + (*it).mac() + ".conf" << oendl; Config conf( QDir::homeDirPath() + "/Settings/bluetooth/" + (*it).mac() + ".conf", Config::File ); diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp index 3043f71..5b01d2f 100644 --- a/noncore/net/opietooth/manager/dunpopup.cpp +++ b/noncore/net/opietooth/manager/dunpopup.cpp @@ -10,9 +10,9 @@ using namespace OpieTooth; * c'tor init the QAction */ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("DunPopup c'tor"); + owarn << "DunPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp index 35e9cd9..71c935c 100644 --- a/noncore/net/opietooth/manager/hciconfwrapper.cpp +++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp @@ -73,18 +73,18 @@ namespace OpieTooth { QString str; for (it = m_file.begin(); it != m_file.end(); ++it ) { str = (*it); if( (str.contains(key)) > 0 ) { - qDebug("Found"); + odebug << "Found" << oendl; // still need to look if its commented out!!! str.simplifyWhiteSpace(); - qDebug( key ); + odebug << key << oendl; if (str.startsWith("#")) { str = (key + " " + value + ";"); } else { str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";"); } - qDebug( str ); + odebug << str << oendl; it = m_file.remove( it ); it = m_file.insert( it, str ); //return; the regexp is too wide -zecke // all set } @@ -97,13 +97,13 @@ namespace OpieTooth { * This loads the config file and stores it inside * the m_file */ void HciConfWrapper::load() { - qWarning("loaded"); + owarn << "loaded" << oendl; m_file.clear(); QFile file( m_fileName ); if (!file.open( IO_ReadOnly ) ) { - qDebug("Could not open"); + odebug << "Could not open" << oendl; return; } /** @@ -118,22 +118,22 @@ namespace OpieTooth { m_file.append( tmp ); } } void HciConfWrapper::save() { - qWarning("save"); + owarn << "save" << oendl; if (m_file.isEmpty() ) // load first return; QFile file( m_fileName ); if ( !file.open(IO_WriteOnly ) ) { - qWarning("could not open %s", m_fileName.latin1() ); + owarn << "could not open " << m_fileName.latin1() << "" << oendl; return; } QTextStream stream(&file ); QStringList::Iterator it; for ( it = m_file.begin(); it != m_file.end(); ++it ) { stream << (*it) << endl; } - qWarning("saved"); + owarn << "saved" << oendl; }; } diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 1ef862a..3a3dbb0 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -79,9 +79,9 @@ void ObexDialog::sendData() { } else { *obexSend << "ussp-push" << m_device << fileURL << file; } if (!obexSend->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete obexSend; } diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp index d147d52..9a50199 100644 --- a/noncore/net/opietooth/manager/obexpopup.cpp +++ b/noncore/net/opietooth/manager/obexpopup.cpp @@ -15,9 +15,9 @@ using namespace OpieTooth; */ ObexPopup::ObexPopup() : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; /* connect action */ @@ -35,9 +35,9 @@ ObexPopup::~ObexPopup() void ObexPopup::slotPush() { - qWarning("push something"); + owarn << "push something" << oendl; ObexDialog obexDialog; QPEApplication::execDialog( &obexDialog ); } diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp index 8b05964..43c2777 100644 --- a/noncore/net/opietooth/manager/panpopup.cpp +++ b/noncore/net/opietooth/manager/panpopup.cpp @@ -10,9 +10,9 @@ using namespace OpieTooth; * c'tor init the QAction */ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("PanPopup c'tor"); + owarn << "PanPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp index ab22fea..19deb19 100644 --- a/noncore/net/opietooth/manager/popuphelper.cpp +++ b/noncore/net/opietooth/manager/popuphelper.cpp @@ -15,12 +15,12 @@ void PopupHelper::insert( int id, popupFactory fact ) { m_map.insert(id, fact ); } QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) { - //qWarning("find"); + //owarn << "find" << oendl; FactoryMap::Iterator it = m_map.find(id ); if ( it != m_map.end() ) { - //qWarning("found"); + //owarn << "found" << oendl; popupFactory fact = it.data(); return (*fact)(ser, item); } return 0l; diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 78c1501..989bf45 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -55,9 +55,9 @@ void PPPDialog::connectToDevice() { *pppDial << "pppd" << m_device << "call" << connectScript; connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete pppDial; } } diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp index fc76301..4469129 100644 --- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp +++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp @@ -70,9 +70,9 @@ void RfcommAssignDialog::newDevice( const QString & mac ) rfcomm->setIdent( i ); rfcomm->setMac( mac ); rfcomm->setChannel( newDev->channel() ); rfcomm->setComment( newDev->comment() ); - qDebug( "New device set up" ); + odebug << "New device set up" << oendl; } } } } @@ -91,9 +91,9 @@ void RfcommAssignDialog::loadConfig() QMap<QString, RfCommConfObject*>::Iterator it; it = confHandler->foundEntries().find( QString("%1").arg( i ) ); if ( it != confHandler->foundEntries().end() ) { - qDebug( "Found key in foundEntries() " ); + odebug << "Found key in foundEntries() " << oendl; rfcomm->setMac( it.data()->mac() ); rfcomm->setChannel( it.data()->channel() ); rfcomm->setComment( it.data()->comment() ); } diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp index 20453e8..2ef95ff 100644 --- a/noncore/net/opietooth/manager/rfcommconfhandler.cpp +++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp @@ -91,24 +91,24 @@ void RfCommConfHandler::load() { QString tmpLine = ( *line ).stripWhiteSpace(); if ( tmpLine.startsWith("rfcomm") ) { QString number = tmpLine.mid( 6,1 ); - qDebug( tmpLine ); - qDebug( "TEST " + number ); + odebug << tmpLine << oendl; + odebug << "TEST " + number << oendl; } else if ( tmpLine.startsWith( "}" ) ) { m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) ); } else if ( tmpLine.startsWith( "device" ) ) { mac = tmpLine.mid( 7, 17 ); - qDebug( "mac" + mac ); + odebug << "mac" + mac << oendl; } else if ( tmpLine.startsWith( "channel" ) ) { channel = tmpLine.mid( 8, 1 ); qDebug ( "Channel :" + channel ); } else if ( tmpLine.startsWith( "comment" ) ) { comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 ); - qDebug( "Comment: " + comment ); + odebug << "Comment: " + comment << oendl; } } rfCommConf.close(); } save( m_foundEntries ); - qDebug( QString( "ENTries: %1").arg( m_foundEntries.count() ) ); + odebug << QString( "ENTries: %1").arg( m_foundEntries.count() ) << oendl; } diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp index 04bfe48..01ad616 100644 --- a/noncore/net/opietooth/manager/rfcpopup.cpp +++ b/noncore/net/opietooth/manager/rfcpopup.cpp @@ -16,9 +16,9 @@ using namespace OpieTooth; */ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; @@ -69,18 +69,18 @@ RfcCommPopup::~RfcCommPopup() void RfcCommPopup::slotConnect() { - qWarning("connect"); + owarn << "connect" << oendl; PPPDialog pppDialog; QPEApplication::execDialog( &pppDialog ); } void RfcCommPopup::slotDisconnect() { - qWarning("slot disconnected"); + owarn << "slot disconnected" << oendl; } void RfcCommPopup::slotBind() @@ -97,7 +97,7 @@ void RfcCommPopup::slotBind() void RfcCommPopup::slotBar() { - qWarning("slotBar"); + owarn << "slotBar" << oendl; }; diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index c8ea3e3..3b005c4 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp @@ -154,8 +154,8 @@ namespace OpieTooth { /** * Cleanup */ ScanDialog::~ScanDialog() { - qWarning("delete scan dialog"); + owarn << "delete scan dialog" << oendl; delete localDevice; } } diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index da39113..bfdb20a 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp @@ -22,9 +22,11 @@ #ifdef QWS #include <opie2/oapplication.h> #include <opie2/oconfig.h> #include <opie2/odevice.h> -using namespace Opie; +#include <opie2/odebug.h> +using namespace Opie::Core; +using namespace Opie::Net; #endif /* QT */ #include <qapplication.h> @@ -39,17 +41,11 @@ using namespace Opie; #include <qtoolbutton.h> #include <qspinbox.h> #include <qtextstream.h> -/* POSIX */ +/* STD */ #include <assert.h> -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) :WellenreiterConfigBase( parent, name, true, f ) @@ -115,9 +111,9 @@ void WellenreiterConfigWindow::performAutodetection() //TODO: insert modal splash screen here // and sleep a second, so that it looks // like we're actually doing something fancy... ;-) - qDebug( "WellenreiterConfigWindow::performAutodetection()" ); + odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; // try to guess device type QFile m( "/proc/modules" ); if ( m.open( IO_ReadOnly ) ) @@ -136,9 +132,9 @@ void WellenreiterConfigWindow::performAutodetection() if ( devicetype ) { deviceType->setCurrentItem( devicetype ); _guess = devicetype; - qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); + odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; } } } @@ -240,9 +236,9 @@ void WellenreiterConfigWindow::changedStationAction(int t) void WellenreiterConfigWindow::getCaptureFileNameClicked() { QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); - qDebug( "name = %s", (const char*) name ); + odebug << "name = " << (const char*) name << "" << oendl; if ( !name.isEmpty() ) { captureFileName->setText( name ); } @@ -315,13 +311,13 @@ void WellenreiterConfigWindow::performAction( const QString& type, script = newStationScript->text(); } else { - qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); + owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl; return; } - qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); + odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl; switch( action ) { case 0: /* Ignore */ return; @@ -344,11 +340,11 @@ void WellenreiterConfigWindow::performAction( const QString& type, script = script.replace( QRegExp( "$MAC" ), mac ); script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); - qDebug( "going to call script '%s'", (const char*) script ); + odebug << "going to call script '" << (const char*) script << "'" << oendl; ::system( script ); - qDebug( "script returned." ); + odebug << "script returned." << oendl; return; } default: assert( false ); } @@ -360,9 +356,9 @@ void WellenreiterConfigWindow::load() #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build performAutodetection(); #else - qDebug( "loading configuration settings..." ); + odebug << "loading configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); @@ -438,9 +434,9 @@ void WellenreiterConfigWindow::save() { #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build #else - qDebug( "saving configuration settings..." ); + odebug << "saving configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index a47b4ec..bd91e35 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp @@ -14,8 +14,12 @@ **********************************************************************/ #include "gps.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + /* QT */ #include <qtextstream.h> /* STD */ @@ -24,16 +28,16 @@ GPS::GPS( QObject* parent, const char * name ) :QObject( parent, name ) { - qDebug( "GPS::GPS()" ); + odebug << "GPS::GPS()" << oendl; _socket = new QSocket( this, "gpsd commsock" ); } GPS::~GPS() { - qDebug( "GPS::~GPS()" ); + odebug << "GPS::~GPS()" << oendl; } bool GPS::open( const QString& host, int port ) @@ -52,17 +56,17 @@ GpsLocation GPS::position() const _socket->flush(); if ( result ) { int numAvail = _socket->bytesAvailable(); - qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); + odebug << "GPS write succeeded, " << numAvail << " bytes available for reading..." << oendl; if ( numAvail ) { int numRead = _socket->readBlock( &buf[0], sizeof buf ); int numScan = ::sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); if ( numRead < 7 || numScan != 2 ) { - qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); + odebug << "GPS read " << numRead << " bytes succeeded, invalid response: '" << &buf[0] << "'" << oendl; return GpsLocation( -111, -111 ); } else { diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index 1c72cf4..714a9a9 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp @@ -13,8 +13,14 @@ ** **********************************************************************/ #include "logwindow.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qmultilineedit.h> #include <qdatetime.h> MLogWindow* MLogWindow::_instance; @@ -37,9 +43,9 @@ void MLogWindow::log( QString text ) int col; int row; ledit->getCursorPosition( &col, &row ); ledit->insertAt( line, col, row ); - qDebug( line ); + odebug << line << oendl; } void MLogWindow::clear() diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 6bbc39b..62db967 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -13,26 +13,29 @@ ** **********************************************************************/ #include "mainwindow.h" + #ifdef QWS +#include <opie2/odebug.h> #include <opie2/oapplication.h> #include <opie2/oprocess.h> #else #include <qapplication.h> #endif +/* QT */ #include <qmessagebox.h> #include <qstringlist.h> +/* STD */ #include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> using namespace Opie::Core; -using namespace Opie::Core; -using namespace Opie::Core; + int main( int argc, char **argv ) { #ifdef QWS OApplication a( argc, argv, "Wellenreiter II" ); @@ -54,12 +57,12 @@ int main( int argc, char **argv ) bool check = true; for ( int i = 1; i < argc; ++i ) { - qDebug( "Wellenreiter::main() parsing argument %d = '%s'", i, argv[i] ); + odebug << "Wellenreiter::main() parsing argument " << i << " = '" << argv[i] << "'" << oendl; if ( !strcmp( "-nocheck", argv[i] ) ) { - qDebug( "-nocheck found" ); + odebug << "-nocheck found" << oendl; check = false; break; } } @@ -68,9 +71,9 @@ int main( int argc, char **argv ) { // root check if ( getuid() ) { - qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); + owarn << QObject::tr( "Wellenreiter: trying to run as non-root!" ) << oendl; result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::No ) return -1; @@ -85,9 +88,9 @@ int main( int argc, char **argv ) QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::Yes ) { if ( -1 == ::kill( dhcpid, SIGTERM ) ) - qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); + owarn << "Wellenreiter: can't kill process #" << result << " (" << strerror( errno ) << ")" << oendl; else killed = true; } } diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 7add6cd..a4b8839 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -20,8 +20,23 @@ #include "mainwindow.h" #include "wellenreiter.h" #include "scanlist.h" +/* OPIE */ +#ifdef QWS +#include <qpe/resource.h> +#include <opie2/odebug.h> +#include <opie2/ofiledialog.h> +#else +#include "resource.h" +#include <qapplication.h> +#include <qfiledialog.h> +#endif +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Ui; + +/* QT */ #include <qcombobox.h> #include <qdatastream.h> #include <qfile.h> #include <qfileinfo.h> @@ -38,25 +53,11 @@ #include <qtextstream.h> #include <qtoolbutton.h> #include <qwhatsthis.h> -#ifdef QWS -#include <qpe/resource.h> -#include <opie2/ofiledialog.h> -using namespace Opie; -#else -#include "resource.h" -#include <qapplication.h> -#include <qfiledialog.h> -#endif - +/* STD */ #include <unistd.h> -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Net; WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { cw = new WellenreiterConfigWindow( this ); @@ -187,9 +188,9 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n void WellenreiterMainWindow::showConfigure() { - qDebug( "show configure..." ); + odebug << "show configure..." << oendl; cw->setCaption( tr( "Configure" ) ); int result = QPEApplication::execDialog( cw ); if ( result ) updateToolButtonState(); @@ -230,9 +231,9 @@ void WellenreiterMainWindow::changedSniffingState() WellenreiterMainWindow::~WellenreiterMainWindow() { - qDebug( "Wellenreiter: bye." ); + odebug << "Wellenreiter: bye." << oendl; }; void WellenreiterMainWindow::demoAddStations() @@ -250,9 +251,9 @@ void WellenreiterMainWindow::demoAddStations() void WellenreiterMainWindow::demoReadFromGps() { WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); GPS* gps = new GPS( this ); - qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); + odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl; gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); GpsLocation loc = gps->position(); QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); delete gps; @@ -304,13 +305,13 @@ void WellenreiterMainWindow::fileSaveLog() { QTextStream t( &f ); t << mw->logWindow()->getLog(); f.close(); - qDebug( "Saved log to file '%s'", (const char*) fname ); + odebug << "Saved log to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving log to file '%s'", (const char*) fname ); + odebug << "Problem saving log to file '" << (const char*) fname << "'" << oendl; } } } @@ -325,13 +326,13 @@ void WellenreiterMainWindow::fileSaveSession() { QDataStream t( &f ); t << *mw->netView(); f.close(); - qDebug( "Saved session to file '%s'", (const char*) fname ); + odebug << "Saved session to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving session to file '%s'", (const char*) fname ); + odebug << "Problem saving session to file '" << (const char*) fname << "'" << oendl; } } } @@ -347,13 +348,13 @@ void WellenreiterMainWindow::fileSaveHex() { QTextStream t( &f ); t << mw->hexWindow()->getLog(); f.close(); - qDebug( "Saved hex log to file '%s'", (const char*) fname ); + odebug << "Saved hex log to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); + odebug << "Problem saving hex log to file '" << (const char*) fname << "'" << oendl; } } */ } @@ -368,13 +369,13 @@ void WellenreiterMainWindow::fileLoadSession() { QDataStream t( &f ); t >> *mw->netView(); f.close(); - qDebug( "Loaded session from file '%s'", (const char*) fname ); + odebug << "Loaded session from file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem loading session from file '%s'", (const char*) fname ); + odebug << "Problem loading session from file '" << (const char*) fname << "'" << oendl; } } } @@ -437,13 +438,13 @@ void WellenreiterMainWindow::uploadSession() int result = d->exec(); if ( !result ) { - qDebug( "Session upload cancelled :(" ); + odebug << "Session upload cancelled :(" << oendl; return; } - qDebug( "Starting upload..." ); + odebug << "Starting upload..." << oendl; struct sockaddr_in raddr; struct hostent *rhost_info; int sock = -1; diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index 3d3aa18..4df01da 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp @@ -83,9 +83,9 @@ void PacketView::showPacket( int number ) _doHexPacket( p ); } else { - qDebug( "D'oh! No packet!" ); + odebug << "D'oh! No packet!" << oendl; } } void PacketView::_doSubPackets( QObjectList* l, int counter ) diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp index d98ef0b..cb17f51 100644 --- a/noncore/net/wellenreiter/gui/resource.cpp +++ b/noncore/net/wellenreiter/gui/resource.cpp @@ -28,9 +28,9 @@ QPixmap loadPixmap( const QString& pix ) filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); QPixmap pixmap( filename ); if ( pixmap.isNull() ) { - qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); + odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; } return pixmap; }; @@ -40,9 +40,9 @@ QIconSet loadIconSet( const QString& pix ) filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); QPixmap pixmap( filename ); if ( pixmap.isNull() ) { - qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); + odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; } return QIconSet( pixmap ); }; diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 3b7120a..a2be782 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -16,23 +16,28 @@ #include "scanlist.h" #include "configwindow.h" #include "logwindow.h" -#include <assert.h> -#include <qcursor.h> -#include <qdatetime.h> -#include <qpopupmenu.h> -#include <qcheckbox.h> - +/* OPIE */ #ifdef QWS +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> -#endif - -#ifdef QWS #include <qpe/resource.h> #else #include "resource.h" #endif +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Net; + +/* QT */ +#include <qcursor.h> +#include <qdatetime.h> +#include <qpopupmenu.h> +#include <qcheckbox.h> + +/* STD */ +#include <assert.h> const int col_type = 0; const int col_essid = 0; const int col_sig = 1; @@ -45,14 +50,8 @@ const int col_manuf = 7; const int col_firstseen = 8; const int col_lastseen = 9; const int col_location = 10; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Ui; -using namespace Opie::Net; MScanListView::MScanListView( QWidget* parent, const char* name ) :OListView( parent, name ) { setFrameShape( QListView::StyledPanel ); @@ -105,16 +104,16 @@ OListViewItem* MScanListView::childFactory() void MScanListView::serializeTo( QDataStream& s) const { - qDebug( "serializing MScanListView" ); + odebug << "serializing MScanListView" << oendl; OListView::serializeTo( s ); } void MScanListView::serializeFrom( QDataStream& s) { - qDebug( "serializing MScanListView" ); + odebug << "serializing MScanListView" << oendl; OListView::serializeFrom( s ); } @@ -142,9 +141,9 @@ void MScanListView::addNewItem( const QString& type, while ( item && ( item->text( col_essid ) != essid ) ) { #ifdef DEBUG - qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); + odebug << "itemtext: " << (const char*) item->text( col_essid ) << "" << oendl; #endif item = static_cast<MScanListItem*> ( item->nextSibling() ); } if ( item ) @@ -158,18 +157,18 @@ void MScanListView::addNewItem( const QString& type, while ( item && ( item->text( col_ap ) != macaddr ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); + odebug << "subitemtext: " << (const char*) item->text( col_ap ) << "" << oendl; #endif item = static_cast<MScanListItem*> ( item->nextSibling() ); } if ( item ) { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); + odebug << "" << (const char*) macaddr << " is a dupe - ignoring..." << oendl; #endif item->receivedBeacon(); return; } @@ -185,9 +184,9 @@ void MScanListView::addNewItem( const QString& type, // insert new station as child from network // no essid to reduce clutter, maybe later we have a nick or stationname to display!? #ifdef DEBUG - qDebug( "inserting new station %s", (const char*) macaddr ); + odebug << "inserting new station " << (const char*) macaddr << "" << oendl; #endif MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); station->setManufacturer( mac.manufacturer() ); @@ -211,18 +210,18 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); + odebug << "subitemtext: " << (const char*) subitem->text( col_ap ) << "" << oendl; #endif subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); } if ( subitem ) { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); + odebug << "" << (const char*) addr.toString(true) << " is a dupe - ignoring..." << oendl; #endif subitem->receivedBeacon(); //FIXME: sent data bit return; } @@ -245,9 +244,9 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) { - qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() ); + odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << (const char*) viaTo.toString() << " seem to form a WDS" << oendl; QString s; MScanListItem* network; QListViewItemIterator it( this ); @@ -263,9 +262,9 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to ); } else { - qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); + odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); } } @@ -285,9 +284,9 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" ); } else { - qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); + odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); } } @@ -308,24 +307,24 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" ); } else { - qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); + odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); } } void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) { - qWarning( "D'oh! Not yet implemented..." ); + owarn << "D'oh! Not yet implemented..." << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); } void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) { - qDebug( "identify %s = %s", (const char*) macaddr.toString(), (const char*) ip ); + odebug << "identify " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; QListViewItemIterator it( this ); for ( ; it.current(); ++it ) { @@ -334,17 +333,17 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) it.current()->setText( col_ip, ip ); return; } } - qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); + odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", (const char*) macaddr.toString(), (const char*) ip ) ); } void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip ) { - qDebug( "addService '%s', Server = %s = %s", (const char*) name, (const char*) macaddr.toString(), (const char*) ip ); + odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; //TODO: Refactor that out, we need it all over the place. // Best to do it in a more comfortable abstraction in OListView // (Hmm, didn't I already start something in this direction?) @@ -359,18 +358,18 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, while ( subitem && ( subitem->text( col_essid ) != name ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) subitem->text( col_essid ) ); + odebug << "subitemtext: " << (const char*) subitem->text( col_essid ) << "" << oendl; #endif subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); } if ( subitem ) { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) name ); + odebug << "" << (const char*) name << " is a dupe - ignoring..." << oendl; #endif subitem->receivedBeacon(); //FIXME: sent data bit return; } @@ -382,9 +381,9 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, return; } } - qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); + odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", (const char*) macaddr.toString(), (const char*) ip ) ); } @@ -420,9 +419,9 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), _channel( channel ), _signal( signal ), _beacons( 1 ) { #ifdef DEBUG - qDebug( "creating scanlist item" ); + odebug << "creating scanlist item" << oendl; #endif if ( WellenreiterConfigWindow::instance() ) WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here @@ -434,9 +433,9 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const bool wep, int channel, int signal ) :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) { #ifdef DEBUG - qDebug( "creating scanlist item" ); + odebug << "creating scanlist item" << oendl; #endif if ( WellenreiterConfigWindow::instance() ) WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here @@ -458,9 +457,9 @@ OListViewItem* MScanListItem::childFactory() void MScanListItem::serializeTo( QDataStream& s ) const { #ifdef DEBUG - qDebug( "serializing MScanListItem" ); + odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeTo( s ); s << _type; @@ -469,9 +468,9 @@ void MScanListItem::serializeTo( QDataStream& s ) const void MScanListItem::serializeFrom( QDataStream& s ) { #ifdef DEBUG - qDebug( "serializing MScanListItem" ); + odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeFrom( s ); char wep; @@ -555,9 +554,9 @@ void MScanListItem::setLocation( const QString& location ) void MScanListItem::receivedBeacon() { _beacons++; #ifdef DEBUG - qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); + odebug << "MScanListItem " << (const char*) _macaddr << ": received beacon #" << _beacons << "" << oendl; #endif setText( col_sig, QString::number( _beacons ) ); setText( col_lastseen, QTime::currentTime().toString() ); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index fff7c35..fad6efd 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -10,10 +10,8 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ***********************************************************************/ -// Local - #include "gps.h" #include "wellenreiter.h" #include "scanlist.h" #include "logwindow.h" @@ -22,24 +20,25 @@ #include "statwindow.h" #include "graphwindow.h" #include "protolistview.h" -// Opie - +/* OPIE */ #ifdef QWS #include <opie2/oapplication.h> +#include <opie2/odebug.h> #include <opie2/odevice.h> #else #include <qapplication.h> #endif #include <opie2/omanufacturerdb.h> #include <opie2/onetwork.h> #include <opie2/opcap.h> #include <qpe/qcopenvelope_qws.h> -using namespace Opie; - -// Qt +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Ui; +/* QT */ #include <qcheckbox.h> #include <qcombobox.h> #include <qdatetime.h> #include <qpushbutton.h> @@ -51,23 +50,16 @@ using namespace Opie; #include <qtimer.h> #include <qtoolbutton.h> #include <qmainwindow.h> -// Standard - +/* STD */ #include <assert.h> #include <errno.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <stdlib.h> -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; Wellenreiter::Wellenreiter( QWidget* parent ) : WellenreiterBase( parent, 0, 0 ), sniffing( false ), iface( 0 ), configwindow( 0 ) { @@ -105,9 +97,9 @@ Wellenreiter::~Wellenreiter() void Wellenreiter::initialTimer() { - qDebug( "Wellenreiter::preloading manufacturer database..." ); + odebug << "Wellenreiter::preloading manufacturer database..." << oendl; OManufacturerDB::instance(); } @@ -148,14 +140,14 @@ void Wellenreiter::handleNotification( OPacket* p ) QString name = it.current()->name(); if ( configwindow->parsePackets->isProtocolChecked( name ) ) { QString action = configwindow->parsePackets->protocolAction( name ); - qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); + odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; doAction( action, name, p ); } else { - qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name ); + odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl; } ++it; } } @@ -165,9 +157,9 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* { if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage ); else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); - else qWarning( "Wellenreiter::handleManagementFrame(): '%s' - please handle me!", (const char*) manage->managementType() ); + else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl; } void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* request ) @@ -181,16 +173,16 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage GpsLocation loc( -111, -111 ); if ( configwindow->enableGPS->isChecked() ) { // TODO: add check if GPS is working!? - qDebug( "Wellenreiter::gathering GPS data..." ); + odebug << "Wellenreiter::gathering GPS data..." << oendl; loc = gps->position(); - qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); + odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; } if ( essid.length() ) netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); - qDebug( "Wellenreiter::invalid frame [possibly noise] detected!" ); + odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; } void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* response ) @@ -210,9 +202,9 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa type = "managed"; } else { - qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); + owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; return; } OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); @@ -225,11 +217,11 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa GpsLocation loc( -111, -111 ); if ( configwindow->enableGPS->isChecked() ) { // TODO: add check if GPS is working!? - qDebug( "Wellenreiter::gathering GPS data..." ); + odebug << "Wellenreiter::gathering GPS data..." << oendl; loc = gps->position(); - qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); + odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; } netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc ); @@ -254,9 +246,9 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro netView()->addNewItem( "adhoc", "<unknown>", header->macAddress1(), false, -1, 0, GpsLocation( -111, -111 ) ); } else { - qDebug( "Wellenreiter::handleControlFrame - please handle %s in a future version! :D", (const char*) control->controlType() ); + odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl; } } @@ -303,9 +295,9 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, { OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); if ( arp ) { - qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); + odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl; if ( arp->type() == "REQUEST" ) { netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); } @@ -324,18 +316,18 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); if ( dhcp ) { - qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() ); + odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl; if ( dhcp->type() == "OFFER" ) { - qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); + odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; netView()->identify( source, dhcp->serverAddress().toString() ); netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); } else if ( dhcp->type() == "ACK" ) { - qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); + odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); } } } @@ -367,18 +359,18 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) QString name = it.current()->name(); if ( configwindow->capturePackets->isProtocolChecked( name ) ) { QString action = configwindow->capturePackets->protocolAction( name ); - qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); + odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; if ( action == "Discard" ) { logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); return false; } } else { - qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); + odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl; } ++it; } return true; @@ -550,9 +542,9 @@ void Wellenreiter::startClicked() case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; - case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; + case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break; default: assert( 0 ); // shouldn't reach this } // switch device into monitor mode @@ -571,9 +563,9 @@ void Wellenreiter::startClicked() // open GPS device if ( configwindow->enableGPS->isChecked() ) { - qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); + odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); } // open pcap and start sniffing @@ -595,9 +587,9 @@ void Wellenreiter::startClicked() pcap->open( interface ); else pcap->open( QFile( interface ) ); - qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); + odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl; pcap->openDumpFile( dumpname ); if ( !pcap->isOpen() ) { @@ -651,9 +643,9 @@ void Wellenreiter::startClicked() void Wellenreiter::timerEvent( QTimerEvent* ) { - qDebug( "Wellenreiter::timerEvent()" ); + odebug << "Wellenreiter::timerEvent()" << oendl; OPacket* p = pcap->next(); if ( !p ) // no more packets available { stopClicked(); @@ -714,17 +706,17 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch (const char*) macaddr ); QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); int count = 3; - qDebug("sending %d messages",count); + odebug << "sending " << count << " messages" << oendl; msg << QString("count") << QString::number(count); - qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); + odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl; msg << QString(iface->name()) << QString("Mode") << type; - qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); + odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl; msg << QString(iface->name()) << QString("ESSID") << essid; - qDebug("msg >%s< channel >%d<", iface->name(),channel); + odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl; msg << QString(iface->name()) << QString("Channel") << channel; -// qDebug("msg >%s< mac >%s<", iface->name(),macaddr); +// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl; // msg << QString(iface->name()) << QString("MacAddr") << macaddr; #else QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Function only available on Embedded build" ) ); #endif diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 58e5c71..2eccdfe 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp @@ -1,11 +1,12 @@ - #include "backuprestore.h" #include "errordialog.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/ostorageinfo.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; /* QT */ #include <qapplication.h> #include <qmultilineedit.h> @@ -39,9 +40,8 @@ #define EXTENSION ".bck" const QString tempFileName = "/tmp/backup.err"; - BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags fl) : BackupAndRestoreBase(parent, name, fl) { backupList->header()->hide(); @@ -72,19 +72,19 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f backupLocations.insert( "Documents", QDir::homeDirPath() + "/Documents" ); if ( storage.hasCf() ) { backupLocations.insert( "CF", storage.cfPath() ); - qDebug( "Cf Path: " + storage.cfPath() ); + odebug << "Cf Path: " + storage.cfPath() << oendl; } if ( storage.hasSd() ) { backupLocations.insert( "SD", storage.sdPath() ); - qDebug( " Sd Path: " + storage.sdPath() ); + odebug << " Sd Path: " + storage.sdPath() << oendl; } if ( storage.hasMmc() ) { backupLocations.insert( "MMC", storage.mmcPath() ); - qDebug( "Mmc Path: " + storage.mmcPath() ); + odebug << "Mmc Path: " + storage.mmcPath() << oendl; } Config config("BackupAndRestore"); //read last locations @@ -202,9 +202,9 @@ void BackupAndRestore::scanForApplicationSettings() QFileInfoListIterator it( *list ); QFileInfo *fi; while ( (fi=it.current()) ) { - //qDebug((d.path()+"/"+fi->fileName()).latin1()); + //odebug << (d.path()+"/"+fi->fileName()).latin1() << oendl; if ( ( fi->fileName() != "." ) && ( fi->fileName() != ".." ) ) { QListViewItem *newItem = new QListViewItem(applicationSettings, fi->fileName()); selectItem(newItem); @@ -248,18 +248,18 @@ void BackupAndRestore::backup() // We execute tar and compressing its output with gzip.. // The error output will be written into a temp-file which could be provided // for debugging.. - qDebug( "Storing file: %s", outputFile.latin1() ); + odebug << "Storing file: " << outputFile.latin1() << "" << oendl; outputFile += EXTENSION; QString commandLine = QString( "cd %1 && (tar -X %1 -cz %2 Applications/backup/exclude -f %3 ) 2> %4" ).arg( QDir::homeDirPath() ) .arg( getExcludeFile() ) .arg( backupFiles ) .arg( outputFile.latin1() ) .arg( tempFileName.latin1() ); - qDebug( commandLine ); + odebug << commandLine << oendl; int r = system( commandLine ); if(r != 0) @@ -271,9 +271,9 @@ void BackupAndRestore::backup() + errorMsg, QString( tr( "Ok" ) ), QString( tr( "Details" ) ) ) ) { case 1: - qWarning("Details pressed !"); + owarn << "Details pressed !" << oendl; ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); QFile errorFile( tempFileName ); if ( errorFile.open(IO_ReadOnly) ) { @@ -358,9 +358,9 @@ void BackupAndRestore::sourceDirChanged(int selection) } void BackupAndRestore::fileListUpdate() { - qWarning("void BackupAndRestore::fileListUpdate()"); + owarn << "void BackupAndRestore::fileListUpdate()" << oendl; restoreList->clear(); rescanFolder( backupLocations[restoreSource->currentText()] ); } @@ -370,9 +370,9 @@ void BackupAndRestore::fileListUpdate() * @param directory - the directory to look in. */ void BackupAndRestore::rescanFolder(QString directory) { - //qDebug(QString("rescanFolder: ") + directory.latin1()); + //odebug << QString("rescanFolder: ") + directory.latin1() << oendl; QDir d(directory); if(!d.exists()) return; @@ -418,9 +418,9 @@ void BackupAndRestore::restore() QString restoreFile = backupLocations[restoreSource->currentText()]; restoreFile += "/" + restoreItem->text(0); - qDebug( restoreFile ); + odebug << restoreFile << oendl; //check if backup file come from opie 1.0.x QString commandLine = QString( "tar -tzf %1 | grep Applications/backup/exclude" ).arg( restoreFile.latin1() ); @@ -441,9 +441,9 @@ void BackupAndRestore::restore() commandLine = QString( "cd %1 && tar -zxf %2 2> %3" ).arg( startDir ) .arg( restoreFile.latin1() ) .arg( tempFileName.latin1() ); - qDebug( commandLine ); + odebug << commandLine << oendl; r = system( commandLine ); //error handling @@ -453,9 +453,9 @@ void BackupAndRestore::restore() switch( QMessageBox::critical(this, tr( "Message" ), tr( "Restore Failed." ) + "\n" + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) ) { case 1: - qWarning("Details pressed !"); + owarn << "Details pressed !" << oendl; ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); QFile errorFile( tempFileName ); if ( errorFile.open(IO_ReadOnly) ) { diff --git a/noncore/settings/netsystemtime/settingstabwidget.cpp b/noncore/settings/netsystemtime/settingstabwidget.cpp index ad80e05..1307082 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.cpp +++ b/noncore/settings/netsystemtime/settingstabwidget.cpp @@ -138,9 +138,9 @@ void SettingsTabWidget::saveSettings() ntpSrvs.writeEntry( "name", edit ); curSrv = 0; for ( int i = 1; i < srvCount; i++ ) { -// qDebug( "ntpSrvs[%i/%i]=%s", i, srvCount, cbTimeServer->text( i ).latin1() ); +// odebug << "ntpSrvs[" << i << "/" << srvCount << "]=" << cbTimeServer->text( i ).latin1() << "" << oendl; ntpSrvs.setGroup( QString::number( i ) ); ntpSrvs.writeEntry( "name", cbTimeServer->text( i-1 ) ); } } diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index b00b899..d2b106a 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp @@ -136,15 +136,15 @@ bool Interface::refresh(){ QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); if(ret != 0){ - qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); + odebug << QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1() << oendl; return false; } QFile file(fileName); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } // Set to the defaults @@ -200,9 +200,9 @@ bool Interface::refresh(){ } file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } // leaseTime and renewalTime and used if pid and deamon exe can be accessed. @@ -219,16 +219,16 @@ bool Interface::refresh(){ if(line.contains("RENEWALTIME=")) renewalTime = line.mid(12, line.length()).toInt(); } file.close(); - //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); - //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); + //odebug << QString("Interface: leaseTime: %1").arg(leaseTime).latin1() << oendl; + //odebug << QString("Interface: renewalTime: %1").arg(renewalTime).latin1() << oendl; // Get the pid of the deamond dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } int pid = -1; @@ -239,18 +239,18 @@ bool Interface::refresh(){ } file.close(); if( pid == -1){ - qDebug("Interface: Could not get pid of dhcpc deamon."); + odebug << "Interface: Could not get pid of dhcpc deamon." << oendl; return false; } // Get the start running time of the deamon fileName = (QString("/proc/%1/stat").arg(pid)); file.setName(fileName); stream.setDevice( &file ); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } while ( !stream.eof() ) { line = stream.readLine(); @@ -277,14 +277,14 @@ bool Interface::refresh(){ datetime = datetime.addSecs((-1*sec)); f.close(); } else{ - qDebug("Interface: Can't open /proc/uptime to retrive uptime."); + odebug << "Interface: Can't open /proc/uptime to retrive uptime." << oendl; return false; } datetime = datetime.addSecs(time); - //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); + //odebug << QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1() << oendl; // Calculate the start and renew times leaseObtained = datetime.toString(); diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 6b161ae..e283926 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp @@ -23,9 +23,9 @@ Interfaces::Interfaces(QString useInterfacesFile){ interfacesFile = useInterfacesFile; QFile file(interfacesFile); if (!file.open(IO_ReadOnly)){ - qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); + odebug << "Interfaces: Can't open file: " << interfacesFile.latin1() << " for reading." << oendl; currentIface = interfaces.end(); currentMapping = interfaces.end(); return; } @@ -75,9 +75,9 @@ QStringList Interfaces::getInterfaceList(){ bool Interfaces::isAuto(const QString &interface) const { QStringList autoLines = interfaces.grep(QRegExp(AUTO)); QStringList awi = autoLines.grep(QRegExp(interface)); if(awi.count() > 1) - qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1()); + odebug << QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1() << oendl; return awi.count() > 0; } /** @@ -151,9 +151,9 @@ bool Interfaces::isInterfaceSet() const { * @param method for the family. see interfaces man page for family methods. * @return true if successful. */ bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ - qDebug("Interfaces::addInterface(%s)",interface.latin1()); + odebug << "Interfaces::addInterface(" << interface.latin1() << ")" << oendl; if(0 == acceptedFamily.contains(family)) return false; QString newInterface = interface.simplifyWhiteSpace(); newInterface = newInterface.replace(QRegExp(" "), ""); @@ -167,9 +167,9 @@ bool Interfaces::addInterface(const QString &interface, const QString &family, c * @param newInterface name of the new interface. * @return bool true if successful */ bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ - qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); + odebug << "copy interface " << interface.latin1() << " to " << newInterface.latin1() << "" << oendl; if(!setInterface(interface)) return false; // Store the old interface and bump past the stanza line. @@ -274,16 +274,16 @@ QString Interfaces::getInterfaceMethod(bool &error){ * @param newName the new name of the interface. All whitespace is removed. * @return bool true if successful. */ bool Interfaces::setInterfaceName(const QString &newName){ - qDebug("setInterfaceName %s", newName.latin1()); + odebug << "setInterfaceName " << newName.latin1() << "" << oendl; if(currentIface == interfaces.end()) return false; QString name = newName.simplifyWhiteSpace(); name = name.replace(QRegExp(" "), ""); bool returnValue = false; QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue)); - qDebug("setting %s",tmp.latin1()); + odebug << "setting " << tmp.latin1() << "" << oendl; (*currentIface) = tmp; return !returnValue; } @@ -344,9 +344,9 @@ QString Interfaces::getInterfaceOption(const QString &option, bool &error){ bool Interfaces::setInterfaceOption(const QString &option, const QString &value){ if( value.stripWhiteSpace().isEmpty() ) return removeInterfaceOption( option ); - qDebug("iface >%s< option >%s< value >%s<", (*currentIface).latin1(), option.latin1(),value.latin1()); + odebug << "iface >" << (*currentIface).latin1() << "< option >" << option.latin1() << "< value >" << value.latin1() << "<" << oendl; return setOption(currentIface, option, value); } /** @@ -485,9 +485,9 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString valid = false; } if(valid){ if(found == true){ - qDebug(QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1()); + odebug << QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1() << oendl; } found = true; iterator = it; } @@ -504,49 +504,49 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString */ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ if(start == interfaces.end()) return false; - qDebug("setting option"); + odebug << "setting option" << oendl; bool found = false; bool replaced = false; QStringList::Iterator insertAt = NULL; for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { - qDebug(" Interfaces::setOption got line >%s<",(*it).latin1()); + odebug << " Interfaces::setOption got line >" << (*it).latin1() << "<" << oendl; // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line // but since it works with an empty interfaces file I (tille) will not do anything more if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){ if (found) break; // && it != start){ // if(!found && value != ""){ // // Got to the end of the stanza without finding it, so append it. -// qDebug(" Got to the end of the stanza without finding it, so append it."); +// odebug << " Got to the end of the stanza without finding it, so append it." << oendl; // interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value)); // } - qDebug("found 1"); + odebug << "found 1" << oendl; // interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value)); found = true; insertAt = it; } if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. - qDebug("found 2"); + odebug << "found 2" << oendl; if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; replaced = true; (*it) = QString("\t%1 %2").arg(option).arg(value); } } if(!found){ - qDebug("! found insert anyway"); + odebug << "! found insert anyway" << oendl; QStringList::Iterator p = start; interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); found = true; } if(found && !replaced){ - qDebug("found iface but not the option so insert it here..."); + odebug << "found iface but not the option so insert it here..." << oendl; interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); } return found; } @@ -581,9 +581,9 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString } if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; it = interfaces.remove( it ); // we really want to remove the line --it; // we do ++it later in the head of the for loop } @@ -609,9 +609,9 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString } if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; it = interfaces.remove( it ); // we really want to remove the line --it; // we do ++it later in the head of the for loop } @@ -662,9 +662,9 @@ QString Interfaces::getOption(const QStringList::Iterator &start, const QString break; } if((*it).contains(option) && (*it).at(0) != '#'){ if(found) - qDebug(QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1() << oendl; found = true; QString line = (*it).simplifyWhiteSpace(); int space = line.find(" ", option.length()); if(space != -1){ @@ -686,9 +686,9 @@ bool Interfaces::write(){ QFile::remove(interfacesFile); QFile file(interfacesFile); if (!file.open(IO_ReadWrite)){ - qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); + odebug << QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1() << oendl; return false; } QTextStream stream( &file ); int whiteSpaceCount = 0; @@ -699,9 +699,9 @@ bool Interfaces::write(){ whiteSpaceCount++; else whiteSpaceCount = 0; if(whiteSpaceCount < 2){ - qDebug((*it).latin1()); + odebug << (*it).latin1() << oendl; stream << (*it) << '\n'; } } file.close(); diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 7c2f85c..ec3bad3 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp @@ -45,9 +45,9 @@ InterfaceSetupImp::~InterfaceSetupImp(){ */ bool InterfaceSetupImp::saveChanges(){ bool error; QString iface = interfaces->getInterfaceName(error); - qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); + odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl; if(!saveSettings()) return false; interfaces->write(); @@ -71,9 +71,9 @@ bool InterfaceSetupImp::saveChanges(){ owait->show(); qApp->processEvents(); if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { - qWarning("unstable to spawn ifdown/ifup"); + owarn << "unstable to spawn ifdown/ifup" << oendl; } owait->hide(); delete owait; @@ -156,9 +156,9 @@ void InterfaceSetupImp::setProfile(const QString &profile){ interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); if(!interfaces->setMapping(interface->getInterfaceName())){ interfaces->addMapping(interface->getInterfaceName()); if(!interfaces->setMapping(interface->getInterfaceName())){ - qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); + odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl; return; } } interfaces->setMap("map", newInterfaceName); @@ -166,9 +166,9 @@ void InterfaceSetupImp::setProfile(const QString &profile){ } else{ interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); if(!interfaces->setInterface(newInterfaceName)){ - qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); + odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl; return; } } } @@ -184,9 +184,9 @@ void InterfaceSetupImp::setProfile(const QString &profile){ // IP Information autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); - qDebug("dns >%s<",dns.latin1()); + odebug << "dns >" << dns.latin1() << "<" << oendl; if(dns.contains(" ")){ firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); }else firstDNSLineEdit->setText(dns); @@ -198,10 +198,10 @@ void InterfaceSetupImp::setProfile(const QString &profile){ gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); - qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1()); - qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); + owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl; + owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl; } // interfacesetup.cpp diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 1e16b97..3e1a650 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -78,9 +78,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi * we need to ignore it as well */ if (m_handledIfaces.contains( *ni) ) { - qDebug("Not up iface handled by module"); + odebug << "Not up iface handled by module" << oendl; continue; } bool found = false; for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ) @@ -218,9 +218,9 @@ void MainWindowImp::getAllInterfaces() { int flags = 0; if ( m_handledIfaces.contains( (*it) ) ) { - qDebug(" %s is handled by a module", (*it).latin1() ); + odebug << " " << (*it).latin1() << " is handled by a module" << oendl; continue; } // int family; i = NULL; @@ -248,9 +248,9 @@ void MainWindowImp::getAllInterfaces() i->setHardwareName("Loopback"); else i->setHardwareName("Unknown"); - qWarning("Adding interface %s to interfaceNames\n", ifr.ifr_name); + owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*))); @@ -264,9 +264,9 @@ void MainWindowImp::getAllInterfaces() { ilist = it.key()->getInterfaces(); for( i = ilist.first(); i != 0; i = ilist.next() ) { - qWarning("Adding interface %s to interfaceNames\n", i->getInterfaceName().latin1() ); + owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*))); @@ -282,9 +282,9 @@ void MainWindowImp::getAllInterfaces() */ void MainWindowImp::loadModules(const QString &path) { #ifdef DEBUG - qDebug("MainWindowImp::loadModules: %s", path.latin1()); + odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; #endif QDir d(path); if(!d.exists()) return; @@ -303,9 +303,9 @@ void MainWindowImp::loadModules(const QString &path) if(fi->fileName().contains(".so") && fi->fileName().contains("networksettings_")) { #endif loadPlugin(path + "/" + fi->fileName()); - qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1()); + odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl; } ++it; } } @@ -318,17 +318,17 @@ void MainWindowImp::loadModules(const QString &path) */ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) { #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin: %s: resolving %s", pluginFileName.latin1(), resolveString.latin1()); + odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl; #endif #ifdef QWS QLibrary *lib = new QLibrary(pluginFileName); void *functionPointer = lib->resolve(resolveString); if( !functionPointer ) { #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin: Warning: %s is not a plugin", pluginFileName.latin1()); + odebug << "MainWindowImp::loadPlugin: Warning: " << pluginFileName.latin1() << " is not a plugin" << oendl; #endif delete lib; return NULL; } @@ -336,9 +336,9 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & Module *object = ((Module* (*)()) functionPointer)(); if(object == NULL) { #ifdef DEBUG - qDebug("MainWindowImp: Couldn't create object, but did load library!"); + odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; #endif delete lib; return NULL; } @@ -351,22 +351,22 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & #else QLibrary *lib = loader->library(pluginFileName); if( !lib || !lib->hasSymbol(resolveString) ) { - qDebug(QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); + odebug << QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1() << oendl; return NULL; } // Try to get an object. Module *object = ((Module* (*)()) lib->symbol(resolveString))(); if(object == NULL) { #ifdef DEBUG - qDebug("MainWindowImp: Couldn't create object, but did load library!"); + odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; #endif return NULL; } #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin:: Found object, storing."); + odebug << "MainWindowImp::loadPlugin:: Found object, storing." << oendl; #endif // Store for deletion later libraries.insert(object, lib); return object; @@ -410,9 +410,9 @@ void MainWindowImp::addClicked() { Interface *i = (it.key())->addNewInterface(item->text(0)); if(i) { - qDebug("iface name %s",i->getInterfaceName().latin1()); + odebug << "iface name " << i->getInterfaceName().latin1() << "" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); } } @@ -512,9 +512,9 @@ void MainWindowImp::informationClicked() if(moduleInformation != NULL) { QPEApplication::showWidget( moduleInformation ); #ifdef DEBUG - qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); + odebug << "MainWindowImp::informationClicked:: Module owner has created, we showed." << oendl; #endif return; } } @@ -649,9 +649,9 @@ void MainWindowImp::removeProfile() QMap<Interface*, QListViewItem*>::Iterator it; for( it = items.begin(); it != items.end(); ++it ) { QString interfaceName = it.key()->getInterfaceName(); - qDebug(interfaceName.latin1()); + odebug << interfaceName.latin1() << oendl; if(interfaces.setInterface(interfaceName + "_" + profileToRemove)) { interfaces.removeInterface(); if(interfaces.setMapping(interfaceName)) @@ -718,9 +718,9 @@ void MainWindowImp::makeChannel() void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) { bool found = false; - qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); + odebug << "MainWindowImp::receive QCop msg >"+msg+"<" << oendl; if (msg == "raise") { raise(); return; @@ -728,14 +728,14 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) QString dest = msg.left(msg.find("(")); QCString param = msg.right(msg.length() - msg.find("(") - 1); param = param.left( param.length() - 1 ); - qDebug("dest >%s< param >"+param+"<",dest.latin1()); + odebug << "dest >" << dest.latin1() << "< param >"+param+"<" << oendl; QMap<Module*, QLibrary*>::Iterator it; for( it = libraries.begin(); it != libraries.end(); ++it ) { - qDebug("plugin >%s<", it.key()->type().latin1() ); + odebug << "plugin >" << it.key()->type().latin1() << "<" << oendl; if(it.key()->type() == dest) { it.key()->receive( param, arg ); found = true; @@ -743,6 +743,6 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) } if (found) QPEApplication::setKeepRunning(); - else qDebug("Huh what do ya want"); + else odebug << "Huh what do ya want" << oendl; } diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp index b8a1925a..aedc0b9 100644 --- a/noncore/settings/networksettings/ppp/accounts.cpp +++ b/noncore/settings/networksettings/ppp/accounts.cpp @@ -117,9 +117,9 @@ void AccountWidget::create() int result; if (_pppdata->newaccount() == -1) { - qDebug("_pppdata->newaccount() == -1"); + odebug << "_pppdata->newaccount() == -1" << oendl; return; } result = doTab(); diff --git a/noncore/settings/networksettings/ppp/authwidget.cpp b/noncore/settings/networksettings/ppp/authwidget.cpp index fa2b164..f3d842f 100644 --- a/noncore/settings/networksettings/ppp/authwidget.cpp +++ b/noncore/settings/networksettings/ppp/authwidget.cpp @@ -141,18 +141,18 @@ void AuthWidget::save() } void AuthWidget::authChanged( const QString &authStr ) { - qDebug("AuthWidget::authChanged( %s )", authStr.latin1() ); + odebug << "AuthWidget::authChanged( " << authStr.latin1() << " )" << oendl; if ( authStr.contains( tr("Script-based") ) ){ showUsernamePassword( false ); showScriptWindow( true ); } else if ( authStr.contains( tr("PAP") ) || authStr.contains( tr("CHAP") ) ){ showUsernamePassword( true ); showScriptWindow( false ); } else { - qDebug("do not really know how to handle"); + odebug << "do not really know how to handle" << oendl; showUsernamePassword( false ); showScriptWindow( false ); } } diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp index e3fab24..b75410c 100644 --- a/noncore/settings/networksettings/ppp/connect.cpp +++ b/noncore/settings/networksettings/ppp/connect.cpp @@ -471,9 +471,9 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if((unsigned) scriptindex < comlist->count()) { scriptCommand = *(comlist->at(scriptindex)); scriptArgument = *(arglist->at(scriptindex)); } else { - qDebug( "End of script" ); + odebug << "End of script" << oendl; vmain = 10; return; } @@ -837,9 +837,9 @@ void ConnectWidget::timerEvent(QTimerEvent *) { killTimer( main_timer_ID ); if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000); - qDebug( "started if timeout timer with %i", _ifaceppp->data()->pppdTimeout()*1000); + odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl; // find out PPP interface and notify the stats module // stats->setUnit(pppInterfaceNumber()); @@ -847,9 +847,9 @@ void ConnectWidget::timerEvent(QTimerEvent *) { semaphore = true; result = execppp(); emit debugMessage(QObject::tr("Starting pppd...")); - qDebug("execppp() returned with return-code %i", result ); + odebug << "execppp() returned with return-code " << result << "" << oendl; if(result) { if(!_ifaceppp->data()->autoDNS()) adddns( _ifaceppp ); @@ -1063,9 +1063,9 @@ void ConnectWidget::setExpect(const QString &n) { void ConnectWidget::if_waiting_timed_out() { if_timer->stop(); if_timeout_timer->stop(); - qDebug("if_waiting_timed_out()"); + odebug << "if_waiting_timed_out()" << oendl; _ifaceppp->data()->setpppdError(E_IF_TIMEOUT); // let's kill the stuck pppd @@ -1270,9 +1270,9 @@ bool ConnectWidget::execppp() { return false; // nonsensically long command which would bust my buffer buf. } - qWarning("Command IS: %s",command.latin1() ); + owarn << "Command IS: " << command.latin1() << "" << oendl; qApp->flushX(); return _ifaceppp->modem()->execPPPDaemon(command); diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp index 9da090d..350ff32 100644 --- a/noncore/settings/networksettings/ppp/devices.cpp +++ b/noncore/settings/networksettings/ppp/devices.cpp @@ -71,13 +71,13 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam copy_b->setEnabled( false ); //FIXME // delete_b->setEnabled( false ); //FIXME QStringList tmp = _pppdata->getDevicesNamesList(); - qDebug("DevicesWidget::DevicesWidget got devices %s",tmp.join("--").latin1()); + odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; listListbox->insertStringList(tmp); for (uint i = 0; i < listListbox->count(); i++){ - qDebug("listListbox->text(i) %s == _pppdata->devname() %s",listListbox->text(i).latin1(), _pppdata->devname().latin1()); + odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; if ( listListbox->text(i) == _pppdata->devname() ) listListbox->setCurrentItem( i ); } } diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index 81dab38..69bb682 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp @@ -334,9 +334,9 @@ bool ModemWidget::save() if(modemname->text().isEmpty() || !_pppdata->isUniqueDevname(modemname->text())) return false; - qDebug("ModemWidget::save saving modem1 data"); + odebug << "ModemWidget::save saving modem1 data" << oendl; _pppdata->setDevname( modemname->text() ); _pppdata->setModemDevice( modemdevice->currentText() ); _pppdata->setFlowcontrol(flowcontrol->currentText()); _pppdata->setFlowcontrol(flowcontrol->currentText()); diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp index 6b158b9..5a76293 100644 --- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp @@ -19,9 +19,9 @@ */ InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) { - qDebug("InterfaceInformationPPP::InterfaceInformationPPP %s", name); + odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed) ); diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp index f443f3c..5cc6f70 100644 --- a/noncore/settings/networksettings/ppp/interfaceppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp @@ -13,15 +13,15 @@ InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) : Interface(parent, name, status), _modemPtr(0), _dataPtr(0) { - qDebug("InterfacePPP::InterfacePPP("); + odebug << "InterfacePPP::InterfacePPP(" << oendl; } PPPData* InterfacePPP::data()const { if (!_dataPtr){ - qDebug("creating new Data obj"); + odebug << "creating new Data obj" << oendl; _dataPtr = new PPPData(); _dataPtr->setDevice( getInterfaceName() ); _dataPtr->setAccount( getHardwareName() ); } @@ -30,17 +30,17 @@ PPPData* InterfacePPP::data()const Modem* InterfacePPP::modem()const { if (!_modemPtr){ - qDebug("creating new modem obj"); + odebug << "creating new modem obj" << oendl; _modemPtr = new Modem( data() ); } return _modemPtr; } bool InterfacePPP::refresh() { - qDebug("InterfacePPP::refresh()"); + odebug << "InterfacePPP::refresh()" << oendl; QString old = getInterfaceName(); setInterfaceName( modem()->pppDevice() ); (void)Interface::refresh(); @@ -52,9 +52,9 @@ bool InterfacePPP::refresh() } void InterfacePPP::start() { - qDebug("InterfacePPP::start"); + odebug << "InterfacePPP::start" << oendl; if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) { QDialog mb( 0, "Dialog", true ); @@ -142,14 +142,14 @@ void InterfacePPP::start() // emit updateInterface((Interface*) this); emit begin_connect(); - qDebug("InterfacePPP::start END"); + odebug << "InterfacePPP::start END" << oendl; } void InterfacePPP::stop() { - qDebug("InterfacePPP::stop"); + odebug << "InterfacePPP::stop" << oendl; // emit hangup_now(); status = false; // not connected setStatus( false ); emit hangup_now(); diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp index e21bbc7..fd09332 100644 --- a/noncore/settings/networksettings/ppp/kpppwidget.cpp +++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp @@ -73,15 +73,15 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na p_kppp = this; // before doing anything else, run a few tests if (!_pppdata->setModemDevice( i->getInterfaceName() )) _pppdata->setModemDevice("/dev/modem"); - qDebug("PPPConfigWidget::PPPConfigWidget"); - qDebug(" interface->getHardwareName >%s<", i->getHardwareName().latin1()); + odebug << "PPPConfigWidget::PPPConfigWidget" << oendl; + odebug << " interface->getHardwareName >" << i->getHardwareName().latin1() << "<" << oendl; if (!_pppdata->setAccount( i->getHardwareName() )) _pppdata->setAccount( 0 ); - qDebug(" _pppdata->accname >%s<",_pppdata->accname().latin1()); - qDebug(" _pppdata->currentAccountID() >%i<",_pppdata->currentAccountID()); + odebug << " _pppdata->accname >" << _pppdata->accname().latin1() << "<" << oendl; + odebug << " _pppdata->currentAccountID() >" << _pppdata->currentAccountID() << "<" << oendl; int result = runTests(); if(result == TEST_CRITICAL) exit(4); @@ -304,9 +304,9 @@ KPPPWidget::~KPPPWidget() // bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { // if(e->type() == QEvent::User) { // switch(((SignalEvent*)e)->sigType()) { // case SIGINT: -// qDebug( "Received a SIGINT" ); +// odebug << "Received a SIGINT" << oendl; // interruptConnection(); // break; // case SIGCHLD: // sigChld(); @@ -422,15 +422,15 @@ void KPPPWidget::interruptConnection() { } void KPPPWidget::sigPPPDDied() { - qDebug( "Received a SIGUSR1" ); + odebug << "Received a SIGUSR1" << oendl; // if we are not connected pppdpid is -1 so have have to check for that // in the followin line to make sure that we don't raise a false alarm // such as would be the case when the log file viewer exits. if(_pppdata->pppdRunning() || _pppdata->pppdError()) { - qDebug( "It was pppd that died" ); + odebug << "It was pppd that died" << oendl; // when we killpppd() on Cancel in ConnectWidget // we set pppid to -1 so we won't // enter this block @@ -441,9 +441,9 @@ void KPPPWidget::sigPPPDDied() { Modem::modem->removeSecret(AUTH_CHAP); _pppdata->setpppdRunning(false); - qDebug( "Executing command on disconnect since pppd has died." ); + odebug << "Executing command on disconnect since pppd has died." << oendl; QApplication::flushX(); execute_command(_pppdata->command_on_disconnect()); // stopAccounting(); @@ -488,9 +488,9 @@ void KPPPWidget::sigPPPDDied() { // if(QMessageBox::warning(0, msg, QObject::tr("Error"), QObject::tr("&OK"), QObject::tr("&Details...")) == QMessageBox::No) // // PPPL_ShowLog(); // } else { /* reconnect on disconnect */ if (false){ - qDebug( "Trying to reconnect... " ); + odebug << "Trying to reconnect... " << oendl; if(_pppdata->authMethod() == AUTH_PAP || _pppdata->authMethod() == AUTH_CHAP || _pppdata->authMethod() == AUTH_PAPCHAP) @@ -510,9 +510,9 @@ void KPPPWidget::sigPPPDDied() { } } // void KPPPWidget::sigChld() { -// qDebug( "sigchld()" ); +// odebug << "sigchld()" << oendl; // // pid_t id = wait(0L); // // if(id == helperPid && helperPid != -1) { // // kdDebug(5002) << "It was the setuid child that died" << endl; // // helperPid = -1; diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 3dbc8c3..f3f2639 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -54,9 +54,9 @@ #define qError qDebug #define MY_ASSERT(x) if (!(x)) { \ - qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \ + ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \ exit(1); } static sigjmp_buf jmp_buffer; @@ -164,9 +164,9 @@ bool Modem::opentty() { //begin if((modemfd = Requester::rq->openModem(gpppdata.modemDevice()))<0) { close(modemfd); device = _pppdata->modemDevice(); if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) { - qDebug("error opening modem device !"); + odebug << "error opening modem device !" << oendl; errmsg = QObject::tr("Unable to open modem."); return false; } //bend if((modemfd = Requester::rq->openModem(gpppdata.modemDevice()))<0) { @@ -305,11 +305,11 @@ void Modem::startNotifier() { if(modemfd >= 0) { if(sn == 0) { sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this); connect(sn, SIGNAL(activated(int)), SLOT(readtty(int))); - qDebug("QSocketNotifier started!"); + odebug << "QSocketNotifier started!" << oendl; } else { - qDebug("QSocketNotifier re-enabled!"); + odebug << "QSocketNotifier re-enabled!" << oendl; sn->setEnabled(true); } } } @@ -320,9 +320,9 @@ void Modem::stopNotifier() { sn->setEnabled(false); disconnect(sn); delete sn; sn = 0; - qDebug( "QSocketNotifier stopped!" ); + odebug << "QSocketNotifier stopped!" << oendl; } } @@ -336,9 +336,9 @@ bool Modem::writeChar(unsigned char c) { int s; do { s = write(modemfd, &c, 1); if (s < 0) { - qError( "write() in Modem::writeChar failed" ); + oerr << "write() in Modem::writeChar failed" << oendl; return false; } } while(s == 0); @@ -364,9 +364,9 @@ bool Modem::writeLine(const char *buf) { while(l) { int wr = write(modemfd, &b[len-l], l); if(wr < 0) { // TODO do something meaningful with the error code (or ignore it - qError( "write() in Modem::writeLine failed" ); + oerr << "write() in Modem::writeLine failed" << oendl; delete[] b; return false; } l -= wr; @@ -473,9 +473,9 @@ QString Modem::parseModemSpeed(const QString &s) { int tx = -1; int i; QString result; - qDebug( "Modem reported result string: %s", s.latin1()); + odebug << "Modem reported result string: " << s.latin1() << "" << oendl; const int RXMAX = 7; const int TXMAX = 2; QRegExp rrx[RXMAX] = { @@ -559,9 +559,9 @@ QString Modem::parseModemSpeed(const QString &s) { result.setNum(tx); else result.sprintf("%d/%d", rx, tx); - qDebug( "The parsed result is: %s", result.latin1()); + odebug << "The parsed result is: " << result.latin1() << "" << oendl; return result; } @@ -572,9 +572,9 @@ int Modem::lockdevice() { int fd; char newlock[80]=""; // safe if(!_pppdata->modemLockFile()) { - qDebug("The user doesn't want a lockfile."); + odebug << "The user doesn't want a lockfile." << oendl; return 0; } if (modem_is_locked) @@ -594,9 +594,9 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { if (sz <= 0) return 1; oldlock[sz] = '\0'; - qDebug( "Device is locked by: %s", oldlock); + odebug << "Device is locked by: " << oldlock << "" << oendl; int oldpid; int match = sscanf(oldlock, "%d", &oldpid); @@ -607,16 +607,16 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { // check if process exists if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH) return 1; - qDebug( "lockfile is stale" ); + odebug << "lockfile is stale" << oendl; } } fd = openLockfile(_pppdata->modemDevice(),O_WRONLY|O_TRUNC|O_CREAT); if(fd >= 0) { sprintf(newlock,"%010d\n", getpid()); - qDebug("Locking Device: %s", newlock); + odebug << "Locking Device: " << newlock << "" << oendl; write(fd, newlock, strlen(newlock)); close(fd); modem_is_locked=true; @@ -631,9 +631,9 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { // UnLock modem device void Modem::unlockdevice() { if (modem_is_locked) { - qDebug( "UnLocking Modem Device" ); + odebug << "UnLocking Modem Device" << oendl; close(modemfd); modemfd = -1; unlink(lockfile); lockfile[0] = '\0'; @@ -653,9 +653,9 @@ int Modem::openLockfile( QString lockfile, int flags) lockfile = LOCK_DIR; lockfile += "/LCK.."; lockfile += device.right( device.length() - device.findRev("/") -1 ); - qDebug("lockfile >%s<",lockfile.latin1()); + odebug << "lockfile >" << lockfile.latin1() << "<" << oendl; // TODO: // struct stat st; // if(stat(lockfile.data(), &st) == -1) { // if(errno == EBADF) @@ -665,9 +665,9 @@ int Modem::openLockfile( QString lockfile, int flags) // if(!S_ISREG(st.st_mode)) // return -1; // } if ((fd = open(lockfile, flags, mode)) == -1) { - qDebug("error opening lockfile!"); + odebug << "error opening lockfile!" << oendl; lockfile = QString::null; fd = open(DEVNULL, O_RDONLY); } else fchown(fd, 0, 0); @@ -926,17 +926,17 @@ bool Modem::execpppd(const char *arguments) { _exit(0); break; default: - qDebug("In parent: pppd pid %d\n",pppdPid); + odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl; close(modemfd); ::close( m_pppdLOG[1] ); // set it to nonblocking io int flag = ::fcntl( m_pppdLOG[0], F_GETFL ); if ( !(flag & O_NONBLOCK) ) { - qDebug("Setting nonblocking io"); + odebug << "Setting nonblocking io" << oendl; flag |= O_NONBLOCK; ::fcntl(m_pppdLOG[0], F_SETFL, flag ); } @@ -953,17 +953,17 @@ bool Modem::execpppd(const char *arguments) { } bool Modem::killpppd() { - qDebug("In killpppd and pid is %d", pppdPid ); + odebug << "In killpppd and pid is " << pppdPid << "" << oendl; if(pppdPid > 0) { delete m_modemDebug; m_modemDebug = 0; - qDebug("In killpppd(): Sending SIGTERM to %d\n", pppdPid); + odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl; if(kill(pppdPid, SIGTERM) < 0) { - qDebug("Error terminating %d. Sending SIGKILL\n", pppdPid); + odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl; if(kill(pppdPid, SIGKILL) < 0) { - qDebug("Error killing %d\n", pppdPid); + odebug << "Error killing " << pppdPid << "\n" << oendl; return false; } } } @@ -1034,9 +1034,9 @@ int Modem::pppdExitStatus() int Modem::openResolv(int flags) { int fd; if ((fd = open(_PATH_RESCONF, flags)) == -1) { - qDebug("error opening resolv.conf!"); + odebug << "error opening resolv.conf!" << oendl; fd = open(DEVNULL, O_RDONLY); } return fd; } @@ -1055,9 +1055,9 @@ void Modem::setPPPDevice( const QString& dev ) { pid_t Modem::pppPID()const { return pppdPid; } void Modem::setPPPDPid( pid_t pid ) { - qDebug("Modem setting pid"); + odebug << "Modem setting pid" << oendl; _pppdExitStatus = -1; pppdPid = pid; modemfd = -1; } diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index 97baf31..a8c99fd 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp @@ -24,12 +24,12 @@ PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, return; } interface = iface; - qDebug("PPPConfigWidget::PPPConfigWidget"); - qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); + odebug << "PPPConfigWidget::PPPConfigWidget" << oendl; + odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl; - qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); + odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl; QVBoxLayout *layout = new QVBoxLayout( this ); layout->setSpacing( 0 ); @@ -57,11 +57,11 @@ PPPConfigWidget::~PPPConfigWidget() } void PPPConfigWidget::accept() { - qDebug("PPPConfigWidget::accept"); - qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); - qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); + odebug << "PPPConfigWidget::accept" << oendl; + odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl; + odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl; interface->setInterfaceName( interface->data()->devname() ); interface->setHardwareName( interface->data()->accname() ); interface->save(); QDialog::accept(); diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp index f4727c1..567ccf8 100644 --- a/noncore/settings/networksettings/ppp/pppdata.cpp +++ b/noncore/settings/networksettings/ppp/pppdata.cpp @@ -55,10 +55,10 @@ PPPData::PPPData() Config cfg = config(); cfg.setGroup(GENERAL_GRP); accountList = cfg.readListEntry(ACCOUNT_LIST, ',' ); deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' ); - qDebug("PPPData::PPPData has a accountList %s", accountList.join("---").latin1()); - qDebug("PPPData::PPPData has a deviceList %s", deviceList.join("---").latin1()); + odebug << "PPPData::PPPData has a accountList " << accountList.join("---").latin1() << "" << oendl; + odebug << "PPPData::PPPData has a deviceList " << deviceList.join("---").latin1() << "" << oendl; // if (highcount > MAX_ACCOUNTS) // highcount = MAX_ACCOUNTS; @@ -85,9 +85,9 @@ Config PPPData::config() // save configuration // void PPPData::save() { - qDebug("PPPData saving data"); + odebug << "PPPData saving data" << oendl; writeConfig(GENERAL_GRP, NUMACCOUNTS_KEY, count()); writeConfig(GENERAL_GRP, NUMDEVICES_KEY, highcountdev + 1); QString key; QStringList keys; @@ -99,30 +99,30 @@ void PPPData::save() for( QMap<QString,QString>::Iterator it = stringEntries.begin(); it != stringEntries.end(); ++it ){ QString val = it.data(); key = it.key(); -// qDebug("saving %s -> %s", key.latin1(), val.latin1() ); +// odebug << "saving " << key.latin1() << " -> " << val.latin1() << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); - //qDebug("group >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val); } for( QMap<QString,int>::Iterator it = intEntries.begin(); it != intEntries.end(); ++it ){ int val = it.data(); key = it.key(); -// qDebug("saving %s -> %i", key.latin1(), val ); +// odebug << "saving " << key.latin1() << " -> " << val << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); - //qDebug("group >%s< key >%s< val %i", keys[0].latin1(), keys[1].latin1(), val ); + //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< val " << val << "" << oendl; cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val); } for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); it != listEntries.end(); ++it ){ QStringList val = it.data(); key = it.key(); QChar sep = sepEntries[key]; -// qDebug("saving %s -> %s", key.latin1(), val.join(sep).latin1() ); +// odebug << "saving " << key.latin1() << " -> " << val.join(sep).latin1() << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val, sep); } @@ -141,9 +141,9 @@ void PPPData::cancel() { // functions to read/write date to configuration file QString PPPData::readConfig(const QString &group, const QString &key, const QString &defvalue = "") { -// qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); +// odebug << "PPPData::readConfig key >" << key.latin1() << "< group >" << group.latin1() << "<" << oendl; QString idx = SEP.arg(group).arg(key); if (stringEntries.find(idx) != stringEntries.end()) return stringEntries[idx]; Config cfg = config(); @@ -364,23 +364,23 @@ const QString PPPData::modemDevice() { // return readConfig(modemGroup(), MODEMNAME_KEY); // } // bool PPPData::setModemName(const QString &n) { -// qDebug("Setting modem name to >%s<", n.latin1()); +// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl; // _modemName = n; // writeConfig(cgroup, MODEMNAME_KEY, n); // return true; //FIXME // } // bool PPPData::changeModemName(const QString &n) { -// qDebug("Setting modem name to >%s<", n.latin1()); +// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl; // _modemName = n; // writeConfig(modemGroup(), MODEMNAME_KEY, n); // return true; //FIXME // } bool PPPData::setModemDevice(const QString &n) { - qDebug("Setting modem dev to >%s<", n.latin1()); + odebug << "Setting modem dev to >" << n.latin1() << "<" << oendl; writeConfig(modemGroup(), MODEMDEV_KEY, n); return true; //FIXME } @@ -738,20 +738,20 @@ int PPPData::count() const { } bool PPPData::setAccount(const QString &aname) { - qDebug("setting account to >%s<", aname.latin1()); + odebug << "setting account to >" << aname.latin1() << "<" << oendl; for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { cgroup = *it; - qDebug("PPPData::setAccount %s", cgroup.latin1()); - qDebug( "iterator %s", (*it).latin1() ); + odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl; + odebug << "iterator " << (*it).latin1() << "" << oendl; if(accname() == aname) { - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return true; } } - qDebug("FAILURE"); + odebug << "FAILURE" << oendl; return false; } /* @@ -771,13 +771,13 @@ bool PPPData::setAccountbyIndex(int i) { bool PPPData::isUniqueAccname(const QString &n) { QString save_cgroup = cgroup; for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { cgroup = *it; - qDebug("PPPData::setAccount %s", cgroup.latin1()); - qDebug( "%s \n", (*it).latin1() ); + odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl; + odebug << "" << (*it).latin1() << " \n" << oendl; if(accname() == n && cgroup != save_cgroup) { cgroup = save_cgroup; - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return false; } } @@ -787,15 +787,15 @@ bool PPPData::isUniqueAccname(const QString &n) { bool PPPData::isUniqueDevname(const QString &n) { QString save_mName = _modemName; - qDebug("PPPData::isUniqueDevname checking if %s is unique", n.latin1()); + odebug << "PPPData::isUniqueDevname checking if " << n.latin1() << " is unique" << oendl; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::isUniqueDevname %s == %s", n.latin1() , devname().latin1()); + odebug << "PPPData::isUniqueDevname " << n.latin1() << " == " << devname().latin1() << "" << oendl; if(devname() == n && _modemName != save_mName) { _modemName = save_mName; - qDebug("NOT UNIQUE"); + odebug << "NOT UNIQUE" << oendl; return false; } } @@ -819,9 +819,9 @@ bool PPPData::deleteAccount() { key = it.key(); keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==cgroup){ stringEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; } } for( QMap<QString,int>::Iterator it = intEntries.begin(); it != intEntries.end(); ++it ){ @@ -829,9 +829,9 @@ bool PPPData::deleteAccount() { key = it.key(); keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==cgroup){ intEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl; } } for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); it != listEntries.end(); ++it ){ @@ -839,9 +839,9 @@ bool PPPData::deleteAccount() { key = it.key(); if(keys[0]==cgroup){ listEntries.remove( it ); sepEntries.remove( key ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl; } } return true; @@ -859,18 +859,18 @@ bool PPPData::deleteAccount(const QString &aname) { int PPPData::newaccount() { - qDebug("PPPData::newaccount highcount %i/%i",highcount,MAX_ACCOUNTS); + odebug << "PPPData::newaccount highcount " << highcount << "/" << MAX_ACCOUNTS << "" << oendl; // if(!config) open(); // if (highcount >= MAX_ACCOUNTS) return -1; QString tmp; tmp.sprintf("%s%i", ACCOUNT_GRP, ++highcount); cgroup = QString(tmp); accountList << tmp; - qDebug("PPPData::newaccount() Group: >%s<",cgroup.latin1()); + odebug << "PPPData::newaccount() Group: >" << cgroup.latin1() << "<" << oendl; setpppdArgumentDefaults(); return highcount; } @@ -964,11 +964,11 @@ void PPPData::setStoredUsername(const QString &b) { } const QString PPPData::storedPassword() { - qDebug("getting stored pw"); - qDebug("g %s", cgroup.latin1() ); - qDebug("k %s", STORED_PASSWORD_KEY); + odebug << "getting stored pw" << oendl; + odebug << "g " << cgroup.latin1() << "" << oendl; + odebug << "k " << STORED_PASSWORD_KEY << "" << oendl; return readConfig(cgroup, STORED_PASSWORD_KEY, ""); } @@ -1328,12 +1328,12 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) for( it = ifaces.begin(); it != ifaces.end(); ++it ){ cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++)); cfg.writeEntry( ACOUNTS_DEV, it.key() ); cfg.writeEntry( ACOUNTS_ACC, it.data() ); - qDebug("I %i",i); + odebug << "I " << i << "" << oendl; } cfg.setGroup( ACCLIST_GRP ); - qDebug("saved %i account settings", i); + odebug << "saved " << i << " account settings" << oendl; cfg.writeEntry( ACCOUNTS_COUNT, i ); } @@ -1371,9 +1371,9 @@ QStringList PPPData::getAccountList() const QString PPPData::devname() { QString tmp = readConfig(modemGroup(), MODEMNAME_KEY ); - qDebug("PPPData::devname() of %s is %s", modemGroup().latin1(), tmp.latin1()); + odebug << "PPPData::devname() of " << modemGroup().latin1() << " is " << tmp.latin1() << "" << oendl; return tmp; } void PPPData::setDevname(const QString &n) { @@ -1389,22 +1389,22 @@ void PPPData::setDevname(const QString &n) { bool PPPData::setDevice(const QString &dev ) { - qDebug("setting device to >%s<", dev.latin1()); + odebug << "setting device to >" << dev.latin1() << "<" << oendl; QString save_mName = _modemName; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::setDevice %s is named %s", _modemName.latin1(), devname().latin1() ); - qDebug( "iterator %s", (*it).latin1() ); + odebug << "PPPData::setDevice " << _modemName.latin1() << " is named " << devname().latin1() << "" << oendl; + odebug << "iterator " << (*it).latin1() << "" << oendl; if(devname() == dev) { - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return true; } } _modemName = save_mName; - qDebug("FAILURE"); + odebug << "FAILURE" << oendl; return false; } bool PPPData::deleteDevice() @@ -1423,9 +1423,9 @@ bool PPPData::deleteDevice() key = it.key(); keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==modemGroup()){ stringEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; } } for( QMap<QString,int>::Iterator it = intEntries.begin(); it != intEntries.end(); ++it ){ @@ -1433,9 +1433,9 @@ bool PPPData::deleteDevice() key = it.key(); keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==modemGroup()){ intEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl; } } for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); it != listEntries.end(); ++it ){ @@ -1443,9 +1443,9 @@ bool PPPData::deleteDevice() key = it.key(); if(keys[0]==modemGroup()){ listEntries.remove( it ); sepEntries.remove( key ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl; } } return true; @@ -1462,16 +1462,16 @@ bool PPPData::deleteDevice(const QString &dev) int PPPData::newdevice() { - qDebug("PPPData::newdevice highcount %i",highcountdev); + odebug << "PPPData::newdevice highcount " << highcountdev << "" << oendl; QString tmp; tmp.sprintf("%s%i", MODEM_GRP, ++highcountdev); _modemName = QString(tmp); deviceList << tmp; - qDebug("PPPData::newdevice() Group: >%s<",cgroup.latin1()); + odebug << "PPPData::newdevice() Group: >" << cgroup.latin1() << "<" << oendl; return highcountdev; } int PPPData::copydevice(const QString&) @@ -1483,12 +1483,12 @@ int PPPData::copydevice(const QString&) QStringList PPPData::getDevicesNamesList() { QStringList list; QString save_mName = _modemName; - qDebug("PPPData::getDevicesNamesList has %s", deviceList.join("---").latin1()); + odebug << "PPPData::getDevicesNamesList has " << deviceList.join("---").latin1() << "" << oendl; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::getDevicesNamesList adding %s as %s",_modemName.latin1(), devname().latin1()); + odebug << "PPPData::getDevicesNamesList adding " << _modemName.latin1() << " as " << devname().latin1() << "" << oendl; list << devname(); } _modemName = save_mName; return list; diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index a7caffe..2291e8a 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -59,20 +59,20 @@ PPPModule::PPPModule() : Module() QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); QMap<QString,QString>::Iterator it; InterfacePPP *iface; - qDebug("getting interfaces"); + odebug << "getting interfaces" << oendl; for( it = ifaces.begin(); it != ifaces.end(); ++it ) { - qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() ); + odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; iface = new InterfacePPP( 0, it.key() ); iface->setHardwareName( it.data() ); list.append( (Interface*)iface ); // check if (*it) is one of the running ifaces if ( running.contains( it.data() ) ) { - qDebug("iface is running %s", it.key().latin1() ); + odebug << "iface is running " << it.key().latin1() << "" << oendl; handledInterfaceNames << running[it.data()].device; iface->setStatus( true ); iface->setPPPDpid( running[it.data()].pid ); iface->modem()->setPPPDevice( running[it.data()].device ); @@ -87,18 +87,18 @@ PPPModule::PPPModule() : Module() * Delete any interfaces that we own. */ PPPModule::~PPPModule() { - qDebug("PPPModule::~PPPModule() " ); + odebug << "PPPModule::~PPPModule() " << oendl; QMap<QString,QString> ifaces; InterfaceKeeper keeper; Interface *i; for ( i=list.first(); i != 0; i=list.next() ) { /* if online save the state */ if ( i->getStatus() ) { - qDebug("Iface %s is still up", i->getHardwareName().latin1() ); + odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; InterfacePPP* ppp = static_cast<InterfacePPP*>(i); keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); } ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); @@ -140,9 +140,9 @@ bool PPPModule::isOwner(Interface *i) * @return QWidget* pointer to this modules configure. */ QWidget *PPPModule::configure(Interface *i) { - qDebug("return ModemWidget"); + odebug << "return ModemWidget" << oendl; PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, 0, "PPPConfig", false, (Qt::WDestructiveClose | Qt::WStyle_ContextHelp)); return pppconfig; @@ -167,9 +167,9 @@ QWidget *PPPModule::information(Interface *i) */ QList<Interface> PPPModule::getInterfaces() { // List all of the files in the peer directory - qDebug("PPPModule::getInterfaces"); + odebug << "PPPModule::getInterfaces" << oendl; return list; } /** @@ -260,9 +260,9 @@ namespace cfg.setGroup( (*it) ); con.name = (*it); con.pid = cfg.readNumEntry("pid"); con.device = cfg.readEntry("device"); - qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid ); + odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; if ( con.pid != -1 && isAvailable( con.pid ) ) ifaces.insert( con.name, con ); } @@ -271,13 +271,13 @@ namespace bool InterfaceKeeper::isAvailable( pid_t p)const { if (::kill(p, 0 ) == 0 || errno != ESRCH ) { - qDebug("isAvailable %d", p); + odebug << "isAvailable " << p << "" << oendl; return true; } - qDebug("notAvailable %d", p); + odebug << "notAvailable " << p << "" << oendl; return false; } } diff --git a/noncore/settings/networksettings/wlan/infoimp.cpp b/noncore/settings/networksettings/wlan/infoimp.cpp index bd56678..c558f5e 100644 --- a/noncore/settings/networksettings/wlan/infoimp.cpp +++ b/noncore/settings/networksettings/wlan/infoimp.cpp @@ -12,9 +12,9 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInfo(parent, name, fl){ WExtensions *wExtensions = new WExtensions(name); if(!wExtensions->doesHaveWirelessExtensions()){ delete wExtensions; - qDebug("WlanInfoImp::No wireless extension"); + odebug << "WlanInfoImp::No wireless extension" << oendl; return; } delete wExtensions; timer = new QTimer( this ); @@ -27,9 +27,9 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf */ void WlanInfoImp::update(){ WExtensions *wExtensions = new WExtensions(this->name()); if(!wExtensions->doesHaveWirelessExtensions()){ - qDebug("No extension"); + odebug << "No extension" << oendl; delete wExtensions; timer->stop(); return; } diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index d1fff88..9c64323 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp @@ -111,9 +111,9 @@ int WExtensions::channel(){ return channel; left += 0.005; right += 0.005; } - qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); + odebug << QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1() << oendl; return -1; } /*** @@ -176,22 +176,22 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ while(!wstream.atEnd()){ wstream >> name >> status >> quality >> c >> signal >> c >> noise; if(name == QString("%1:").arg(interface)){ if ( quality > 92 ) - qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); + odebug << "WIFIAPPLET: D'oh! Quality " << quality << " > estimated max!\n" << oendl; if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); + odebug << "WIFIAPPLET: Doh! Strength " << signal << " > estimated max!\n" << oendl; if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); - //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); + odebug << "WIFIAPPLET: Doh! Noise " << noise << " > estimated max!\n" << oendl; + //odebug << QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1() << oendl; signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; quality = ( quality*100 ) / 92; return true; } } - qDebug("WExtensions::statsCard no longer present."); + odebug << "WExtensions::statsCard no longer present." << oendl; quality = -1; signal = IW_LOWER; noise = IW_LOWER; return false; diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 80a9927..fe7941d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -44,9 +44,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W settingsFileText = QStringList::split("\n", line, true); parseSettingFile(); } else - qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); + odebug << QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1() << oendl; connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); } void WLANImp::typeChanged(int mod){ @@ -145,9 +145,9 @@ void WLANImp::changeAndSaveSettingFile(){ QFile::remove(wlanFile); QFile file(wlanFile); if (!file.open(IO_ReadWrite)){ - qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); + odebug << QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1() << oendl; return; } QTextStream stream( &file ); @@ -235,9 +235,9 @@ void WLANImp::accept(){ insert << "-c"; insert << "cardctl eject && cardctl insert"; if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) { - qWarning("could not start cardctl"); + owarn << "could not start cardctl" << oendl; } // Close out the dialog QDialog::accept(); diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index eeebe7f..e483efe 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp @@ -51,9 +51,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W // Check sanity - the existance of the wireless-tools if-pre-up script QFile file(QString(PREUP)); if (file.exists()) { - qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); + owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl; } connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); connect( netView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( selectNetwork(QListViewItem*) ) ); @@ -232,9 +232,9 @@ void WLANImp::writeOpts() { return; } bool error = false; - qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); + odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl; if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); @@ -306,9 +306,9 @@ void WLANImp::writeOpts() { void WLANImp::rescanNeighbourhood() { QString name = interface->getInterfaceName(); - qDebug( "rescanNeighbourhood via '%s'", (const char*) name ); + odebug << "rescanNeighbourhood via '" << (const char*) name << "'" << oendl; OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) ); assert( wiface ); @@ -329,14 +329,14 @@ void WLANImp::rescanNeighbourhood() } } if ( devicetype.isEmpty() ) { - qWarning( "rescanNeighbourhood(): couldn't guess device type :(" ); + owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl; return; } else { - qDebug( "rescanNeighbourhood(): device type seems to be '%s'", (const char*) devicetype ); + odebug << "rescanNeighbourhood(): device type seems to be '" << (const char*) devicetype << "'" << oendl; } // configure interface to receive 802.11 management frames @@ -348,25 +348,25 @@ void WLANImp::rescanNeighbourhood() else if ( devicetype == "wlan-ng" ) wiface->setMonitoring( new OWlanNGMonitoringInterface( wiface, false ) ); else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) ); else { - qDebug( "rescanNeighbourhood(): unsupported device type for monitoring :(" ); + odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl; return; } wiface->setMode( "monitor" ); if ( wiface->mode() != "monitor" ) { - qWarning( "rescanNeighbourhood(): Unable to bring device into monitor mode (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl; return; } // open a packet capturer OPacketCapturer* cap = new OPacketCapturer(); cap->open( name ); if ( !cap->isOpen() ) { - qWarning( "rescanNeighbourhood(): Unable to open libpcap (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; return; } // display splash screen @@ -397,17 +397,17 @@ void WLANImp::rescanNeighbourhood() { wiface->setChannel( i ); pb->setProgress( i ); qApp->processEvents(); - qDebug( "rescanNeighbourhood(): listening on channel %d...", i ); + odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl; OPacket* p = cap->next( 1000 ); if ( !p ) { - qDebug( "rescanNeighbourhood(): nothing received on channel %d", i ); + odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl; } else { - qDebug( "rescanNeighbourhood(): TADAA - something came in on channel %d", i ); + odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl; handlePacket( p ); } } @@ -438,9 +438,9 @@ void WLANImp::handlePacket( OPacket* p ) type = "managed"; } else { - qWarning( "handlePacket(): invalid frame [possibly noise] detected!" ); + owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl; return; } OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 74d7f8e..886af10 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -121,55 +121,55 @@ bool WLANModule::remove(Interface*){ } void WLANModule::receive(const QCString ¶m, const QByteArray &arg) { - qDebug("WLANModule::receive "+param); + odebug << "WLANModule::receive "+param << oendl; QStringList params = QStringList::split(",",param); int count = params.count(); - qDebug("WLANModule got %i params", count ); + odebug << "WLANModule got " << count << " params" << oendl; if (count < 2){ - qDebug("Erorr less than 2 parameter"); - qDebug("RETURNING"); + odebug << "Erorr less than 2 parameter" << oendl; + odebug << "RETURNING" << oendl; return; } QDataStream stream(arg,IO_ReadOnly); QString interface; QString action; int countMsgs = 0; stream >> interface; - qDebug("got count? >%s<",interface.latin1()); + odebug << "got count? >" << interface.latin1() << "<" << oendl; if (interface == "count"){ - qDebug("got count"); + odebug << "got count" << oendl; stream >> action; - qDebug("Got count num >%s<", action.latin1()); + odebug << "Got count num >" << action.latin1() << "<" << oendl; countMsgs = action.toInt(); } QDialog *toShow; //while (! stream.atEnd() ){ for (int i = 0; i < countMsgs; i++){ - qDebug("start stream %d/%d",i,countMsgs); + odebug << "start stream " << i << "/" << countMsgs << "" << oendl; if (stream.atEnd()){ - qDebug("end of stream"); + odebug << "end of stream" << oendl; return; } stream >> interface; - qDebug("got iface"); + odebug << "got iface" << oendl; stream >> action; - qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); + odebug << "WLANModule got interface " << interface.latin1() << " and acion " << action.latin1() << "" << oendl; // find interfaces Interface *ifa=0; for ( Interface *i=list.first(); i != 0; i=list.next() ){ if (i->getInterfaceName() == interface){ - qDebug("WLANModule found interface %s",interface.latin1()); + odebug << "WLANModule found interface " << interface.latin1() << "" << oendl; ifa = i; } } if (ifa == 0){ - qDebug("WLANModule Did not find %s",interface.latin1()); - qDebug("skipping"); + odebug << "WLANModule Did not find " << interface.latin1() << "" << oendl; + odebug << "skipping" << oendl; count = 0; } if (count == 2){ @@ -194,11 +194,11 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) toShow = (QDialog*) wlanconfigWiget; } QPEApplication::showWidget( wlanconfigWiget ); stream >> value; - qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); + odebug << "WLANModule (build 4) is setting " << action.latin1() << " of " << interface.latin1() << " to " << value.latin1() << "" << oendl; if (value.isEmpty()){ - qDebug("value is empty!!!\nreturning"); + odebug << "value is empty!!!\nreturning" << oendl; return; } if ( action.contains("ESSID") ){ QComboBox *combo = wlanconfigWiget->essid; @@ -217,39 +217,39 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) } }else if (action.contains("Channel")){ bool ok; - qDebug("converting channel"); + odebug << "converting channel" << oendl; int chan = value.toInt( &ok ); if (ok){ - qDebug("ok setting channel"); + odebug << "ok setting channel" << oendl; wlanconfigWiget->specifyChan->setChecked( true ); wlanconfigWiget->networkChannel->setValue( chan ); } }else if (action.contains("MacAddr")){ wlanconfigWiget->specifyAp->setChecked( true ); wlanconfigWiget->macEdit->setText( value ); }else - qDebug("wlan plugin has no clue"); + odebug << "wlan plugin has no clue" << oendl; } - qDebug("next stream"); + odebug << "next stream" << oendl; }// while stream - qDebug("end of stream"); + odebug << "end of stream" << oendl; if (toShow) toShow->exec(); - qDebug("returning"); + odebug << "returning" << oendl; } QWidget *WLANModule::getInfo( Interface *i) { - qDebug("WLANModule::getInfo start"); + odebug << "WLANModule::getInfo start" << oendl; WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); info->tabWidget->insertTab(information, "TCP/IP", 0); info->tabWidget->setCurrentPage( 0 ); info->tabWidget->showPage( information ); - if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); - else qDebug("infotab NOT OK"); - qDebug("current idx %d", info->tabWidget->currentPageIndex()); - qDebug("WLANModule::getInfo return"); + if (info->tabWidget->currentPage() == information ) odebug << "infotab OK" << oendl; + else odebug << "infotab NOT OK" << oendl; + odebug << "current idx " << info->tabWidget->currentPageIndex() << "" << oendl; + odebug << "WLANModule::getInfo return" << oendl; return info; } diff --git a/noncore/settings/sound/sound.pro b/noncore/settings/sound/sound.pro index a3804c3..58e94f3 100644 --- a/noncore/settings/sound/sound.pro +++ b/noncore/settings/sound/sound.pro @@ -1,8 +1,7 @@ CONFIG += qt warn_on quick-app HEADERS = soundsettings.h soundsettingsbase.h SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp -#INTERFACES = soundsettingsbase.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 TARGET = sound diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 8ad0a3f..d55a751 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -20,22 +20,26 @@ // parts copyright 2002 L.J. Potter #include "soundsettings.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> +using namespace Opie::Core; +/* QT */ #include <qcheckbox.h> #include <qcombobox.h> #include <qlabel.h> +/* STD */ #include <sys/utsname.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> -#include <stdio.h> #include <sys/stat.h> SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) @@ -72,9 +76,9 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) struct utsname name; /* check for embedix kernel running on the zaurus*/ if (uname(&name) != -1) {// TODO change this here,... QString release=name.release; if( release.find("embedix",0,TRUE) != -1) { - qDebug("IS System Zaurus"); + odebug << "IS System Zaurus" << oendl; systemZaurus=TRUE; } } if(!systemZaurus) { @@ -84,9 +88,9 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) sixteenBitCheckBox->setEnabled(FALSE); #else #endif int sRate=cfg.readNumEntry("SizeLimit", 30); - qDebug("%d",sRate); + odebug << "" << sRate << "" << oendl; if(sRate ==30) timeLimitComboBox->setCurrentItem(0); else if(sRate==20) @@ -142,26 +146,26 @@ void SoundSettings::updateStorageCombo() { QListIterator<FileSystem> it ( fs ); for( ; it.current(); ++it ){ const QString name = (*it)->name(); const QString path = (*it)->path(); - qDebug("storage name "+name +" storage path is "+path); + odebug << "storage name "+name +" storage path is "+path << oendl; list << name + ": " +path; if( loc.find( path,0,TRUE) != -1) set = i; // if(dit.current()->file().find(path) != -1 ) storage=name; i++; } LocationComboBox->insertStringList(list); - qDebug("set item %d", set); + odebug << "set item " << set << "" << oendl; LocationComboBox->setCurrentItem(set); } void SoundSettings::setLocation(const QString & string) { Config config( "Vmemo" ); config.setGroup( "System" ); config.writeEntry("RecLocation",string); - qDebug("set location "+string); + odebug << "set location "+string << oendl; config.write(); } void SoundSettings::cleanUp() { diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 96bcdfc..4163fb2 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -18,15 +18,18 @@ #include "benchmarkinfo.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/ostorageinfo.h> #include <opie2/olistview.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpedecoration_qws.h> #include <qpe/resource.h> #include <qpe/config.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qclipboard.h> #include <qcolor.h> @@ -50,12 +53,9 @@ #if defined (__GNUC__) && (__GNUC__ < 3) #define round qRound #endif -using namespace Opie::Ui; -using namespace Opie::Core; extern "C" - { void BenchFFT( void ); double dhry_main( int ); } @@ -147,9 +147,9 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) QTextStream ts( &f ); while( !ts.eof() ) { QString machline = ts.readLine(); - qDebug( "sysinfo: parsing benchmark results for '%s'", (const char*) machline ); + odebug << "sysinfo: parsing benchmark results for '" << (const char*) machline << "'" << oendl; QString resline = ts.readLine(); machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); machineCombo->insertItem( machline ); } @@ -172,9 +172,9 @@ void BenchmarkInfo::machineActivated( int index ) { QStringList* results = machines[ machineCombo->text( index ) ]; if ( !results ) { - qDebug( "sysinfo: no results available." ); + odebug << "sysinfo: no results available." << oendl; return; } QStringList::Iterator it = results->begin(); test_alu->setText( 2, *(it++) ); diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index 15aeaf5..4274203 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp @@ -62,9 +62,9 @@ TabManager::~TabManager(){ * @param parent - the parent to place any new tabs or apps into. If parent is * NULL then the item is a tab and should be placed as a child of the window. */ void TabManager::rescanFolder(QString directory, QListViewItem* parent){ - //qDebug(QString("rescanFolder: ") + directory.latin1()); + //odebug << QString("rescanFolder: ") + directory.latin1() << oendl; QDir d; d.setPath(directory); // Show hidden files for .directories @@ -206,9 +206,9 @@ void TabManager::removeItem(){ } // If removing failed. if(!removeSuccessful){ - qDebug((QString("removeItem: ") + location).latin1()); + odebug << (QString("removeItem: ") + location).latin1() << oendl; QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); return; } @@ -243,9 +243,9 @@ void TabManager::editItem( QListViewItem * item){ return; TabAppLnk app(itemList[item]); if(!app.isValid()){ - qDebug(QString("editItem: Not a valid applnk file: ") + itemList[item].latin1()); + odebug << QString("editItem: Not a valid applnk file: ") + itemList[item].latin1() << oendl; return; } // Fill with all of the icons @@ -272,9 +272,9 @@ void TabManager::editItem( QListViewItem * item){ foo = foo.smoothScale(16,16); imageOfFile.convertFromImage(foo); application->iconLineEdit->insertItem(imageOfFile,fileName); } - //qDebug(fi->fileName().latin1()); + //odebug << fi->fileName().latin1() << oendl; ++it; } waitDialog.hide(); } @@ -401,10 +401,10 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ if(!r.rename(itemList[item], newFolder)){ QMessageBox::critical(this, tr("Message"), "Can't move application.", tr("Ok") ); return; } - //qDebug((QString("moveApplication: ") + itemList[item]).latin1()); - //qDebug((QString("moveApplication: ") + newFolder).latin1()); + //odebug << (QString("moveApplication: ") + itemList[item]).latin1() << oendl; + //odebug << (QString("moveApplication: ") + newFolder).latin1() << oendl; // Move in the gui item->parent()->takeItem(item); newGroup->insertItem(item); @@ -414,9 +414,9 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ QString installedAppFile; if(findInstalledApplication(desktopFile, installedAppFile)) swapInstalledLocation(installedAppFile, desktopFile, newFolder); else - qDebug("moveApplication: No installed app found for dekstop file"); + odebug << "moveApplication: No installed app found for dekstop file" << oendl; // Move application type AppLnk app(newFolder); app.setType(folderName); @@ -463,9 +463,9 @@ bool TabManager::findInstalledApplication(QString desktopFile, QString &installe } file.close(); } else - qDebug((QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1()); + odebug << (QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1() << oendl; ++it; // goto next list element } return false; } @@ -478,9 +478,9 @@ bool TabManager::findInstalledApplication(QString desktopFile, QString &installe */ void TabManager::swapInstalledLocation( QString installedAppFile, QString desktopFile, QString newLocation ){ QFile file(installedAppFile); if ( !file.open(IO_ReadOnly) ){ - qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); + odebug << QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1() << oendl; return; } QTextStream stream( &file ); // use a text stream @@ -495,9 +495,9 @@ void TabManager::swapInstalledLocation( QString installedAppFile, QString deskto } file.close(); if ( !file.open(IO_ReadWrite) ){ - qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); + odebug << QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1() << oendl; return; } QTextStream streamOut( &file ); streamOut << allLines; diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index 5854fe0..3616507 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp @@ -10,10 +10,13 @@ #include "userdialog.h" #include "passwd.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/odevice.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qlayout.h> #include <qlabel.h> @@ -25,17 +28,12 @@ #include <sys/wait.h> #include <unistd.h> #include <signal.h> - -using namespace Opie::Core; - - /** * UserDialog constructor. Setup the dialog, fill the groupComboBox & groupsListView with all groups. * */ -using namespace Opie::Ui; UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) { vm=viewmode; QVBoxLayout *layout = new QVBoxLayout(this); @@ -244,9 +242,9 @@ bool UserDialog::addUser(int uid, int gid) if((adduserDialog->groupComboBox->currentItem()!=0)) { accounts->findGroup(adduserDialog->groupComboBox->currentText()); adduserDialog->groupID=accounts->gr_gid; - qWarning(QString::number(accounts->gr_gid)); + owarn << QString::number(accounts->gr_gid) << oendl; } if(!(accounts->addUser(adduserDialog->loginLineEdit->text(), adduserDialog->passwordLineEdit->text(), adduserDialog->uidLineEdit->text().toInt(), adduserDialog->groupID, adduserDialog->gecosLineEdit->text(), QString("/home/")+adduserDialog->loginLineEdit->text() , adduserDialog->shellComboBox->currentText()))) @@ -373,9 +371,9 @@ bool UserDialog::editUser(const char *username) QRegExp userRegExp(QString("[:,]%1$").arg(username)); // The end of line variant. QStringList tempList=accounts->groupStringList.grep(userRegExp); // Find all entries in the group database, that the user is a member of. for(QStringList::Iterator it=tempList.begin(); it!=tempList.end(); ++it) { // Iterate over all of them. - qWarning(*it); + owarn << *it << oendl; QListViewItemIterator lvit( edituserDialog->groupsListView ); // Compare to all groups. for ( ; lvit.current(); ++lvit ) { if(lvit.current()->text(0)==(*it).left((*it).find(":"))) @@ -388,9 +386,9 @@ bool UserDialog::editUser(const char *username) userRegExp=QRegExp(QString("[:,]%1,").arg(username)); // And the other one. (not end of line.) tempList=accounts->groupStringList.grep(userRegExp); // Find all entries in the group database, that the user is a member of. for(QStringList::Iterator it=tempList.begin(); it!=tempList.end(); ++it) { // Iterate over all of them. - qWarning(*it); + owarn << *it << oendl; QListViewItemIterator lvit( edituserDialog->groupsListView ); // Compare to all groups. for ( ; lvit.current(); ++lvit ) { if(lvit.current()->text(0)==(*it).left((*it).find(":"))) diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp index a1130d4..1d345ee 100644 --- a/noncore/settings/usermanager/usermanager.cpp +++ b/noncore/settings/usermanager/usermanager.cpp @@ -8,14 +8,17 @@ ***************************************************************************/ #include "usermanager.h" -#include <qlayout.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ +#include <qlayout.h> #include <qmessagebox.h> #include <qfile.h> -#include <qpe/resource.h> - #include <qregexp.h> /** * The mainwindow constructor. @@ -252,6 +255,6 @@ void UserConfig::delGroup() { } void UserConfig::showUserMenu(QListViewItem *item) { // userPopupMenu.exec(item->mapToGlobal(QPoint(0,0))); - qWarning("Pressed!"); + owarn << "Pressed!" << oendl; } diff --git a/noncore/settings/usermanager/usermanager.pro b/noncore/settings/usermanager/usermanager.pro index d0647dd..31f52a6 100644 --- a/noncore/settings/usermanager/usermanager.pro +++ b/noncore/settings/usermanager/usermanager.pro @@ -1,5 +1,4 @@ -#CONFIG = qt warn_on CONFIG = qt warn_on quick-app HEADERS = usermanager.h userdialog.h groupdialog.h passwd.h SOURCES = usermanager.cpp userdialog.cpp groupdialog.cpp passwd.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include diff --git a/noncore/styles/liquid/config.in b/noncore/styles/liquid/config.in index 23f8637..cffdb39 100644 --- a/noncore/styles/liquid/config.in +++ b/noncore/styles/liquid/config.in @@ -1,4 +1,4 @@ config LIQUID boolean "opie-liquid (Mosfet's well known Liquid GUI style from KDE)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBQTAUX + depends ( LIBQPE || LIBQPE-X11 ) && LIBQTAUX && LIBOPIE2CORE diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index bac882c..51814e7 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp @@ -10,14 +10,21 @@ #ifndef INCLUDE_MENUITEM_DEF #define INCLUDE_MENUITEM_DEF #endif -#include <qmenudata.h> #include "liquid.h" -//#include "liquiddeco.h" -#include <qapplication.h> -#include <qpe/config.h> #include "effects.h" +#include "htmlmasks.h" +#include "embeddata.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +using namespace Opie::Core; + +/* QT */ +#include <qmenudata.h> +#include <qapplication.h> #include <qpalette.h> #include <qbitmap.h> #include <qtabbar.h> #include <qpopupmenu.h> @@ -30,19 +37,17 @@ #include <qdrawutil.h> #include <qwidgetlist.h> #include <qtoolbutton.h> #include <qheader.h> -#include <unistd.h> #include <qmenubar.h> #include <qprogressbar.h> #include <qlineedit.h> #include <qlistbox.h> +/* STD */ +#include <unistd.h> #include <stdio.h> -#include "htmlmasks.h" -#include "embeddata.h" - typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *, QColorGroup &, bool, bool); @@ -148,9 +153,9 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) } else if(ev->type() == QEvent::Hide){ if(type == TransStippleBg || type == TransStippleBtn || type == Custom){ -// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); +// owarn << "Deleting menu pixmap, width " << pixDict.find(p->winId())->width() << "" << oendl; pixDict.remove(p->winId()); if ( !p->inherits("QPopupMenu")) p->setBackgroundMode(QWidget::PaletteBackground); @@ -493,9 +498,9 @@ QPixmap* LiquidStyle::processEmbedded(const char *label, int h, int s, int v, { QImage img(qembed_findImage(label)); img.detach(); if(img.isNull()){ // shouldn't happen, been tested - qWarning("Invalid embedded label %s", label); + owarn << "Invalid embedded label " << label << "" << oendl; return(NULL); } if(img.depth() != 32) img = img.convertDepth(32); @@ -859,9 +864,9 @@ void LiquidStyle::polish(QWidget *w) } if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())-> palette().active().brush(QColorGroup::Background).pixmap()){ - qWarning("No parent pixmap for child widget %s", w->className()); + owarn << "No parent pixmap for child widget " << w->className() << "" << oendl; return; } if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) && !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) { diff --git a/noncore/styles/liquid/liquid.pro b/noncore/styles/liquid/liquid.pro index 7fe2829..767007f 100644 --- a/noncore/styles/liquid/liquid.pro +++ b/noncore/styles/liquid/liquid.pro @@ -9,11 +9,11 @@ HEADERS = liquid.h \ effects.h \ liquidset.h \ plugin.h -LIBS += -lqpe -lqtaux2 +LIBS += -lqpe -lqtaux2 -lopiecore2 INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/plugins/styles TARGET = liquid -VERSION = 1.0.0 +VERSION = 1.0.1 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/theme/othemebase.cpp b/noncore/styles/theme/othemebase.cpp index 62b3a11..7ce4e5a 100644 --- a/noncore/styles/theme/othemebase.cpp +++ b/noncore/styles/theme/othemebase.cpp @@ -14,26 +14,28 @@ 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 "othemebase.h" #include "ogfxeffect.h" + +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> -//#include <kdebug.h> -//#include <klocale.h> #include <qpe/config.h> -//#include <kglobal.h> -//#include <kglobalsettings.h> -//#include <kstddirs.h> +using namespace Opie::Core; + +/* QT */ #include <qfile.h> #include <qtextstream.h> #include <qdir.h> #include <qpainter.h> #include <qbitmap.h> -#include <stdlib.h> #include <qstringlist.h> -#include <stdio.h> +/* STD */ +#include <stdlib.h> template class QIntCache<OThemePixmap> ; @@ -261,29 +263,23 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ ) configFileName = cfg. readEntry ( "Theme", "default" ); } Config config( configFilePath + "/themes/" + configFileName + ".themerc" , Config::File ); -// printf ( "Opened config file: %s\n", ( configFilePath + "/themes/" + configFileName + ".themerc" ). ascii()); - // Are we initalized? applyMiscResourceGroup( &config ); for ( i = 0; i < INHERIT_ITEMS; ++i ) { applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); -// printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); } for ( ; i < INHERIT_ITEMS*2; ++i ) { if ( config.hasGroup( QString( widgetEntries[ i ] ) ) ) { applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); -// printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); } else { copyfrom [ i ] = widgetEntries[ i - INHERIT_ITEMS ]; -// printf ( "%d [%s]: copy=%s\n", i, widgetEntries [i], copyfrom [i].latin1()); } } for ( ; i < WIDGETS; ++i ) { applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); -// printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); } // initalize defaults that may not be read for ( i = 0; i < WIDGETS; ++i ) @@ -294,9 +290,8 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ ) splitterWidth = 10; for ( i = 0; i < WIDGETS; ++i ) { readResourceGroup( i, copyfrom, pixnames, brdnames, loaded ); -// printf ( "%d [%s]: copy=%s, pix=%s, brd=%s, colors=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1(), (colors[i]?colors[i]->background().name().latin1():"<none)" )); } // misc items readMiscResourceGroup(); @@ -406,9 +401,9 @@ OThemePixmap* OThemeBase::scale( int w, int h, WidgetType widget ) if ( pixmaps[ widget ] ) cache->insert( pixmaps[ widget ], OThemeCache::FullScale, widget ); else - qDebug( "We would have inserted a null pixmap!\n" ); + odebug << "We would have inserted a null pixmap!\n" << oendl; pixmaps[ widget ] = cachePix; } else { cache->insert( pixmaps[ widget ], OThemeCache::FullScale, widget ); diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro index 2e4b4b3..74c60b1 100644 --- a/noncore/todayplugins/fortune/fortune.pro +++ b/noncore/todayplugins/fortune/fortune.pro @@ -1,6 +1,5 @@ TEMPLATE = lib -#CONFIG -= moc CONFIG += qt plugin # Input HEADERS = fortuneplugin.h fortunepluginimpl.h \ diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp index c3ee546..c147567 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp +++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp @@ -15,20 +15,23 @@ ***************************************************************************/ #include "fortunepluginwidget.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie::Core; +using namespace Opie::Ui; +/* QT */ #include <qvaluelist.h> #include <qtl.h> #include <qstring.h> #include <qscrollview.h> #include <qobject.h> #include <qlayout.h> -using namespace Opie::Core; -using namespace Opie::Ui; FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { @@ -66,9 +69,9 @@ void FortunePluginWidget::getFortune() { connect(fortuneProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning("could not start :("); + owarn << "could not start :(" << oendl; fortune->setText( QString("Failed to obtain fortune.") ); delete fortuneProcess; fortuneProcess = 0; } diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp index ce35256..ae219d7 100644 --- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp +++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp @@ -1,6 +1,13 @@ #include "inputDialog.h" +#include "helpwindow.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +using namespace Opie::Core; +/* QT */ #include <qapplication.h> #include <qlayout.h> #include <qcheckbox.h> #include <qlineedit.h> @@ -8,18 +15,13 @@ #include <qpushbutton.h> #include <qwhatsthis.h> #include <qlabel.h> #include <qlayout.h> -#include <qpe/config.h> #include <qstringlist.h> -using namespace Opie::Core; -using namespace Opie::Core; #include <qmainwindow.h> -#include "helpwindow.h" +/* STD */ #include <stdlib.h> -// #include <sys/stat.h> -// #include <unistd.h> InputDialog::InputDialog( ) : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) { setCaption( tr("Symbol Lookup")); @@ -53,9 +55,9 @@ void InputDialog::doLookup() { QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; QString tempHtml = "/tmp/stockticker.html"; QString cmd = "wget -O "+tempHtml+" "+url; - qDebug(cmd); + odebug << cmd << oendl; /* OProcess proc; @@ -75,9 +77,9 @@ void InputDialog::doLookup() { } void InputDialog::showBrowser(OProcess*) { - qDebug("BLAH"); + odebug << "BLAH" << oendl; QString tempHtml = "/tmp/stockticker.html"; HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); StockLookup->setCaption("Symbol"); diff --git a/noncore/todayplugins/stockticker/stocktickerlib/config.in b/noncore/todayplugins/stockticker/stocktickerlib/config.in index 4d589f9..7dbe03a 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/config.in +++ b/noncore/todayplugins/stockticker/stocktickerlib/config.in @@ -1,4 +1,4 @@ config TODAY_STOCKTICKERLIB boolean default "y" if TODAY_STOCKTICKER - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBOPIE2PIM && TODAY + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && TODAY diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro index e70d1c0..6dcf945 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro @@ -1,6 +1,5 @@ TEMPLATE = lib -CONFIG -= moc CONFIG += qt plugin HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ ../libstocks/csv.h \ @@ -19,10 +18,10 @@ INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library -LIBS+= -lqpe -lopieui2 -lopiepim2 -lpthread -TMAKE_CFLAGS += -D__UNIX__ +LIBS += -lqpe -lopiecore2 -lopieui2 -lopiepim2 -lpthread +DEFINES += __UNIX__ DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaystocktickerplugin diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index aaeb5ee..4855ac6 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp @@ -44,9 +44,9 @@ void getStocks(char *blah) { stock *stocks_tmp; stock_liste = blah; ::free ( blah ); // char *stock_liste = (char *)blah->latin1(); - // qDebug("%s", stock_liste.data() ); + // odebug << "" << stock_liste.data() << "" << oendl; output = ""; QString tempString; libstocks_return_code error; @@ -277,9 +277,9 @@ void getStocks(char *blah) { checkConnection(); } void StockTickerPluginWidget::checkConnection() { - // qDebug("checking connection"); + // odebug << "checking connection" << oendl; // Sock = new QSocket( this ); // if( wasError) // stocktickerTicker->setText("Checking connection"); @@ -288,24 +288,24 @@ void getStocks(char *blah) { // Sock->connectToHost("finance.yahoo.com", 80); // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); // } else { - // qDebug("State is not Idle"); + // odebug << "State is not Idle" << oendl; isConnected(); // } } void StockTickerPluginWidget::isConnected() { - // qDebug("We connect, so ok to grab stocks"); + // odebug << "We connect, so ok to grab stocks" << oendl; if(this->isVisible()) doStocks(); Config cfg( "stockticker"); cfg.setGroup("Timer"); timerDelay= cfg.readNumEntry("Delay",0); if(timerDelay > 0) startTimer(timerDelay*60000); - // qDebug("timer set for %d",(timerDelay*60000)/60000); + // odebug << "timer set for " << (timerDelay*60000)/60000 << "" << oendl; wasError = false; // Sock->close(); } diff --git a/noncore/tools/calc2/engine.cpp b/noncore/tools/calc2/engine.cpp index a9a47c4..e843e29 100644 --- a/noncore/tools/calc2/engine.cpp +++ b/noncore/tools/calc2/engine.cpp @@ -100,9 +100,9 @@ void Engine::pushValue (char v) num.i=displayString.toInt(&ok, calcBase()); }; if (!ok) { state = sError; - qDebug("pushValue() - num->string conversion"); + odebug << "pushValue() - num->string conversion" << oendl; } else { const QString constString = displayString; emit(display(constString)); }; @@ -126,18 +126,18 @@ void Engine::del () displayString.truncate(displayString.length()); num.dbl=displayString.toDouble(&ok); break; case rFraction: - qDebug("not available"); + odebug << "not available" << oendl; break; default: displayString.truncate(displayString.length()); num.i = displayString.toInt(&ok, calcBase()); }; if (!ok) { state = sError; - qDebug("del() - num->string conversion"); + odebug << "del() - num->string conversion" << oendl; } else { const QString constString = displayString; emit(display(constString)); }; @@ -148,9 +148,9 @@ void Engine::displayData(Data d) { case rDouble: displayString.setNum(d.dbl); break; case rFraction: - qDebug("fractional display not yet impl"); + odebug << "fractional display not yet impl" << oendl; break; default: displayString.setNum(d.i, calcBase()); break; @@ -171,9 +171,9 @@ int Engine::calcBase () { case rHex: return 16; default: state = sError; - qDebug("Error - attempt to calc base for non-integer"); + odebug << "Error - attempt to calc base for non-integer" << oendl; return 10; }; } diff --git a/noncore/tools/calculator/calculator.pro b/noncore/tools/calculator/calculator.pro index ae6a666..78d4519 100644 --- a/noncore/tools/calculator/calculator.pro +++ b/noncore/tools/calculator/calculator.pro diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp index dead03d..05cb9b5 100644 --- a/noncore/tools/calculator/calculatorimpl.cpp +++ b/noncore/tools/calculator/calculatorimpl.cpp @@ -25,12 +25,16 @@ // Sat 03-09-2002 L.J. Potter added the inlined pixmaps here #include "calculatorimpl.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/resource.h> #include <qpe/qmath.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qpushbutton.h> #include <qcombobox.h> #include <qlabel.h> #include <qfont.h> @@ -38,9 +42,12 @@ #include <qstringlist.h> #include <qfile.h> #include <qtextstream.h> #include <qmessagebox.h> + +/* STD */ #include <math.h> + /* XPM */ static char *oneoverx_xpm[] = { /* width height num_colors chars_per_pixel */ " 13 11 2 1", @@ -232,9 +239,9 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, QString tmp = QPEApplication::qpeDir(); tmp += "etc/unit_conversion.dat"; QFile myfile(tmp); if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) { - qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp); + odebug << "Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp << oendl; // disable the f button if no conv file available ComboBoxFunction->setEnabled(FALSE); } else { @@ -506,9 +513,9 @@ void CalculatorImpl::execOp( Operation i ) if ( numOpenBraces == 0 ) return; processStack( oAdd ); if ( operationStack.top().operation != oOpenBrace ) - qDebug( "Calculator: internal Error" ); + odebug << "Calculator: internal Error" << oendl; operationStack.pop(); state = sNewNumber; numOpenBraces--; break; diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index 4204d73..642196e 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp @@ -10,15 +10,16 @@ #include "inputDialog.h" #include "output.h" /* OPIE */ -#include <qtoolbar.h> +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/mimetype.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> +using namespace Opie::Core; /* QT */ #include <qmenubar.h> #include <qmultilineedit.h> @@ -34,8 +35,9 @@ #include <qregexp.h> #include <qlabel.h> #include <qlineedit.h> #include <qpushbutton.h> +#include <qtoolbar.h> #include <qtabwidget.h> #include <qwidget.h> #include <qlayout.h> #include <qvariant.h> @@ -237,14 +239,14 @@ void FormatterApp::doFormat() outDlg->OutputEdit->append( tr("Trying to umount %1.").arg( currentText) ); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); sleep(1); - qDebug("Command is "+umountS); + odebug << "Command is "+umountS << oendl; fp = popen( (const char *) umountS, "r"); - // qDebug("%d", fp); + // odebug << "" << fp << "" << oendl; if ( !fp ) { - qDebug("Could not execute '" + umountS + "'! err=%d\n" +(QString)strerror(errno), err); + odebug << "Could not execute '" + umountS + "'! err=" << err << "\n" +(QString)strerror(errno) << oendl; QMessageBox::warning( this, tr("Formatter"), tr("umount failed!"), tr("&OK") ); pclose(fp); return; } @@ -255,9 +257,9 @@ void FormatterApp::doFormat() while ( fgets( line, sizeof line, fp)) { if( ((QString)line).find("busy",0,TRUE) != -1) { - qDebug("Could not find '" + umountS); + odebug << "Could not find '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("Could not umount.\nDevice is busy!"), tr("&OK") ); pclose(fp); return; } @@ -271,18 +273,18 @@ void FormatterApp::doFormat() } } pclose(fp); - qDebug("Command would be: "+cmd); + odebug << "Command would be: "+cmd << oendl; outDlg->OutputEdit->append( tr("Trying to format.") ); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); fp = popen( (const char *) cmd, "r"); while ( fgets( line, sizeof line, fp)) { if( ((QString)line).find("No such device",0,TRUE) != -1) { - qDebug("No such device '" + umountS); + odebug << "No such device '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("No such device!"), tr("&OK") ); pclose(fp); // outDlg->OutputEdit->append("No such device"); // outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); @@ -304,9 +306,9 @@ void FormatterApp::doFormat() outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); fp = popen( (const char *) remountS, "r"); if ( !fp) { - qDebug("Could not execute '" + remountS + "'! err=%d\n" +(QString)strerror(errno), err); + odebug << "Could not execute '" + remountS + "'! err=" << err << "\n" +(QString)strerror(errno) << oendl; QMessageBox::warning( this, tr("Formatter"), tr("Card mount failed!"), tr("&OK") ); } else @@ -379,9 +381,9 @@ void FormatterApp::storageComboSelected(int index ) TextLabel4->setText( tr( "Storage Type: %1").arg( nameS) ); currentText = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); QString fsType = getFileSystemType((const QString &) currentText); - // qDebug(fsType); + // odebug << fsType << oendl; for(int i = 0; i < fileSystemsCombo->count(); i++) { if( fsType == fileSystemsCombo->text(i)) fileSystemsCombo->setCurrentItem(i); @@ -463,9 +465,9 @@ void FormatterApp::parsetab(const QString &fileName) & filesystemType.find("cramfs",0,TRUE) == -1 & filesystemType.find("auto",0,TRUE) == -1) fsList << filesystemType; deviceList << deviceName; - qDebug(deviceName+"::"+filesystemType); + odebug << deviceName+"::"+filesystemType << oendl; fileSystemTypeList << deviceName+"::"+filesystemType; } } } @@ -505,9 +507,9 @@ QString FormatterApp::getFileSystemType(const QString ¤tText) QString temp = (*it); if( temp.find( currentText,0,TRUE) != -1) { return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); - // qDebug(fsType); + // odebug << fsType << oendl; } } return ""; } @@ -532,9 +534,9 @@ bool FormatterApp::doFsck() // #endif QString fsType = getFileSystemType((const QString &)selectedDevice); QString cmd; - qDebug( selectedDevice +" "+ fsType); + odebug << selectedDevice +" "+ fsType << oendl; if(fsType == "vfat") cmd = "dosfsck -vy "; if(fsType == "ext2") cmd = "e2fsck -cpvy "; cmd += selectedDevice + " 2>&1"; @@ -546,14 +548,14 @@ bool FormatterApp::doFsck() outDlg->OutputEdit->append( tr("Trying to umount.")); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); sleep(1); - // qDebug("Command is "+umountS); + // odebug << "Command is "+umountS << oendl; fp = popen( (const char *) umountS, "r"); - // qDebug("%d", fp); + // odebug << "" << fp << "" << oendl; if ( !fp ) { - qDebug("Could not execute '" + umountS + "'!\n" +(QString)strerror(errno)); + odebug << "Could not execute '" + umountS + "'!\n" +(QString)strerror(errno) << oendl; QMessageBox::warning( this, tr("Formatter"), tr("umount failed!"), tr("&OK") ); pclose(fp); return false; } @@ -564,9 +566,9 @@ bool FormatterApp::doFsck() while ( fgets( line, sizeof line, fp)) { if( ((QString)line).find("busy",0,TRUE) != -1) { - qDebug("Could not find '" + umountS); + odebug << "Could not find '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("Could not umount.\nDevice is busy!"), tr("&OK") ); pclose(fp); return false; @@ -586,9 +588,9 @@ bool FormatterApp::doFsck() while ( fgets( line, sizeof line, fp)) { if( ((QString)line).find("No such device",0,TRUE) != -1) { - qDebug("No such device '" + umountS); + odebug << "No such device '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("No such device!"), tr("&OK") ); pclose(fp); // outDlg->OutputEdit->append("No such device"); // outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); diff --git a/noncore/tools/formatter/formatter.pro b/noncore/tools/formatter/formatter.pro index 913cca8..f6d34c7 100644 --- a/noncore/tools/formatter/formatter.pro +++ b/noncore/tools/formatter/formatter.pro |