20 files changed, 209 insertions, 170 deletions
diff --git a/noncore/apps/opie-write/qrichtext_p.h b/noncore/apps/opie-write/qrichtext_p.h index e368edb..3778feb 100644 --- a/noncore/apps/opie-write/qrichtext_p.h +++ b/noncore/apps/opie-write/qrichtext_p.h @@ -45,16 +45,19 @@ // This file is not part of the Qt API. It exists for the convenience // of a number of Qt sources files. This header file may change from // version to version without notice, or even be removed. // // We mean it. // // +#include <opie2/odebug.h> +using namespace Opie::Core; + #ifndef QT_H #include "qstring.h" #include "qlist.h" #include "qrect.h" #include "qfontmetrics.h" #include "qintdict.h" #include "qmap.h" #include "qstringlist.h" @@ -1878,17 +1881,17 @@ inline int QTextParagraph::endState() const inline void QTextParagraph::setParagId( int i ) { id = i; } inline int QTextParagraph::paragId() const { if ( id == -1 ) - qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this ); + owarn << "invalid parag id!!!!!!!! (" << (void*)this << ")" << oendl; return id; } inline bool QTextParagraph::firstPreProcess() const { return firstPProcess; } diff --git a/noncore/apps/tableviewer/browsekeyentry.cpp b/noncore/apps/tableviewer/browsekeyentry.cpp index 04e7902..bab9af6 100644 --- a/noncore/apps/tableviewer/browsekeyentry.cpp +++ b/noncore/apps/tableviewer/browsekeyentry.cpp @@ -14,28 +14,30 @@ ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "browsekeyentry.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qtoolbutton.h> #include <qwidgetstack.h> #include <qlayout.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qpopupmenu.h> #include <qhbox.h> #include <qdatetime.h> -//#include <iostream.h> -#include <qheader.h> -// For qWarning(const char *) /*! \class TVBrowseKeyEntry \brief a Widget used enter keys into the TVBrowseViewWidget The TVBrowseKeyEntry Widget provides the facility to enter various key types to be search on in the table. The key can be changed and the entry field will update to the correct sort of widget appropriately @@ -223,18 +225,17 @@ void TVBrowseKeyEntry::searchOnText() if (!ok) return; if(!QDate::isValid(y, m, d)) return; sendkey = (void *) new QDate(y, m, d); break; } default: - qWarning("TVBrowseKeyEntry::searchOnText() " - "cannot work out data type"); + owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl; return; } emit searchOnKey(ts->current_column, sendkey); } /*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, void *v) This signal indicates that a search on key index currentKeyId should be diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index b58af85..c35dbea 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp @@ -855,18 +855,17 @@ int KeyList::addKey(QString name, TVVariant::KeyType type) break; case TVVariant::Time: return addKey(name, TVVariant(QTime(0,0,0)).toTime()); break; case TVVariant::Int: return addKey(name, TVVariant(0).toInt()); break; default: - qWarning(QObject::tr("KeyList::addKey() Cannot make default " - "value for type %1, Key not added.").arg(type)); + owarn << "KeyList::addKey() Cannot make default value for type " << type << ", Key not added." << oendl; break; } return -1; } void KeyList::setKeyFlags(int i, int flag) { if(find(i)) @@ -1203,19 +1202,17 @@ void DataElem::setField(int i, QString q) return; } case TVVariant::Time: { t.asTime(); setField(i, t); return; } default: - qWarning( - QObject::tr("DataElem::setField(%1, %2) No valid type found").arg(i).arg(q) - ); + owarn << "DataElem::setField(" << i << ", " << q << ") No valid type found" << oendl; } } /*! Sets the value of the elements field index i to the value at the pointer value. \param i index of the field to set diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp index 6380e1b..de57961 100644 --- a/noncore/apps/tableviewer/db/datacache.cpp +++ b/noncore/apps/tableviewer/db/datacache.cpp @@ -151,17 +151,17 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) */ void DBStore::addItem(DataElem *delem) { addItemInternal(delem); } void DBStore::addItemInternal(DataElem *delem) { - /* if already full, don't over fill, do a qWarning though */ + /* if already full, don't over fill, do a owarn though */ if (full) { owarn << "Attempted to add items to already full table" << oendl; return; } master_table.insert(number_elems, delem); current_elem = number_elems; diff --git a/noncore/apps/tableviewer/db/datacache.h b/noncore/apps/tableviewer/db/datacache.h index c5dc637..e38050c 100644 --- a/noncore/apps/tableviewer/db/datacache.h +++ b/noncore/apps/tableviewer/db/datacache.h @@ -22,40 +22,46 @@ * This file is used to load the xml files that represent the database. * The main requirment for said file is each data entry must contain a key, * otherwise any other data headings are allowed. */ #ifndef __DATACACHE_H__ #define __DATACACHE_H__ +#include "common.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qstring.h> #include <qvector.h> -#include "common.h" class DBStore; /*! Abstract class that defines how database stuff can be accessed */ class DBAccess { public: // DBAccess(DBStore *d) { dstore = d; } virtual ~DBAccess() {} virtual QString type() { return QString(); } virtual bool openSource(QIODevice *) { - qWarning("DBAccess::openSource not yet implemented"); + owarn << "DBAccess::openSource not yet implemented" << oendl; return false; } virtual bool saveSource(QIODevice *) { - qWarning("DBAccess::saveSource(QString) not yet implemented"); + owarn << "DBAccess::saveSource(QString) not yet implemented" << oendl; return false; } protected: DBStore *dstore; QString source_name; }; diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.cpp b/noncore/apps/tableviewer/ui/browsekeyentry.cpp index 42e24dd..6b78437 100644 --- a/noncore/apps/tableviewer/ui/browsekeyentry.cpp +++ b/noncore/apps/tableviewer/ui/browsekeyentry.cpp @@ -15,28 +15,28 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "browsekeyentry.h" #include "commonwidgets.h" +#include <opie2/odebug.h> +using namespace Opie::Core; + #include <qtoolbutton.h> #include <qwidgetstack.h> #include <qlayout.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qpopupmenu.h> #include <qhbox.h> #include <qdatetime.h> -#include <qheader.h> -// For qWarning(const char *) - /*! \class TVBrowseKeyEntry \brief a Widget used enter keys into the TVBrowseViewWidget The TVBrowseKeyEntry Widget provides the facility to enter various key types to be search on in the table. The key can be changed and the entry field will update to the correct sort of widget appropriately */ @@ -187,18 +187,17 @@ void TVBrowseKeyEntry::searchOnText() } case TVVariant::Date: { sendkey = TVVariant(QDate(dateKey->date())); break; } case TVVariant::Invalid: break; default: - qWarning("TVBrowseKeyEntry::searchOnText() " - "cannot work out data type"); + owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl; return; } emit searchOnKey(ts->current_column, sendkey); } /*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, TVVariant) This signal indicates that a search on key index currentKeyId should be diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.cpp b/noncore/apps/tableviewer/ui/filterkeyentry.cpp index d108fbd..4d74d6b 100644 --- a/noncore/apps/tableviewer/ui/filterkeyentry.cpp +++ b/noncore/apps/tableviewer/ui/filterkeyentry.cpp @@ -15,16 +15,21 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "filterkeyentry.h" #include "commonwidgets.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qwidgetstack.h> #include <qcombobox.h> #include <qlayout.h> #include <qlineedit.h> #include <qsizepolicy.h> #include <qdatetime.h> #include <qhbox.h> @@ -195,14 +200,13 @@ TVVariant TVFilterKeyEntry::getCompareValue() break; } case TVVariant::Date: { sendkey = TVVariant(QDate(dateKey->date())); break; } default: { sendkey = TVVariant(0); - qWarning("TVFilterKeyEntry::getCompareValue() " - "cannot work out data type"); + owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl; } } return sendkey; } diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index 22f1fb7..198c8b5 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp @@ -13,25 +13,31 @@ ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "tvfilterview.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> +using namespace Opie::Core; + +/* QT */ #include <qtoolbutton.h> #include <qcombobox.h> #include <qlistview.h> #include <qlayout.h> #include <qheader.h> #include <qpushbutton.h> #include <qlabel.h> -#include <qpe/qpeapplication.h> TVFilterView::TVFilterView(TableState *t, QWidget* parent, const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) { if ( !name ) setName( "Filter View" ); QVBoxLayout *vlayout = new QVBoxLayout(this); @@ -170,18 +176,17 @@ bool TVFilterView::passesFilter(DataElem *d) { if (!d->startsWith(t->keyIndex, t->value)) return false; break; case ct_endswith: if (!d->endsWith(t->keyIndex, t->value)) return false; break; default: - qWarning("TVFilterView::passesFilter() " - "unrecognized filter type"); + owarn << "TVFilterView::passesFilter() unrecognized filter type" << oendl; return false; } } return true; } bool TVFilterView::filterActive() const { diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp index 782b629..4b8ce78 100644 --- a/noncore/apps/tinykate/libkate/kateconfig.cpp +++ b/noncore/apps/tinykate/libkate/kateconfig.cpp @@ -19,16 +19,17 @@ **********************************************************************/ #define QTOPIA_INTERNAL_LANGLIST #include "kateconfig.h" /* OPIE */ #include <opie2/odebug.h> #include <qpe/global.h> +using namespace Opie::Core; /* QT */ #include <qdir.h> #include <qmessagebox.h> #if QT_VERSION <= 230 && defined(QT_NO_CODECS) #include <qtextcodec.h> #endif #include <qtextstream.h> @@ -551,18 +552,17 @@ void KateConfig::write( const QString &fn ) f.close(); QFile::remove( strNewFile ); return; } f.close(); // now rename the file... if ( rename( strNewFile, filename ) < 0 ) { - qWarning( "problem renaming the file %s to %s", strNewFile.latin1(), - filename.latin1() ); + owarn << "problem renaming the file " << strNewFile.latin1() << " to " << filename.latin1() << oendl; QFile::remove( strNewFile ); } } /*! Returns whether the KateConfig is in a valid state. */ bool KateConfig::isValid() const diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 4fe319b..5f48f77 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp @@ -3,21 +3,29 @@ ** ** $Id$ ** ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html */ #include "zsafe.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #ifdef DESKTOP #include <qapplication.h> #else #include <qpe/qpeapplication.h> #endif + +/* STD */ #include <stdio.h> #include <signal.h> ZSafe *zs; #ifdef DESKTOP QApplication *appl; #else QPEApplication *appl; @@ -69,29 +77,26 @@ int main( int argc, char ** argv ) { DeskW = 600; DeskH = 400; } #else DeskW = a.desktop()->width(); DeskH = a.desktop()->height(); - char buf[128]; - sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); - qWarning (buf); + owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; #ifdef JPATCH_HDE // nothings #else if (DeskW > 240) { DeskW -= 20; DeskH += 25; - sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); - qWarning (buf); + owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; } #endif #endif ZSafe mw; zs = &mw; diff --git a/noncore/apps/zsafe/zlistview.cpp b/noncore/apps/zsafe/zlistview.cpp index ba02a15..7d0b8c2 100644 --- a/noncore/apps/zsafe/zlistview.cpp +++ b/noncore/apps/zsafe/zlistview.cpp @@ -1,31 +1,34 @@ /* ** $Id$ */ #include "zlistview.h" -#include <stdio.h> #include "zsafe.h" +/* OPIE */ +//#include <opie2/odebug.h> + +/* STD */ +#include <stdio.h> + ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) { zs = zsafe; } ZListView::~ZListView() { } void ZListView::keyPressEvent ( QKeyEvent *e ) { /* - char buf[64]; - sprintf (buf, "key: %d\n", e->key()); - qWarning (buf); + owarn << "key: " << e->key() << oendl; */ switch (e->key()) { case 32: // middle cursor key pressed zs->showInfo (zs->selectedItem); break; default: diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 6ff05ac..ca3ff52 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -876,17 +876,17 @@ void ZSafe::findPwd() QString name; QString username; QString comment; if (result == Accepted) { name = dialog->NameField->text(); username = dialog->UsernameField->text(); comment = dialog->CommentField->text(); - qWarning (name); + owarn << name << oendl; } else { delete dialog; return; } if (!name.isEmpty() && name != lastSearchedName || @@ -922,48 +922,48 @@ void ZSafe::findPwd() if (lastSearchedCategory) i = lastSearchedCategory; else i = ListView->firstChild(); for (; i != NULL; i = i->nextSibling()) { - qWarning (i->text(0)); + owarn << i->text(0) << oendl; i->setSelected(FALSE); // step through all subitems QListViewItem *si; if (lastSearchedItem) si = lastSearchedItem; else si = i->firstChild(); // for (si = i->firstChild(); for (; si != NULL; si = si->nextSibling()) { - qWarning (si->text(0)); + owarn << si->text(0) << oendl; if (si->isSelected()) si->setSelected(FALSE); // ListView->repaintItem(si); bool n=TRUE; bool u=TRUE; bool c=TRUE; if (!name.isEmpty()) n = (si->text(0)).contains (name, FALSE); if (!username.isEmpty()) u = (si->text(1)).contains (username, FALSE); if (!comment.isEmpty()) c = (si->text(3)).contains (comment, FALSE); if ((n && u && c ) && !found) { - qWarning ("Found"); + owarn << "Found" << oendl; selectedItem = si; si->setSelected(TRUE); ListView->setCurrentItem(si); ListView->ensureItemVisible(si); ListView->triggerUpdate(); lastSearchedCategory = i; // set to the next item @@ -1223,18 +1223,17 @@ void ZSafe::removeAsciiFile() "Choose a text file" ); #endif if (fn && fn.length() > 0 ) { QFile f( fn ); if ( !f.remove() ) { - qWarning( QString("Could not remove file %1").arg(fn), - 2000 ); + owarn << "Could not remove file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not remove text file.") ); return; } } } void ZSafe::writeAllEntries() @@ -1273,18 +1272,17 @@ void ZSafe::writeAllEntries() "Choose a text file" ); #endif // open the new document if (fn && fn.length() > 0 ) { QFile f( fn ); if ( !f.open( IO_WriteOnly ) ) { - qWarning( QString("Could not write to file %1").arg(fn), - 2000 ); + owarn << "Could not write to file " << fn << oendl; QMessageBox::critical( 0, "ZSafe", QString("Could not export to text file.") ); return; } QTextStream t( &f ); QListViewItem *i; // step through all categories @@ -1317,20 +1315,20 @@ void ZSafe::writeAllEntries() oneEntry += comment; oneEntry += "\";"; oneEntry += "\""; oneEntry += si->text(4); oneEntry += "\";"; oneEntry += "\""; oneEntry += si->text(5); oneEntry += "\""; - // qWarning (oneEntry); + // owarn << oneEntry << oendl; t << oneEntry << endl; - // qWarning (si->text(0)); + // owarn << si->text(0) << oendl; } } f.close(); } } void ZSafe::readAllEntries() { @@ -1368,18 +1366,17 @@ void ZSafe::readAllEntries() "Choose a text file" ); #endif if (fn && fn.length() > 0 ) { QFile f( fn ); if ( !f.open( IO_ReadOnly ) ) { - qWarning( QString("Could not read file %1").arg(fn), - 2000 ); + owarn << "Could not read file " << fn << oendl; QMessageBox::critical( 0, "ZSafe", QString("Could not import text file.") ); return; } modified = true; // clear the password list @@ -1398,17 +1395,17 @@ void ZSafe::readAllEntries() { QListViewItem *_si = si; si = si->nextSibling(); i->takeItem(_si); // remove from view list if (_si) delete _si; } } - qWarning ("ReadAllEntries(): "); + owarn << "ReadAllEntries(): " << oendl; QTextStream t(&f); while ( !t.eof() ) { QString s = t.readLine(); s.replace (QRegExp("\";\""), "\"|\""); // char buffer[1024]; #ifndef WIN32 @@ -1549,18 +1546,17 @@ void ZSafe::readAllEntries() #ifdef UNUSED void ZSafe::writeAllEntries() { // open the file for writing QString fn = filename + ".txt"; QFile f( fn ); if ( !f.open( IO_WriteOnly ) ) { - qWarning( QString("Could not write to file %1").arg(fn), - 2000 ); + owarn << "Could not write to file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not export to text file.") ); return; } QTextStream t( &f ); QListViewItem *i; // step through all categories @@ -1588,33 +1584,32 @@ void ZSafe::writeAllEntries() oneEntry += si->text(2); oneEntry += "\";"; oneEntry += "\""; // oneEntry += si->text(3); QString comment = si->text(3); comment.replace (QRegExp("\n"), "<br>"); oneEntry += comment; oneEntry += "\""; - // qWarning (oneEntry); + // owarn << oneEntry << oendl; t << oneEntry << endl; - // qWarning (si->text(0)); + // owarn << si->text(0) << oendl; } } f.close(); } void ZSafe::readAllEntries() { QString fn = filename + ".txt"; QFile f( fn ); if ( !f.open( IO_ReadOnly ) ) { - qWarning( QString("Could not read file %1").arg(fn), - 2000 ); + owarn << "Could not read file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not import text file.") ); return; } modified = true; // clear the password list @@ -1633,17 +1628,17 @@ void ZSafe::readAllEntries() { QListViewItem *_si = si; si = si->nextSibling(); i->takeItem(_si); // remove from view list if (_si) delete _si; } } - qWarning ("ReadAllEntries(): "); + owarn << "ReadAllEntries(): " << oendl; QTextStream t(&f); while ( !t.eof() ) { QString s = t.readLine(); s.replace (QRegExp("\";\""), "\"|\""); // char buffer[1024]; int len=s.length()+1; @@ -1757,17 +1752,17 @@ void ZSafe::readAllEntries() } f.close(); } #endif // UNUSED void ZSafe::resume(int) { - qWarning ("Resume"); + owarn << "Resume" << oendl; // hide the main window infoForm->hide(); // open zsafe again m_password = ""; selectedItem = NULL; // clear the password list @@ -1813,26 +1808,26 @@ bool ZSafe::openDocument(const char* _filename, const char* ) QFile f(_filename); if (f.exists()) { // ask with a dialog for the password if (m_password.isEmpty()) getDocPassword(tr("Enter Password")); if (m_password.isEmpty() && validationFlag == 0) { - qWarning ("Wrong password"); + owarn << "Wrong password" << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Wrong password.\n\nZSafe will now exit.") ); exitZs (1); } retval = loadInit(_filename, m_password); if (retval != PWERR_GOOD) { - qWarning ("Error loading Document"); + owarn << "Error loading Document" << oendl; return false; } } else { #ifdef WIN32 this->setCaption("Qt ZSafe"); #else @@ -2296,17 +2291,17 @@ bool newPwdDialogResult = false; void ZSafe::setPasswordDialogDone() { newPwdDialogResult = true; newPwdDialog->close(); } void ZSafe::getDocPassword(QString title) { -qWarning ("getDocPassword"); + owarn << "getDocPassword" << oendl; // open the 'Password' dialog PasswordForm *dialog = new PasswordForm(this, title, TRUE); newPwdDialog = dialog; newPwdDialogResult = false; connect( dialog->PasswordField, SIGNAL( returnPressed() ), this, SLOT( setPasswordDialogDone() ) ); @@ -2475,17 +2470,17 @@ int ZSafe::saveFinalize(void) fclose (fd); free(buffer); return retval; } void ZSafe::quitMe () { - qWarning ("QUIT..."); + owarn << "QUIT..." << oendl; if (modified) { switch( QMessageBox::information( this, tr("ZSafe"), tr("Do you want to save\nbefore exiting?"), tr("&Save"), tr("S&ave with\nnew\npassword"), tr("&Don't Save"), @@ -2679,17 +2674,17 @@ void ZSafe::addCategory() QString fullIconPath; QPixmap *pix; if (result == Accepted) { modified = true; category = dialog->CategoryField->currentText(); icon = dialog->IconField->currentText()+".png"; - qWarning (category); + owarn << category << oendl; QListViewItem *li = new ShadedListItem( 1, ListView ); Category *c1 = new Category(); c1->setCategoryName(category); // if (!icon.isEmpty() && !icon.isNull()) if (icon != "predefined.png") { @@ -3187,17 +3182,17 @@ void ZSafe::editCategory() saveConf(); cat->setIcon (*getPredefinedIcon(category)); } // change the category name of the selected category QListViewItem *catItem = cat->getListItem(); if (catItem) { - qWarning (category); + owarn << category << oendl; catItem->setText( 0, tr( category ) ); cat->setCategoryName (tr(category)); cat->initListItem(); categories.insert (category, cat); } } saveCategoryDialogFields(dialog); @@ -3588,17 +3583,17 @@ void ZSafe::paintEvent( QPaintEvent * ) raiseTimer.start (1, true); if (infoForm->isVisible()) infoForm->raise(); } } void ZSafe::resizeEvent ( QResizeEvent * ) { - // qWarning ("resizeEvent"); + // owarn << "resizeEvent" << oendl; #ifndef DESKTOP DeskW = appl->desktop()->width(); DeskH = appl->desktop()->height(); #else DeskW = this->width(); DeskH = this->height(); #endif diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index d61433f..837fcc5 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -182,22 +182,21 @@ void KRFBDecoder::gotServerInit() con->read( &(info->blueShift), 1 ); con->read( info->padding, 3 ); con->read( &(info->nameLength), 4 ); info->nameLength = Swap32IfLE( info->nameLength ); 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 ); - qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", - info->redShift, info->greenShift,info-> blueShift ); + owarn << "Bpp = " << info->bpp << ", Depth = " << info->depth << ", Big = " << info->bigEndian + << ", True = " << info->trueColor << oendl; + owarn << "RedMax = " << info->redMax << ", GreenMax = " << info->greenMax << ", BlueMax = " << info->blueMax << oendl; + owarn << "RedShift = " << info->redShift << ", GreenShift = " << info->greenShift + << ", BlueShift = " << info-> blueShift << oendl; buf->resize( info->width/con->options()->scaleFactor, info->height /con->options()->scaleFactor); // Wait for desktop name owarn << "Waiting for desktop name" << oendl; static QString statusMsg = tr( "Waiting for desktop name..." ); emit status( statusMsg ); @@ -259,22 +258,19 @@ void KRFBDecoder::decidePixelFormat() int bestDepth = ( screenDepth > info->depth ) ? info->depth : screenDepth; int chosenDepth; if ( con->options()->colors256 ) chosenDepth = 8; else chosenDepth = bestDepth; - qWarning( "Screen depth=%d, server depth=%d, best depth=%d, " \ - "eight bit %d, chosenDepth=%d", - screenDepth, - info->depth, - bestDepth, - con->options()->colors256, chosenDepth ); + owarn << "Screen depth=" << screenDepth << ", server depth=" << info->depth + << ", best depth=" << bestDepth << "eight bit " << con->options()->colors256 + << ", chosenDepth=" << chosenDepth << oendl; format->depth = chosenDepth; // If we're using the servers native depth if ( chosenDepth == info->depth ) { // Use the servers native format format->bpp = info->bpp; // format->bigEndian = info->bigEndian; @@ -436,18 +432,18 @@ void KRFBDecoder::gotRectHeader() con->read( &w, 2 ); w = Swap16IfLE( w ); con->read( &h, 2 ); h = Swap16IfLE( h ); con->read( &encoding, 4 ); // CARD32 encodingLocal = Swap32IfLE( encoding ); - // qWarning( "Rect: x=%d, y= %d, w=%d, h=%d, encoding=%ld", - // x, y, w, h, encodingLocal ); + // owarn << "Rect: x=" << x << ", y= " << y << ", w=" << w << ", h=" << h + // << ", encoding= " << encodingLocal << oendl; // // Each encoding needs to be handled differently. Some require // waiting for more data, but others like a copyrect do not. // Our constants have already been byte swapped, so we use // the remote value as is. // if ( encoding == RawEncoding ) { diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 6c5f5ea..211314b 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -105,19 +105,19 @@ namespace { } inline void IconViewItem::setPixmap( const QPixmap & icon) { m_Pixset = true; calcRect(text()); } inline QPixmap* IconViewItem::pixmap()const { -// qWarning( "Name is " + m_path.right( 15 ) + " rect is %d %d %d %d | %d %d", -// rect().x(),rect().y(),rect().width(),rect().height(), -// iconView()->contentsX(), iconView()->contentsY()); +// owarn << "Name is " << m_path.right( 15 ) << " rect is " << rect().x() << " " << rect().y() +// << " " << rect().width() << " " << rect().height() << " | " << iconView()->contentsX() +// << " " << iconView()->contentsY() << oendl; if (textOnly()&&!m_isDir) { if (!_emptyPix) _emptyPix = new QPixmap(0,0,1); return _emptyPix; } if ( m_isDir ) return _dirPix; else{ diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp index 36e5dcf..aa15d31 100644 --- a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp +++ b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp @@ -1,12 +1,15 @@ #include "viewmodebutton.h" +/* OPIE */ #include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ #include <qtoolbar.h> #include <qpopupmenu.h> ViewModeButton::ViewModeButton( QToolBar* bar,int def ) : QToolButton( bar ) { slotChange( def ); QPopupMenu *pop= new QPopupMenu( this ); @@ -35,11 +38,11 @@ void ViewModeButton::slotChange( int i ) { case 2: name = "opie-eye/opie-eye-thumbonly"; break; case 3: name = "opie-eye/opie-eye-textview"; break; } - qWarning("foo %d" +name, i ); + owarn << "foo " << name << oendl; setIconSet( Resource::loadIconSet( name ) ); } diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index 04c50d9..f81066e 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc @@ -1,152 +1,157 @@ -#include <signal.h> +#include "device.h" +/* OPIE */ #include <opie2/oprocess.h> +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* STD */ +#include <signal.h> -#include "device.h" using namespace OpieTooth; using Opie::Core::OProcess; namespace { int parsePid( const QCString& par ){ int id=0; QString string( par ); QStringList list = QStringList::split( '\n', string ); for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ - qWarning("parsePID: %s", (*it).latin1() ); + owarn << "parsePID: " << (*it).latin1() << oendl; if( !(*it).startsWith("CSR") ){ id = (*it).toInt(); break; } } return id; } } Device::Device(const QString &device, const QString &mode, const QString &speed ) : QObject(0, "device") { - qWarning("OpieTooth::Device create" ); + owarn << "OpieTooth::Device create" << oendl; m_hci = 0; m_process = 0; m_attached = false; m_device = device; m_mode = mode; m_speed = speed; attach(); } Device::~Device(){ detach(); } void Device::attach(){ - qWarning("attaching %s %s %s", m_device.latin1(), m_mode.latin1(), m_speed.latin1() ); + owarn << "attaching " << m_device.latin1() << " " << m_mode.latin1() << " " << m_speed.latin1() << oendl; if(m_process == 0 ){ m_output.resize(0); - qWarning("new process to create" ); + owarn << "new process to create" << oendl; m_process = new OProcess(); *m_process << "hciattach"; *m_process << "-p"; *m_process << m_device << m_mode << m_speed; connect(m_process, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); connect(m_process, SIGNAL( receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int ) ) ); connect(m_process, SIGNAL(receivedStderr(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotStdErr(Opie::Core::OProcess*,char*,int) ) ); if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ - qWarning("Could not start" ); + owarn << "Could not start" << oendl; delete m_process; m_process = 0; } }; } void Device::detach(){ delete m_hci; delete m_process; // kill the pid we got if(m_attached ){ //kill the pid - qWarning( "killing" ); + warn << "killing" << oendl; kill(pid, 9); } - qWarning("detached" ); + owarn << "detached" << oendl; } bool Device::isLoaded()const{ return m_attached; } QString Device::devName()const { return QString::fromLatin1("hci0"); }; void Device::slotExited( OProcess* proc) { - qWarning("prcess exited" ); + owarn << "prcess exited" << oendl; if(proc== m_process ){ - qWarning("proc == m_process" ); + owarn << "proc == m_process" << oendl; if( m_process->normalExit() ){ // normal exit - qWarning("normalExit" ); + owarn << "normalExit" << oendl; int ret = m_process->exitStatus(); if( ret == 0 ){ // attached - qWarning("attached" ); - qWarning("Output: %s", m_output.data() ); + owarn << "attached" << oendl; + owarn << "Output: " << m_output.data() << oendl; pid = parsePid( m_output ); - qWarning("Pid = %d", pid ); + owarn << "Pid = " << pid << oendl; // now hciconfig hci0 up ( determine hciX FIXME) // and call hciconfig hci0 up // FIXME hardcoded to hci0 now :( m_hci = new OProcess( ); *m_hci << "hciconfig"; *m_hci << "hci0 up"; connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); if(!m_hci->start() ){ - qWarning("could not start" ); + owarn << "could not start" << oendl; m_attached = false; emit device("hci0", false ); } }else{ - qWarning("crass" ); + owarn << "crass" << oendl; m_attached = false; emit device("hci0", false ); } } delete m_process; m_process = 0; }else if(proc== m_hci ){ - qWarning("M HCI exited" ); + owarn << "M HCI exited" << oendl; if( m_hci->normalExit() ){ - qWarning("normal exit" ); + owarn << "normal exit" << oendl; int ret = m_hci->exitStatus(); if( ret == 0 ){ - qWarning("attached really really attached" ); + owarn << "attached really really attached" << oendl; m_attached = true; emit device("hci0", true ); }else{ - qWarning( "failed" ); + owarn << "failed" << oendl; emit device("hci0", false ); m_attached = false; } }// normal exit delete m_hci; m_hci = 0; } } void Device::slotStdOut(OProcess* proc, char* chars, int len) { - qWarning("std out" ); + owarn << "std out" << oendl; if( len <1 ){ - qWarning( "len < 1 " ); + owarn << "len < 1 " << oendl; return; } if(proc == m_process ){ QCString string( chars, len+1 ); // \0 == +1 - qWarning("output: %s", string.data() ); + owarn << "output: " << string.data() << oendl; m_output.append( string.data() ); } } void Device::slotStdErr(OProcess* proc, char* chars, int len) { - qWarning("std err" ); + owarn << "std err" << oendl; slotStdOut( proc, chars, len ); } diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index 18e1df9..76d9127 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -1,23 +1,24 @@ - -#include <opie2/oprocess.h> - #include "parser.h" #include "manager.h" +#include <opie2/oprocess.h> +#include <opie2/odebug.h> +using namespace Opie::Core; + using namespace OpieTooth; using Opie::Core::OProcess; Manager::Manager( const QString& dev ) : QObject() { - qWarning("created"); + owarn << "created" << oendl; m_device = dev; m_hcitool = 0; m_sdp = 0; } Manager::Manager( Device* /*dev*/ ) : QObject() { m_hcitool = 0; @@ -52,26 +53,26 @@ void Manager::isAvailable( const QString& device ){ } void Manager::isAvailable( Device* /*dev*/ ){ } void Manager::searchDevices( const QString& device ){ - qWarning("search devices"); + owarn << "search devices" << oendl; OProcess* hcitool = new OProcess(); hcitool->setName( device.isEmpty() ? "hci0" : device.latin1() ); *hcitool << "hcitool" << "scan"; connect( hcitool, SIGNAL(processExited(Opie::Core::OProcess*) ) , this, SLOT(slotHCIExited(Opie::Core::OProcess* ) ) ); connect( hcitool, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotHCIOut(Opie::Core::OProcess*, char*, int ) ) ); if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; RemoteDevice::ValueList list; emit foundDevices( device, list ); delete hcitool; } } void Manager::searchDevices(Device* /*d*/ ){ @@ -102,23 +103,23 @@ void Manager::removeServices( const QStringList& list){ QStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it ) removeService( (*it) ); } void Manager::searchServices( const QString& remDevice ){ OProcess *m_sdp =new OProcess(); *m_sdp << "sdptool" << "browse" << remDevice; m_sdp->setName( remDevice.latin1() ); - qWarning("search Services for %s", remDevice.latin1() ); + owarn << "search Services for " << remDevice.latin1() << oendl; connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotSDPExited(Opie::Core::OProcess* ) ) ); connect(m_sdp, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotSDPOut(Opie::Core::OProcess*, char*, int) ) ); if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning("could not start sdptool" ); + owarn << "could not start sdptool" << oendl; delete m_sdp; Services::ValueList list; emit foundServices( remDevice, list ); } } void Manager::searchServices( const RemoteDevice& dev){ searchServices( dev.mac() ); } @@ -135,95 +136,95 @@ void Manager::slotProcessExited(OProcess* proc ) { QString name = QString::fromLatin1(proc->name() ); emit available( name, conn ); delete proc; } void Manager::slotSDPOut(OProcess* proc, char* ch, int len) { QCString str(ch, len+1 ); - qWarning("SDP:%s", str.data() ); + owarn << "SDP:" << str.data() << oendl; QMap<QString, QString>::Iterator it; it = m_out.find(proc->name() ); QString string; if ( it != m_out.end() ) { string = it.data(); } string.append( str ); m_out.replace( proc->name(), string ); } void Manager::slotSDPExited( OProcess* proc) { - qWarning("proc name %s", proc->name() ); + owarn << "proc name " << proc->name() << oendl; Services::ValueList list; if (proc->normalExit() ) { QMap<QString, QString>::Iterator it = m_out.find( proc->name() ); if ( it != m_out.end() ) { - qWarning("found process" ); + owarn << "found process" << oendl; list = parseSDPOutput( it.data() ); m_out.remove( it ); } } emit foundServices( proc->name(), list ); delete proc; } Services::ValueList Manager::parseSDPOutput( const QString& out ) { Services::ValueList list; - qWarning("parsing output" ); + owarn << "parsing output" << oendl; Parser parser( out ); list = parser.services(); return list; } void Manager::slotHCIExited(OProcess* proc ) { - qWarning("process exited"); + owarn << "process exited" << oendl; RemoteDevice::ValueList list; if (proc->normalExit() ) { - qWarning("normalExit %s", proc->name() ); + owarn << "normalExit " << proc->name() << oendl; QMap<QString, QString>::Iterator it = m_devices.find(proc->name() ); if (it != m_devices.end() ) { - qWarning("!= end ;)"); + owarn << "!= end ;)" << oendl; list = parseHCIOutput( it.data() ); m_devices.remove( it ); } } emit foundDevices( proc->name(), list ); delete proc; } void Manager::slotHCIOut(OProcess* proc, char* ch, int len) { QCString str( ch, len+1 ); - qWarning("hci: %s", str.data() ); + owarn << "hci: " << str.data() oendl; QMap<QString, QString>::Iterator it; it = m_devices.find( proc->name() ); - qWarning("proc->name %s", proc->name() ); + owarn << "proc->name " << proc->name() << oendl; QString string; if (it != m_devices.end() ) { - qWarning("slotHCIOut "); + owarn << "slotHCIOut " << oendl; string = it.data(); } string.append( str ); m_devices.replace( proc->name(), string ); } RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { - qWarning("parseHCI %s", output.latin1() ); + owarn << "parseHCI " << output.latin1() << oendl; RemoteDevice::ValueList list; QStringList strList = QStringList::split('\n', output ); QStringList::Iterator it; QString str; for ( it = strList.begin(); it != strList.end(); ++it ) { str = (*it).stripWhiteSpace(); - qWarning("OpieTooth %s", str.latin1() ); + owarn << "OpieTooth " << str.latin1() << oendl; int pos = str.findRev(':' ); if ( pos > 0 ) { QString mac = str.left(17 ); str.remove( 0, 17 ); - qWarning("mac %s", mac.latin1() ); - qWarning("rest:%s", str.latin1() ); + owarn << "mac " << mac.latin1() << oendl; + owarn << "rest: " << str.latin1() << oendl; RemoteDevice rem( mac , str.stripWhiteSpace() ); list.append( rem ); } } return list; } ////// hcitool cc and hcitool con @@ -238,17 +239,17 @@ void Manager::connectTo( const QString& mac) { proc << "hcitool"; proc << "cc"; proc << mac; proc.start(OProcess::DontCare); // the lib does not care at this point } void Manager::searchConnections() { - qWarning("searching connections?"); + owarn << "searching connections?" << oendl; OProcess* proc = new OProcess(); m_hcitoolCon = QString::null; connect(proc, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotConnectionExited( Opie::Core::OProcess*) ) ); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotConnectionOutput(Opie::Core::OProcess*, char*, int) ) ); *proc << "hcitool"; @@ -276,25 +277,25 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) { QStringList list = QStringList::split('\n', out ); QStringList::Iterator it; // remove the first line ( "Connections:") it = list.begin(); it = list.remove( it ); for (; it != list.end(); ++it ) { QString row = (*it).stripWhiteSpace(); QStringList value = QStringList::split(' ', row ); - qWarning("0: %s", value[0].latin1() ); - qWarning("1: %s", value[1].latin1() ); - qWarning("2: %s", value[2].latin1() ); - qWarning("3: %s", value[3].latin1() ); - qWarning("4: %s", value[4].latin1() ); - qWarning("5: %s", value[5].latin1() ); - qWarning("6: %s", value[6].latin1() ); - qWarning("7: %s", value[7].latin1() ); - qWarning("8: %s", value[8].latin1() ); + owan << "0: %s" << value[0].latin1() << oendl; + owan << "1: %s" << value[1].latin1() << oendl; + owan << "2: %s" << value[2].latin1() << oendl; + owan << "3: %s" << value[3].latin1() << oendl; + owan << "4: %s" << value[4].latin1() << oendl; + owan << "5: %s" << value[5].latin1() << oendl; + owan << "6: %s" << value[6].latin1() << oendl; + owan << "7: %s" << value[7].latin1() << oendl; + owan << "8: %s" << value[8].latin1() << oendl; ConnectionState con; con.setDirection( value[0] == QString::fromLatin1("<") ? Outgoing : Incoming ); con.setConnectionMode( value[1] ); con.setMac( value[2] ); con.setHandle( value[4].toInt() ); con.setState( value[6].toInt() ); con.setLinkMode( value[8] == QString::fromLatin1("MASTER") ? Master : Client ); list2.append( con ); diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc index 8baf284..7e95907 100644 --- a/noncore/net/opietooth/lib/parser.cc +++ b/noncore/net/opietooth/lib/parser.cc @@ -1,46 +1,52 @@ +#include "parser.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qstringlist.h> -#include "parser.h" using namespace OpieTooth; namespace { // "Test Foo Bar" (0x3456) // @param ret Test Foo Bar // @eturn 13398 // tactic find " ( int convert( const QString& line, QString& ret ) { -// qWarning("called"); +// owarn << "called" << oendl; ret = QString::null; int i = 0; int pos = line.findRev("\" ("); if ( pos > 0 ) { // it shouldn't be at pos 0 ret = line.left(pos ).stripWhiteSpace(); - // qWarning("ret: %s", ret.latin1() ); + // owarn << "ret: " << ret.latin1() << oendl; ret = ret.replace(QRegExp("[\"]"), ""); - //qWarning("ret: %s", ret.latin1() ); + //owarn << "ret: " << ret.latin1() << oendl; QString dummy = line.mid(pos + 5 ); - //qWarning("dummy: %s", dummy.latin1() ); + //owarn << "dummy: " << dummy.latin1() << oendl; dummy = dummy.replace(QRegExp("[)]"), ""); - //qWarning("dummy: %s", dummy.latin1() ); + //owarn << "dummy: " << dummy.latin1() << oendl; // dummy = dummy.remove( dummy.length() -2, 1 ); // remove the ) bool ok; i = dummy.toInt(&ok, 16 ); //if (ok ) { - // qWarning("converted %d", i); - //}else qWarning("failed" ); - //qWarning("exiting"); + // owarn << "converted " << i << oendl; + //}else owarn << "failed" << oendl; + //owarn << "exiting" << oendl; return i; } - //qWarning("output %d", i ); + //owarn << "output " << i << oendl; return i; } }; Parser::Parser(const QString& output ) { parse( output ); @@ -52,21 +58,21 @@ Services::ValueList Parser::services() const { return m_list; } void Parser::parse( const QString& string) { m_list.clear(); m_complete = true; QStringList list = QStringList::split('\n', string,TRUE ); QStringList::Iterator it; for (it = list.begin(); it != list.end(); ++it ) { - //qWarning("line:%s:line", (*it).latin1() ); + //owarn << "line:" << (*it).latin1() << oendl; if ( (*it).startsWith("Browsing") ) continue; if ( (*it).stripWhiteSpace().isEmpty() ) { // line is empty because a new Service begins - qWarning("could add"); + owarn << "could add" << oendl; // now see if complete and add if (m_complete ) { if (!m_item.serviceName().isEmpty() ) m_list.append( m_item ); Services serv; m_item = serv; m_complete = true; continue; @@ -75,99 +81,99 @@ void Parser::parse( const QString& string) { if (parseName( (*it) ) ) ;//continue; if (parseRecHandle( (*it) ) ) ;//continue; if (parseClassId( (*it) ) ) ;//continue; if (parseProtocol( (*it) ) ) ;//continue; if (parseProfile( (*it) ) ) ;//continue; } // missed the last one if (m_complete) { -// qWarning("adding"); +// owarn << "adding" << oendl; if (!m_item.serviceName().isEmpty() ) m_list.append(m_item ); } QValueList<Services>::Iterator it2; if (m_list.isEmpty() ) - qWarning("m_list is empty"); + owarn << "m_list is empty" << oendl; for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { - qWarning("name %s", (*it2).serviceName().latin1() ); + owarn << "name " << (*it2).serviceName().latin1() << oendl; } } bool Parser::parseName( const QString& str) { if (str.startsWith("Service Name:") ) { m_item.setServiceName( str.mid(13).stripWhiteSpace() ); - qWarning(m_item.serviceName() ); + owarn << m_item.serviceName() << oendl; return true; } return false; } bool Parser::parseRecHandle( const QString& str) { if (str.startsWith("Service RecHandle:" ) ) { QString out = str.mid(18 ).stripWhiteSpace(); - qWarning("out %s", out.latin1() ); + owarn << "out " << out.latin1() << oendl; int value = out.mid(2).toInt(&m_ok, 16 ); if (m_ok && (value != -1) ) m_complete = true; else m_complete = false; - qWarning("rec handle %d", value); + owarn << "rec handle " << value << oendl; m_item.setRecHandle( value ); return true; } return false; } bool Parser::parseClassId( const QString& str) { if (str.startsWith("Service Class ID List:") ) { - qWarning("found class id" ); - qWarning("line:%s", str.latin1() ); + owarn << "found class id" << oendl; + owarn << "line: " << str.latin1() << oendl; m_classOver = true; return true; }else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place - qWarning("line with class id" ); - qWarning("%s",str.latin1() ); + owarn << "line with class id" << oendl; + owarn << str.latin1() << oendl; // "Obex Object Push" (0x1105) // find backwards the " and the from 0 to pos and the mid pos+1 // then stripWhiteSpace add name replace '"' with "" // and then convert 0x1105 toInt() QString classes; int ids; ids = convert( str, classes ); - qWarning("ids %d", ids ); + owarn << "ids " << ids << oendl; m_item.insertClassId( ids, classes ); return true; }else{ - qWarning("Else %d", m_classOver ); + owarn << "Else " << m_classOver << oendl; m_classOver = false; } return false; } bool Parser::parseProtocol( const QString& str) { if (str.startsWith("Protocol Descriptor List:") ) { m_protocolOver = true; m_protocolAdded = false; return true; }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) - qWarning("double protocol filter"); + owarn << "double protocol filter" << oendl; if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now Services::ProtocolDescriptor desc( m_protName, m_protId ); m_item.insertProtocolDescriptor( desc ); } m_protocolAdded = false; { // the find function m_protId = convert(str, m_protName ); } return true; }else if (m_protocolOver && str.startsWith(" ") ) { - qWarning("tripple protocol filter"); + owarn << "tripple protocol filter" << oendl; m_protocolAdded = true; QString dummy = str.stripWhiteSpace(); int pos = dummy.findRev(':'); if ( pos > -1 ) { int port = dummy.mid(pos+1 ).stripWhiteSpace().toInt(); Services::ProtocolDescriptor desc( m_protName, m_protId, port ); m_item.insertProtocolDescriptor( desc ); } @@ -182,17 +188,17 @@ bool Parser::parseProfile( const QString& str) { m_profOver = true; }else if ( m_profOver && str.startsWith(" ") ) { m_profId = convert( str, m_profName ); }else if ( m_profOver && str.startsWith(" ") ) { // now find int pos = str.findRev(':'); if ( pos > 0 ) { int dummy = str.mid(pos+1 ).stripWhiteSpace().toInt(); - qWarning("dummyInt:%d", dummy ); + owarn << "dummyInt: " << dummy << oendl; Services::ProfileDescriptor desc( m_profName, m_profId, dummy ); m_item.insertProfileDescriptor(desc); } }else m_profOver = false; return false; diff --git a/noncore/settings/mediummount/mediumglobal.cc b/noncore/settings/mediummount/mediumglobal.cc index ab0b3af..0c6cf12 100644 --- a/noncore/settings/mediummount/mediumglobal.cc +++ b/noncore/settings/mediummount/mediumglobal.cc @@ -1,22 +1,27 @@ +#include "mediumglobal.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +#include <qpe/config.h> +/* QT */ #include <qlineedit.h> #include <qcheckbox.h> #include <qlabel.h> #include <qabstractlayout.h> // spacer item #include <qlayout.h> #include <qframe.h> #include <qgroupbox.h> #include <qwhatsthis.h> -#include <qpe/config.h> -#include "mediumglobal.h" using namespace MediumMountSetting; /* TRANSLATOR MediumMountSetting::MediumGlobalWidget */ MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name ) : QWidget( wid, name, WStyle_ContextHelp ) { @@ -147,17 +152,17 @@ MediumGlobalWidget::~MediumGlobalWidget() void MediumGlobalWidget::slotGlobalChanged() { int mode = GLOBAL_DISABLED; bool enabled = false; if( ( enabled =m_useglobal->isChecked() ) ){ mode = GLOBAL_ENABLED; }else mode = GLOBAL_DISABLED; - qWarning("enabled = %d", enabled ); + owarn << "enabled = " << enabled << oendl; m_all->setEnabled ( enabled ); m_audio->setEnabled( enabled ); m_image->setEnabled( enabled ); m_text->setEnabled ( enabled ); m_video->setEnabled ( enabled ); slotAllChanged(); emit globalStateChanged( mode ); diff --git a/noncore/styles/theme/othemebase.h b/noncore/styles/theme/othemebase.h index e691692..5519798 100644 --- a/noncore/styles/theme/othemebase.h +++ b/noncore/styles/theme/othemebase.h @@ -13,16 +13,21 @@ You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __OTHEMEBASE_H #define __OTHEMEBASE_H +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qdatetime.h> #include <qtimer.h> #include <qwindowsstyle.h> #include <qpixmap.h> #include <qpe/config.h> #include <qimage.h> #include <qintcache.h> #include <qstring.h> @@ -61,17 +66,17 @@ private: inline QPixmap* OThemePixmap::border( BorderType type ) { return ( b[ type ] ); } inline void OThemePixmap::setBorder( BorderType type, const QPixmap &p ) { if ( b[ type ] ) { - qWarning( "OThemePixmap: Overwriting existing border!" ); + owarn << "OThemePixmap: Overwriting existing border!" << oendl; delete( b[ type ] ); } b[ type ] = new QPixmap( p ); } inline void OThemePixmap::updateAccessed() { if (t) |