author | ar <ar> | 2004-05-15 22:36:18 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-15 22:36:18 (UTC) |
commit | 736a153edfac343d0794ecafc5dc2f2c405260a7 (patch) (side-by-side diff) | |
tree | ebb41331403fa78769df2a344bfe12bbd1df6c46 | |
parent | d4a82558ff3ae6ed7bbc5dbc9857461057eb3da3 (diff) | |
download | opie-736a153edfac343d0794ecafc5dc2f2c405260a7.zip opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.gz opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.bz2 |
- convert qDebug to odebug
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 0 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index f918767..9638686 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp @@ -1,89 +1,90 @@ /* This file is part of the OPIE Project Copyright (c) 2002 Trolltech AS <info@trolltech.com> =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> .>+-= _;:, .> :=|. This file is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This file is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. ++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "appearance.h" #include "editScheme.h" #include "stylelistitem.h" #include "decolistitem.h" #include "colorlistitem.h" #include "exceptlistitem.h" #include "sample.h" /* OPIE */ #include <opie2/odevice.h> #include <opie2/ofiledialog.h> #include <opie2/otabwidget.h> +#include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/global.h> #include <qpe/qpeapplication.h> #include <qpe/qpemessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpestyle.h> #include <qpe/lightstyle.h> #include <qpe/styleinterface.h> /* QT */ #include <qbuttongroup.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qdialog.h> #include <qdir.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qlistbox.h> #include <qmessagebox.h> #include <qpushbutton.h> #include <qradiobutton.h> #if QT_VERSION >= 300 #include <qstylefactory.h> #endif #include <qtoolbutton.h> #include <qwindowsstyle.h> #include <qlistview.h> #include <qheader.h> #include <qvbox.h> #include <qwhatsthis.h> using namespace Opie; using namespace Opie::Ui; using namespace Opie::Core; class DefaultWindowDecoration : public WindowDecorationInterface { public: DefaultWindowDecoration() : ref(0) {} QString name() const { return "Default"; } QPixmap icon() const { return QPixmap(); @@ -787,97 +788,98 @@ void Appearance::addExcept ( ) ExceptListItem *it = new ExceptListItem ( m_except, 0, tr( "<new>" ), true, true, true ); m_except-> ensureItemVisible ( it ); m_except-> setSelected ( it, true ); } void Appearance::delExcept ( ) { if ( m_except-> selectedItem ( )) { m_except-> setFocus ( ); delete m_except-> selectedItem ( ); } } void Appearance::upExcept ( ) { ExceptListItem *it = (ExceptListItem *) m_except-> selectedItem ( ); if ( it && it-> itemAbove ( )) it-> itemAbove ( )-> moveItem ( it ); } void Appearance::downExcept ( ) { ExceptListItem *it = (ExceptListItem *) m_except-> selectedItem ( ); if ( it && it-> itemBelow ( )) it-> moveItem ( it-> itemBelow ( )); } class ExEdit : public QLineEdit { public: ExEdit ( ExceptListItem *item ) : QLineEdit ( item-> listView ( )-> viewport ( ), "exedit" ), it ( item ) { setFrame ( false ); QRect r = it-> listView ( )-> itemRect ( it ); int x = it-> listView ( )-> header ( )-> cellPos ( 3 ) - 1; int y = r. y ( ); int w = it-> listView ( )-> viewport ( )-> width ( ) - x; int h = r. height ( ); // + 2; setText ( it-> pattern ( )); setGeometry ( x, y, w, h ); - qDebug ( "ExEdit: [%s] at %d,%d %d,%d", it->text(2).latin1(),x,y,w,h); + odebug << "ExEdit: [" << it->text(2).latin1() << "] at " + << x << "," << y << " " << w << "," << h << oendl; m_out = true; show ( ); setFocus ( ); selectAll ( ); end ( true ); } virtual void focusOutEvent ( QFocusEvent * ) { hide ( ); if ( m_out ) it-> setPattern ( text ( )); delete this; } virtual void keyPressEvent ( QKeyEvent *e ) { if ( e-> key ( ) == Key_Return ) it-> listView ( )-> setFocus ( ); else if ( e-> key ( ) == Key_Escape ) { m_out = false; it-> listView ( )-> setFocus ( ); } else QLineEdit::keyPressEvent ( e ); } private: ExceptListItem *it; bool m_out; }; void Appearance::clickedExcept ( QListViewItem *item, const QPoint &, int c ) { if ( !item || c < 0 || c > 3 ) return; ExceptListItem *it = (ExceptListItem *) item; if ( c == 0 ) it-> setNoStyle ( !it-> noStyle ( )); else if ( c == 1 ) it-> setNoFont ( !it-> noFont ( )); else if ( c == 2 ) it-> setNoDeco ( !it-> noDeco ( )); diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 5913a22..3bc7d43 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index 4294b12..d36a702 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp @@ -413,82 +413,81 @@ void WLANImp::rescanNeighbourhood() } } cap->close(); wiface->setMode( "managed" ); // TODO: use previous mode wiface->setPromiscuousMode( false ); splash->hide(); delete splash; } void WLANImp::handlePacket( OPacket* p ) { // check if we received a beacon frame OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); if ( beacon && beacon->managementType() == "Beacon" ) { QString type; if ( beacon->canIBSS() ) { type = "adhoc"; } else if ( beacon->canESS() ) { type = "managed"; } else { owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl; return; } OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); QString essid = ssid ? ssid->ID() : QString("<unknown>"); OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); int channel = ds ? ds->channel() : -1; OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); displayFoundNetwork( type, channel, essid, header->macAddress2() ); } } void WLANImp::displayFoundNetwork( const QString& mode, int channel, const QString& ssid, const OMacAddress& mac ) { - qDebug( "found network: <%s>, chn %d, ssid '%s', mac '%s'", (const char*) mode, channel, - (const char*) ssid, - (const char*) mac.toString() ); + odebug << "found network: <" << (const char*) mode << ">, chn " << channel + << ", ssid '" << (const char*) ssid << "', mac '" << (const char*) mac.toString() << "'" << oendl; QListViewItemIterator it( netView ); while ( it.current() && it.current()->text( col_ssid ) != ssid ) ++it; if ( !it.current() ) // ssid didn't show up yet { QListViewItem* item = new QListViewItem( netView, mode.left( 1 ).upper(), ssid, QString::number( channel ), mac.toString() ); QString name; name.sprintf( "networksettings/%s", (const char*) mode ); item->setPixmap( col_mode, Resource::loadPixmap( name ) ); qApp->processEvents(); } } void WLANImp::selectNetwork( QListViewItem* item ) { bool ok; if ( item ) { specifyAp->setChecked(true); macEdit->setText( item->text( col_mac ) ); specifyChan->setChecked( item->text( col_mode ) == "A" ); networkChannel->setValue( item->text( col_chn ).toInt( &ok ) ); essid->setEditText( item->text( col_ssid ) ); if ( item->text( col_mode ) == "A" ) mode->setCurrentItem( 3 ); else mode->setCurrentItem( 2 ); } } |