summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
committer mickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
commit16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff)
tree0701eae15aa606a0211a2fccfde0eafdac69357c
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2
convert to Opie Debugging Framework
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotate.cpp10
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp21
-rw-r--r--noncore/applets/networkapplet/networkapplet.cpp16
-rw-r--r--noncore/applets/notesapplet/config.in2
-rw-r--r--noncore/applets/notesapplet/notes.cpp54
-rw-r--r--noncore/applets/notesapplet/notesapplet.pro18
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp44
-rw-r--r--noncore/applets/zkbapplet/zkbwidget.cpp2
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp44
-rw-r--r--noncore/apps/advancedfm/advancedfm.pro24
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp12
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp1681
-rw-r--r--noncore/apps/advancedfm/filePermissions.cpp2
-rw-r--r--noncore/apps/advancedfm/output.cpp23
-rw-r--r--noncore/apps/checkbook/checkbook.pro2
-rw-r--r--noncore/apps/checkbook/listedit.cpp11
-rw-r--r--noncore/apps/checkbook/tabledef.cpp6
-rw-r--r--noncore/apps/checkbook/transaction.cpp6
-rw-r--r--noncore/apps/confedit/confedit.pro24
-rw-r--r--noncore/apps/confedit/config.in2
-rw-r--r--noncore/apps/confedit/listviewconfdir.cpp12
-rw-r--r--noncore/apps/confedit/listviewitemconffile.cpp24
-rw-r--r--noncore/apps/confedit/mainwindow.cpp19
-rw-r--r--noncore/apps/keyz-cfg/cfgfile.cpp12
-rw-r--r--noncore/apps/keyz-cfg/config.in2
-rw-r--r--noncore/apps/keyz-cfg/keyz-cfg.pro16
-rw-r--r--noncore/apps/keyz-cfg/zkb.cpp4
-rw-r--r--noncore/apps/keyz-cfg/zkbcfg.cpp15
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp35
-rw-r--r--noncore/apps/opie-bartender/bartender.pro7
-rw-r--r--noncore/apps/opie-bartender/config.in3
-rw-r--r--noncore/apps/opie-console/MyPty.cpp14
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp6
-rw-r--r--noncore/apps/opie-console/TEmulation.cpp8
-rw-r--r--noncore/apps/opie-console/atconfigdialog.cpp13
-rw-r--r--noncore/apps/opie-console/dialer.cpp27
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp14
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp10
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp9
-rw-r--r--noncore/apps/opie-console/io_bt.cpp7
-rw-r--r--noncore/apps/opie-console/io_irda.cpp8
-rw-r--r--noncore/apps/opie-console/io_modem.cpp8
-rw-r--r--noncore/apps/opie-console/main.cpp2
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp39
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp11
-rw-r--r--noncore/apps/opie-console/opie-console.pro4
-rw-r--r--noncore/apps/opie-console/sz_transfer.cpp6
-rw-r--r--noncore/apps/opie-console/tabwidget.cpp7
-rw-r--r--noncore/apps/opie-console/terminalwidget.cpp11
-rw-r--r--noncore/apps/opie-console/test/senderui.cpp14
-rw-r--r--noncore/apps/opie-console/widget.cpp6
-rw-r--r--noncore/apps/opie-console/widget_layer.cpp4
-rw-r--r--noncore/apps/opie-write/mainwindow.cpp12
-rw-r--r--noncore/apps/opie-write/opie-write.pro3
-rw-r--r--noncore/apps/opie-write/qcomplextext.cpp4
-rw-r--r--noncore/apps/opie-write/qrichtext.cpp28
-rw-r--r--noncore/apps/opie-write/qrichtext_p.cpp15
-rwxr-xr-xnoncore/apps/qashmoney/accountdisplay.cpp13
-rw-r--r--noncore/apps/qashmoney/config.in2
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.pro2
-rw-r--r--noncore/apps/tableviewer/db/common.cpp28
-rw-r--r--noncore/apps/tableviewer/db/datacache.cpp12
-rw-r--r--noncore/apps/tableviewer/db/xmlsource.cpp30
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp14
-rw-r--r--noncore/apps/tableviewer/tableviewer.pro8
-rw-r--r--noncore/apps/tableviewer/ui/tvlistview.cpp9
-rw-r--r--noncore/apps/tinykate/libkate/libkate.pro147
-rw-r--r--noncore/apps/tinykate/tinykate.pro26
-rw-r--r--noncore/apps/zsafe/config.in2
-rw-r--r--noncore/apps/zsafe/scqtfiledlg.cpp29
-rw-r--r--noncore/apps/zsafe/zsafe.cpp15
-rw-r--r--noncore/apps/zsafe/zsafe.pro14
-rw-r--r--noncore/comm/keypebble/config.in2
-rw-r--r--noncore/comm/keypebble/keypebble.pro9
-rw-r--r--noncore/comm/keypebble/krfbbuffer.cpp24
-rw-r--r--noncore/comm/keypebble/krfbcanvas.cpp8
-rw-r--r--noncore/comm/keypebble/krfbconnection.cpp31
-rw-r--r--noncore/comm/keypebble/krfbdecoder.cpp63
-rw-r--r--noncore/comm/keypebble/krfblogin.cpp41
-rw-r--r--noncore/comm/keypebble/kvncbookmarkdlg.cpp12
-rw-r--r--noncore/games/backgammon/backgammon.cpp16
-rw-r--r--noncore/games/backgammon/moveengine.cpp2
-rw-r--r--noncore/games/bounce/bounce.pro5
-rw-r--r--noncore/games/bounce/game.cpp15
-rw-r--r--noncore/games/go/go.pro15
-rw-r--r--noncore/games/go/gowidget.cpp9
-rw-r--r--noncore/games/kpacman/kpacman.pro4
-rw-r--r--noncore/games/kpacman/kpacmanwidget.cpp5
-rw-r--r--noncore/games/kpacman/status.cpp5
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp2
-rw-r--r--noncore/games/oyatzee/oyatzee.cpp50
-rw-r--r--noncore/games/oyatzee/oyatzee.pro2
-rw-r--r--noncore/games/wordgame/wordgame.cpp2
-rw-r--r--noncore/graphics/opie-eye/config.in4
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp14
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_lister.cpp8
-rw-r--r--noncore/graphics/opie-eye/lib/slavemaster.cpp12
-rw-r--r--noncore/graphics/opie-eye/phunk_view.pro2
-rw-r--r--noncore/graphics/opie-eye/slave/jpeg_slave.cpp18
-rw-r--r--noncore/graphics/opie-eye/slave/main.cpp16
-rw-r--r--noncore/graphics/opie-eye/slave/slave.pro6
-rw-r--r--noncore/graphics/opie-eye/slave/slavereciever.cpp22
-rw-r--r--noncore/graphics/opie-eye/slave/thumbnailtool.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/om3u.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp38
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp24
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp8
-rw-r--r--noncore/multimedia/opierec/device.cpp46
-rw-r--r--noncore/multimedia/opierec/helpwindow.cpp11
-rw-r--r--noncore/multimedia/opierec/opierec.pro6
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp129
-rw-r--r--noncore/multimedia/opierec/wavFile.cpp67
-rw-r--r--noncore/multimedia/opierec/waveform.cpp12
-rw-r--r--noncore/multimedia/powerchord/config.in6
-rw-r--r--noncore/multimedia/powerchord/powerchord.pro3
-rw-r--r--noncore/multimedia/powerchord/powerchordbase.cpp12
-rw-r--r--noncore/multimedia/showimg/ImageFileSelector.cpp20
-rw-r--r--noncore/multimedia/showimg/showimg.cpp20
-rw-r--r--noncore/multimedia/showimg/showimg.pro2
-rw-r--r--noncore/multimedia/tonleiter/config.in2
-rw-r--r--noncore/multimedia/tonleiter/editinst.cpp11
-rw-r--r--noncore/multimedia/tonleiter/fretboard.cpp13
-rw-r--r--noncore/multimedia/tonleiter/tonleiter.pro6
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdata.cpp11
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.cpp6
-rw-r--r--noncore/net/mail/accountitem.cpp18
-rw-r--r--noncore/net/mail/accountview.cpp12
-rw-r--r--noncore/net/mail/composemail.cpp6
-rw-r--r--noncore/net/mail/editaccounts.cpp22
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.cpp8
-rw-r--r--noncore/net/mail/libmailwrapper/generatemail.cpp30
-rw-r--r--noncore/net/mail/libmailwrapper/genericwrapper.cpp14
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp66
-rw-r--r--noncore/net/mail/libmailwrapper/logindialog.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp10
-rw-r--r--noncore/net/mail/libmailwrapper/mailwrapper.cpp2
-rw-r--r--noncore/net/mail/libmailwrapper/mboxwrapper.cpp22
-rw-r--r--noncore/net/mail/libmailwrapper/mhwrapper.cpp60
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp8
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp10
-rw-r--r--noncore/net/mail/libmailwrapper/settings.cpp18
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp30
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp6
-rw-r--r--noncore/net/mail/libmailwrapper/storemail.cpp4
-rw-r--r--noncore/net/mail/mainwindow.cpp14
-rw-r--r--noncore/net/mail/nntpgroups.cpp2
-rw-r--r--noncore/net/mail/opiemail.cpp16
-rw-r--r--noncore/net/mail/taskbarapplet/mailapplet.cpp2
-rw-r--r--noncore/net/mail/viewmail.cpp2
-rw-r--r--noncore/net/opieftp/config.in2
-rw-r--r--noncore/net/opieftp/filePermissions.cpp2
-rw-r--r--noncore/net/opieftp/opieftp.cpp77
-rw-r--r--noncore/net/opieftp/opieftp.pro11
-rw-r--r--noncore/net/opieirc/config.in2
-rw-r--r--noncore/net/opieirc/ircmisc.cpp9
-rw-r--r--noncore/net/opieirc/opieirc.pro13
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp2
-rw-r--r--noncore/net/opietooth/lib/startdunconnection.cpp2
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.cpp8
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp16
-rw-r--r--noncore/net/opietooth/manager/devicehandler.cpp10
-rw-r--r--noncore/net/opietooth/manager/dunpopup.cpp2
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.cpp16
-rw-r--r--noncore/net/opietooth/manager/obexdialog.cpp2
-rw-r--r--noncore/net/opietooth/manager/obexpopup.cpp4
-rw-r--r--noncore/net/opietooth/manager/panpopup.cpp2
-rw-r--r--noncore/net/opietooth/manager/popuphelper.cpp4
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp2
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp4
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.cpp10
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp8
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp30
-rw-r--r--noncore/net/wellenreiter/gui/gps.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp8
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp15
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp57
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp77
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp74
-rw-r--r--noncore/settings/backup/backuprestore.cpp28
-rw-r--r--noncore/settings/netsystemtime/settingstabwidget.cpp2
-rw-r--r--noncore/settings/networksettings/interfaces/interface.cpp20
-rw-r--r--noncore/settings/networksettings/interfaces/interfaces.cpp42
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp14
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp38
-rw-r--r--noncore/settings/networksettings/ppp/accounts.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/authwidget.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp10
-rw-r--r--noncore/settings/networksettings/ppp/devices.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceinformationppp.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceppp.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp20
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp48
-rw-r--r--noncore/settings/networksettings/ppp/pppconfig.cpp12
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp92
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp20
-rw-r--r--noncore/settings/networksettings/wlan/infoimp.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp12
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp6
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp24
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp54
-rw-r--r--noncore/settings/sound/sound.pro11
-rw-r--r--noncore/settings/sound/soundsettings.cpp16
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp10
-rw-r--r--noncore/settings/tabmanager/tabmanager.cpp20
-rw-r--r--noncore/settings/usermanager/userdialog.cpp14
-rw-r--r--noncore/settings/usermanager/usermanager.cpp11
-rw-r--r--noncore/settings/usermanager/usermanager.pro9
-rw-r--r--noncore/styles/liquid/config.in2
-rw-r--r--noncore/styles/liquid/liquid.cpp27
-rw-r--r--noncore/styles/liquid/liquid.pro6
-rw-r--r--noncore/styles/theme/othemebase.cpp27
-rw-r--r--noncore/todayplugins/fortune/fortune.pro1
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp9
-rw-r--r--noncore/todayplugins/stockticker/stockticker/inputDialog.cpp18
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/config.in2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro5
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp10
-rw-r--r--noncore/tools/calc2/engine.cpp10
-rw-r--r--noncore/tools/calculator/calculator.pro4
-rw-r--r--noncore/tools/calculator/calculatorimpl.cpp11
-rw-r--r--noncore/tools/formatter/formatter.cpp36
-rw-r--r--noncore/tools/formatter/formatter.pro10
232 files changed, 2793 insertions, 2569 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
@@ -13,16 +13,16 @@
#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() );
@@ -87,11 +87,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 )
+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
@@ -20,6 +20,12 @@
#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>
@@ -34,13 +40,12 @@
#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>
@@ -54,11 +59,11 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
// are we running as root?
isRoot = geteuid() == 0;
- QVBoxLayout* vb = new QVBoxLayout(this, 5);
+ QVBoxLayout* vb = new QVBoxLayout(this, 5);
QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this);
cfsdRBG->setRadioButtonExclusive(true);
- vb->addWidget(cfsdRBG);
+ vb->addWidget(cfsdRBG);
ramRB = new QRadioButton(tr("RAM"), cfsdRBG);
cfRB = new QRadioButton(tr("CF Card"), cfsdRBG);
@@ -75,7 +80,7 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
vb->addWidget(hb1);
QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this);
- vb->addWidget(box1);
+ vb->addWidget(box1);
QHBox *hb2 = new QHBox(box1);
hb2->setSpacing(5);
@@ -213,7 +218,7 @@ void Swapfile::getStatusPcmcia()
}
} else {
// no file found
- qDebug("no file found");
+ odebug << "no file found" << oendl;
cardInPcmcia0 = FALSE;
cardInPcmcia1 = FALSE;
}
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
@@ -36,17 +36,19 @@
#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 )
{
@@ -167,7 +169,7 @@ QString NetworkAppletControl::guessDevice( ONetworkInterface* iface )
void NetworkAppletControl::showEvent( QShowEvent* e )
{
- qDebug( "showEvent" );
+ odebug << "showEvent" << oendl;
build();
QWidget::showEvent( e );
}
@@ -175,7 +177,7 @@ void NetworkAppletControl::showEvent( QShowEvent* e )
void NetworkAppletControl::hideEvent( QHideEvent* e )
{
- qDebug( "hideEvent" );
+ odebug << "hideEvent" << oendl;
QWidget::hideEvent( e );
delete l;
@@ -192,7 +194,7 @@ 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 );
@@ -203,7 +205,7 @@ 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
@@ -15,10 +15,8 @@
#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>
@@ -26,14 +24,15 @@
#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>
@@ -43,10 +42,13 @@
#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",
@@ -84,9 +86,9 @@ NotesControl::NotesControl( QWidget *, const char * )
{
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");
@@ -165,7 +167,7 @@ void NotesControl::slotDeleteButtonClicked() {
void NotesControl::slotDeleteButton() {
QString selectedText = box->currentText();
- qDebug("deleting "+selectedText);
+ odebug << "deleting "+selectedText << oendl;
if( !selectedText.isEmpty()) {
@@ -176,12 +178,12 @@ void NotesControl::slotDeleteButton() {
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++;
}
@@ -192,10 +194,10 @@ void NotesControl::slotDeleteButton() {
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;
}
}
@@ -283,7 +285,7 @@ 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();
@@ -301,7 +303,7 @@ void NotesControl::save() {
docname = docname.left(40);
if ( docname.isEmpty() )
docname = "Empty Text";
-// qDebug(docname);
+// odebug << docname << oendl;
if( oldDocName != docname) {
int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
@@ -312,11 +314,11 @@ void NotesControl::save() {
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(" "), "_" );
@@ -327,7 +329,7 @@ void NotesControl::save() {
oldDocName=docname;
edited=false;
-// qDebug("save");
+// odebug << "save" << oendl;
if (doPopulate)
populateBox();
}
@@ -339,7 +341,7 @@ 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 );
@@ -374,7 +376,7 @@ 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() )
@@ -401,7 +403,7 @@ 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);
@@ -435,7 +437,7 @@ 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;
@@ -482,10 +484,10 @@ void NotesApplet::mousePressEvent( QMouseEvent *) {
// 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);
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
@@ -1,12 +1,12 @@
-TEMPLATE = lib
-CONFIG += qt plugin warn_on
-HEADERS = notes.h
-SOURCES = notes.cpp
-TARGET = notesapplet
-DESTDIR = $(OPIEDIR)/plugins/applets
+TEMPLATE = lib
+CONFIG += qt plugin warn_on
+HEADERS = notes.h
+SOURCES = notes.cpp
+TARGET = notesapplet
+DESTDIR = $(OPIEDIR)/plugins/applets
INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
-VERSION = 1.0.0
+DEPENDPATH += $(OPIEDIR)/include
+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
@@ -16,10 +16,14 @@
#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>
@@ -43,8 +47,6 @@
//#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 )
{
@@ -207,14 +209,14 @@ 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();
}
@@ -223,7 +225,7 @@ void WirelessApplet::checkInterface()
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;
@@ -235,7 +237,7 @@ void WirelessApplet::renewDHCP()
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 );
@@ -245,7 +247,7 @@ void WirelessApplet::renewDHCP()
{
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 ;
@@ -253,11 +255,11 @@ void WirelessApplet::renewDHCP()
// 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 );
@@ -266,7 +268,7 @@ void WirelessApplet::renewDHCP()
{
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 ;
@@ -303,14 +305,14 @@ 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();
@@ -320,7 +322,7 @@ 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();
}
@@ -356,14 +358,14 @@ bool WirelessApplet::mustRepaint()
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;
@@ -395,28 +397,28 @@ 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();
}
@@ -450,7 +452,7 @@ 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;
@@ -481,7 +483,7 @@ void WirelessApplet::paintEvent( QPaintEvent* )
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
@@ -94,7 +94,7 @@ QSize ZkbWidget::sizeHint() const {
}
void ZkbWidget::stateChanged(const QString& s) {
-// qDebug("stateChanged: %s\n", (const char*) s.utf8());
+// odebug << "stateChanged: " << (const char*) s.utf8() << "\n" << oendl;
setText(s);
}
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
@@ -71,7 +71,7 @@ void AdvancedFm::cleanUp() {
}
void AdvancedFm::tabChanged(QWidget *) {
-// qWarning("tab changed");
+// owarn << "tab changed" << oendl;
QString path = CurrentDir()->canonicalPath();
currentPathCombo->lineEdit()->setText( path );
@@ -93,13 +93,13 @@ 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);
@@ -160,7 +160,7 @@ void AdvancedFm::populateView() {
}
}
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" );
@@ -184,7 +184,7 @@ 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);
@@ -209,7 +209,7 @@ void AdvancedFm::rePopulate() {
populateView();
// int tmpTab = whichTab;
-// // qDebug("%d", tmpTab);
+// // odebug << "" << tmpTab << "" << oendl;
// for(int i =1; i < 3; i++) {
// TabWidget->setCurrentWidget(i - 1);
@@ -219,10 +219,10 @@ void AdvancedFm::rePopulate() {
}
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;
@@ -267,13 +267,13 @@ 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();
}
@@ -329,7 +329,7 @@ QStringList AdvancedFm::getPath() {
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;
@@ -380,7 +380,7 @@ void AdvancedFm::doAbout() {
}
void AdvancedFm::keyPressEvent( QKeyEvent *e) {
-// qWarning("key %d", e->key());
+// owarn << "key " << e->key() << "" << oendl;
// if( CurrentView()->hasFocus() )
{
switch ( e->key() ) {
@@ -638,7 +638,7 @@ void AdvancedFm::addToDocs() {
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("\\..*"),"");
@@ -711,7 +711,7 @@ void AdvancedFm::addCustomDir() {
}
void AdvancedFm::removeCustomDir() {
-// qDebug("remove custom dir");
+// odebug << "remove custom dir" << oendl;
Config cfg("AdvancedFm");
cfg.setGroup("Menu");
QString dir;
@@ -746,7 +746,7 @@ 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()) {
@@ -787,10 +787,10 @@ 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;
}
}
@@ -803,7 +803,7 @@ QListView * AdvancedFm::OtherView() {
}
void AdvancedFm::setOtherTabCurrent() {
-// qWarning("setOtherTabCurrent() %d", whichTab);
+// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl;
if ( whichTab == 1) {
TabWidget->setCurrentWidget(1);
} else {
@@ -814,10 +814,10 @@ void AdvancedFm::setOtherTabCurrent() {
}
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);
@@ -830,7 +830,7 @@ 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() ) {
@@ -866,7 +866,7 @@ void AdvancedFm::findFile(const QString &fileName) {
}
void AdvancedFm::slotSwitchMenu(int ) {
-// qDebug("Switch %d", item);
+// odebug << "Switch " << item << "" << oendl;
// viewMenu->setItemChecked(item, true);
}
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,31 +1,11 @@
TEMPLATE = app
-CONFIG += qt warn_on quick-app
-# CONFIG += qt warn_on
+CONFIG += qt warn_on quick-app
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
-
+LIBS += -lqpe -lopiecore2 -lopieui2
!contains(CONFIG,quick-app) {
DESTDIR = $(OPIEDIR)/bin
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
@@ -11,11 +11,16 @@
***************************************************************************/
#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>
@@ -24,10 +29,9 @@
#include <qlineedit.h>
#include <qlistview.h>
+/* STD */
#include <sys/utsname.h>
-
-using namespace Opie::Ui;
void AdvancedFm::init() {
b = false;
setCaption( tr( "AdvancedFm" ) );
@@ -219,11 +223,11 @@ void AdvancedFm::init() {
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);
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
@@ -1,839 +1,842 @@
-/***************************************************************************
- AdvancedFm.cpp
- -------------------
- ** Created: Sat Mar 9 23:33:09 2002
- copyright : (C) 2002 by ljp
- email : ljp@llornkcor.com
- * This program is free software; you can redistribute it and/or modify *
- * 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"
-
-#include <qpe/lnkproperties.h>
-#include <qpe/qpeapplication.h>
-#include <qpe/applnk.h>
-
-#include <qmessagebox.h>
-
-
-#include <qpopupmenu.h>
-#include <qlistview.h>
-
-#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);
- gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
- }
-}
-
-void AdvancedFm::showMenuHidden() {
- if (b) {
- CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
- } else {
- CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
- }
- b = !b;
- populateView();
-}
-
-void AdvancedFm::showHidden() {
- if (b) {
- CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- } else {
- CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- }
- populateView();
-}
-
-QString AdvancedFm::dealWithSymName(const QString &fileName) {
- QString strItem = fileName;
- return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
-}
-
-void AdvancedFm::runThis() {
- if( !CurrentView()->currentItem()) return;
- QString fs;
- QDir *thisDir = CurrentDir();
-
- QString curFile = CurrentView()->currentItem()->text(0);
- QString path = thisDir->canonicalPath();
-
- if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
-
- curFile = dealWithSymName((const QString&)curFile);
-
- if(curFile != "../") {
-
- fs = getFileSystemType((const QString &) path);
- QFileInfo fileInfo( path + "/" + curFile);
-// qDebug( fileInfo.owner());
-
- if( (fileInfo.permission( QFileInfo::ExeUser)
- | fileInfo.permission( QFileInfo::ExeGroup)
- | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) {
- | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
- QCopEnvelope e("QPE/System", "execute(QString)" );
- e << curFile;
- } else {
- curFile = path + "/" + curFile;
- DocLnk nf(curFile);
- QString execStr = nf.exec();
-// qDebug( execStr);
- if( execStr.isEmpty() ) {
- } else {
- nf.execute();
- }
- }
- }
-}
-
-void AdvancedFm::runText() {
- if( !CurrentView()->currentItem()) return;
- QString curFile = CurrentView()->currentItem()->text(0);
- if(curFile != "../") {
- if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
- curFile = dealWithSymName((const QString&)curFile);
- curFile = CurrentDir()->canonicalPath()+"/"+curFile;
- QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
- e << curFile;
- }
-}
-
-void AdvancedFm::makeDir() {
- InputDialog *fileDlg;
- fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
- fileDlg->exec();
- if( fileDlg->result() == 1 ) {
- QDir *thisDir = CurrentDir();
- QString filename = fileDlg->LineEdit1->text();
- thisDir->mkdir( thisDir->canonicalPath()+"/"+filename);
- }
- populateView();
-}
-
-void AdvancedFm::doDelete() {
- QStringList curFileList = getPath();
- bool doMsg=true;
- int count = curFileList.count();
- if( count > 0) {
- if(count > 1 ) {
- QString msg;
- msg=tr("Really delete\n%1 files?").arg(count);
- switch ( QMessageBox::warning(this,tr("Delete"),msg
- ,tr("Yes"),tr("No"),0,0,1) )
- {
- case 0:
- doMsg=false;
- break;
- case 1:
- return;
- break;
- };
- }
-
- QString myFile;
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- myFile = (*it);
- if( myFile.find(" -> ",0,TRUE) != -1)
- myFile = myFile.left( myFile.find(" -> ",0,TRUE));
-
- QString f = CurrentDir()->canonicalPath();
- if(f.right(1).find("/",0,TRUE) == -1)
- f += "/";
- f += myFile;
- if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) {
- //if file is a directory
-
- switch ( QMessageBox::warning( this, tr("Delete Directory?"),
- tr("Really delete %1\nand all it's contents ?" ).arg( f ) ,
- tr("Yes"), tr("No"), 0, 0, 1) ) {
- case 0:
- {
- f=f.left(f.length()-1);
- QString cmd="rm -rf "+f;
- startProcess( (const QString)cmd.latin1() );
- populateView();
- }
- break;
- case 1:
- // exit
- break;
- };
-
- } else {
- if(doMsg) {
- switch ( QMessageBox::warning(this,tr("Delete"),
- tr("Really delete\n%1?").arg( myFile ),
- tr("Yes"), tr("No"), 0, 0, 1) ) {
- case 1:
- return;
- break;
- };
- }
-
- QString cmd="rm "+f;
- QFile file(f);
- QFileInfo fi(myFile);
- if( fi.fileName().find("../",0,TRUE)==-1) {
-// qDebug("remove link files "+myFile);
-
-// DocLnk lnk(f);
- DocLnk *lnk;
- lnk = new DocLnk(f);
-// qDebug("Deleting doclnk " + lnk->linkFile());
- if(lnk->isValid())
- lnk->removeLinkFile();
- // delete lnk;
- file.remove();
- }
- }
- }
- }
- populateView();
-}
-
-void AdvancedFm::filePerms() {
- QStringList curFileList = getPath();
- QString filePath;
-
- filePath = CurrentDir()->canonicalPath()+"/";
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- filePermissions *filePerm;
- filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it));
- QPEApplication::execDialog( filePerm );
- if( filePerm )
- delete filePerm;
- }
- populateView();
-}
-
-void AdvancedFm::doProperties() {
-#if defined(QT_QWS_OPIE)
-
- QStringList curFileList = getPath();
-
- QString filePath;
- filePath = CurrentDir()->canonicalPath()+"/";
-
-// qDebug("%d",curFileList.count());
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
-// qDebug((filePath+*it));
- DocLnk lnk( (filePath+*it));
- LnkProperties prop( &lnk );
- QPEApplication::execDialog( &prop );
- }
-#endif
-
-}
-
-void AdvancedFm::upDir() {
- QDir *thisDir = CurrentDir();
- QString current = thisDir->canonicalPath();
- QDir dir(current);
- dir.cdUp();
- current = dir.canonicalPath();
- chdir( current.latin1() );
- thisDir->cd( current, TRUE);
-
- populateView();
- update();
-}
-
-void AdvancedFm::copy() {
- qApp->processEvents();
- QStringList curFileList = getPath();
-
- QDir *thisDir = CurrentDir();
- QDir *thatDir = OtherDir();
-
- bool doMsg=true;
- int count=curFileList.count();
- if( count > 0) {
- if(count > 1 ){
- QString msg;
- msg=tr("Really copy\n%1 files?").arg(count);
- switch ( QMessageBox::warning(this,tr("Copy"),msg
- ,tr("Yes"),tr("No"),0,0,1) )
- {
- case 0:
- doMsg=false;
- break;
- case 1:
- return;
- break;
- };
- }
-
- QString curFile, item, destFile;
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- item=(*it);
- if(item.find("->",0,TRUE)) //symlink
- item = item.left(item.find("->",0,TRUE));
-
- curFile = thisDir->canonicalPath()+"/"+ item;
- destFile = thatDir->canonicalPath()+"/"+ item;
-
-// qDebug("Destination file is "+destFile);
-// qDebug("CurrentFile file is " + curFile);
-
- QFile f(destFile);
- if( f.exists()) {
- if(doMsg) {
- switch ( QMessageBox::warning(this,tr("File Exists!"),
- tr("%1 exists. Ok to overwrite?").arg( item ),
- tr("Yes"),tr("No"),0,0,1) ) {
- case 1:
- return;
- break;
- };
- }
- f.remove();
- }
-
- if( !copyFile( curFile, destFile) ) {
- QMessageBox::message("AdvancedFm",
- tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) );
- return;
- }
- }
- setOtherTabCurrent();
- rePopulate();
- }
-}
-
-void AdvancedFm::copyAs() {
- qApp->processEvents();
-
- QStringList curFileList = getPath();
- QString curFile, item;
- InputDialog *fileDlg;
-
- QDir *thisDir = CurrentDir();
- QDir *thatDir = OtherDir();
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- QString destFile;
- item=(*it);
- curFile = thisDir->canonicalPath()+"/"+(*it);
- fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0);
-
- fileDlg->setInputText((const QString &) destFile );
- fileDlg->exec();
-
- if( fileDlg->result() == 1 ) {
- QString filename = fileDlg->LineEdit1->text();
- destFile = thatDir->canonicalPath()+"/"+filename;
-
- QFile f( destFile);
- if( f.exists()) {
- switch (QMessageBox::warning(this,tr("File Exists!"),
- item+tr("\nexists. Ok to overwrite?"),
- tr("Yes"),tr("No"),0,0,1) ) {
- case 0:
- f.remove();
- break;
- case 1:
- return;
- break;
- };
- }
- if( !copyFile( curFile, destFile) ) {
- QMessageBox::message("AdvancedFm",tr("Could not copy\n")
- +curFile +tr("to\n")+destFile);
- return;
- }
- }
- delete fileDlg;
-
- }
- rePopulate();
- setOtherTabCurrent();
-}
-
-void AdvancedFm::copySameDir() {
- qApp->processEvents();
- QStringList curFileList = getPath();
- QString curFile, item, destFile;
- InputDialog *fileDlg;
-
- QDir *thisDir = CurrentDir();
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- item=(*it);
- curFile = thisDir->canonicalPath()+"/"+ item;
-
- fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0);
- fileDlg->setInputText((const QString &) destFile );
- fileDlg->exec();
-
- if( fileDlg->result() == 1 ) {
-
- QString filename = fileDlg->LineEdit1->text();
- destFile = thisDir->canonicalPath()+"/"+filename;
-
- QFile f(destFile);
- if( f.exists()) {
- switch (QMessageBox::warning(this,tr("Delete"),
- destFile+tr(" already exists.\nDo you really want to delete it?"),
- tr("Yes"),tr("No"),0,0,1) ) {
- case 0:
-
- f.remove();
- break;
- case 1:
- return;
- break;
- };
- }
- if(!copyFile( curFile,destFile) ) {
- QMessageBox::message("AdvancedFm",tr("Could not copy\n")
- +curFile +tr("to\n")+destFile);
- return;
- }
-
-// qDebug("copy "+curFile+" as "+destFile);
- }
- delete fileDlg;
- }
- rePopulate();
-}
-
-void AdvancedFm::move() {
- qApp->processEvents();
-
- QStringList curFileList = getPath();
- if( curFileList.count() > 0) {
- QString curFile, destFile, item;
-
- QDir *thisDir = CurrentDir();
- QDir *thatDir = OtherDir();
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- item=(*it);
- QString destFile = thatDir->canonicalPath();
-
- if(destFile.right(1).find("/",0,TRUE) == -1)
- destFile+="/";
- destFile += item;
-// qDebug("Destination file is "+destFile);
-
- curFile = thisDir->canonicalPath();
- if(curFile.right(1).find("/",0,TRUE) == -1)
- curFile +="/";
- curFile+= item;
-// qDebug("CurrentFile file is " + curFile);
-
- if(QFileInfo(curFile).isDir()) {
- moveDirectory( curFile, destFile );
- rePopulate();
- return;
- }
-
- QFile f( curFile);
- if( f.exists()) {
- if( !copyFile( curFile, destFile) ) {
- QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile);
- return;
- } else
- QFile::remove(curFile);
- }
- }
-
- }
- rePopulate();
- setOtherTabCurrent();
-}
-
-bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) {
- int err = 0;
- if( copyDirectory( src, dest ) ) { QString cmd = "rm -rf " + src;
- err = system((const char*)cmd);
- } else
- err = -1;
-
- if(err!=0) {
- QMessageBox::message(tr("Note"),tr("Could not move\n") + src);
- return false;
- }
- return true;
-}
-
-bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
-
- QString cmd = "/bin/cp -fpR " + src + " " + dest;
- qWarning(cmd);
- 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 ) );
- return false;
- }
-
- return true;
-}
-
-
-bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
-
-
- if(QFileInfo(src).isDir()) {
- if( copyDirectory( src, dest )) {
- setOtherTabCurrent();
- populateView();
- return true;
- }
- else
- return false;
- }
-
-
- bool success = true;
- struct stat status;
- QFile srcFile(src);
- QFile destFile(dest);
- int err=0;
- int read_fd=0;
- int write_fd=0;
- struct stat stat_buf;
- off_t offset = 0;
- if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
-// qWarning("open failed");
- 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");
- return success = false;
- }
- write_fd = destFile.handle();
- if(write_fd != -1) {
- err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size);
- if( err == -1) {
- QString msg;
- switch(err) {
- case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. ";
- case EINVAL: msg = "Descriptor is not valid or locked. ";
- case ENOMEM: msg = "Insufficient memory to read from in_fd.";
- case EIO: msg = "Unspecified error while reading from in_fd.";
- };
- success = false;
-// qWarning(msg);
- }
- } else {
- success = false;
- }
- } else {
- success = false;
- }
- srcFile.close();
- destFile.close();
- // Set file permissions
- if( stat( (const char *) src, &status ) == 0 ) {
- chmod( (const char *) dest, status.st_mode );
- }
-
- return success;
-}
-
-void AdvancedFm::runCommand() {
- if( !CurrentView()->currentItem()) return;
- QDir *thisDir = CurrentDir();
-
- QString curFile;
- curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0);
-
- InputDialog *fileDlg;
- fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
- fileDlg->setInputText(curFile);
- fileDlg->exec();
- //QString command;
-
- if( fileDlg->result() == 1 ) {
-// qDebug(fileDlg->LineEdit1->text());
- QStringList command;
-
- command << "/bin/sh";
- command << "-c";
- command << fileDlg->LineEdit1->text();
- Output *outDlg;
- outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
- QPEApplication::execDialog( outDlg );
- qApp->processEvents();
-
- }
-}
-
-void AdvancedFm::runCommandStd() {
- if( !CurrentView()->currentItem()) return;
- QString curFile;
- QDir *thisDir = CurrentDir();
- QListView *thisView = CurrentView();
- if( thisView->currentItem())
- curFile = thisDir->canonicalPath() +"/"+ thisView->currentItem()->text(0);
-
- InputDialog *fileDlg;
- fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
- fileDlg->setInputText(curFile);
- fileDlg->exec();
-
- if( fileDlg->result() == 1 ) {
- qApp->processEvents();
- startProcess( (const QString)fileDlg->LineEdit1->text().latin1());
- }
-}
-
-void AdvancedFm::fileStatus() {
- if( !CurrentView()->currentItem()) return;
- QString curFile;
- curFile = CurrentView()->currentItem()->text(0);
-
- QStringList command;
- command << "/bin/sh";
- command << "-c";
- command << "stat -l "+ curFile;
-
- Output *outDlg;
- outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
- QPEApplication::execDialog( outDlg );
- qApp->processEvents();
-}
-
-
-void AdvancedFm::mkDir() {
- makeDir();
-}
-
-void AdvancedFm::rn() {
- renameIt();
-}
-
-void AdvancedFm::del() {
- doDelete();
-}
-
-void AdvancedFm::mkSym() {
- QString cmd;
- QStringList curFileList = getPath();
- if( curFileList.count() > 0) {
- QDir *thisDir = CurrentDir();
- QDir * thatDir = OtherDir();
-
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
-
- QString destName = thatDir->canonicalPath()+"/"+(*it);
- if(destName.right(1) == "/") {
- destName = destName.left( destName.length() -1);
- }
-
- QString curFile = thisDir->canonicalPath()+"/"+(*it);
-
- if( curFile.right(1) == "/") {
- curFile = curFile.left( curFile.length() -1);
- }
-
- cmd = "ln -s "+curFile+" "+destName;
-// qDebug(cmd);
- startProcess( (const QString)cmd );
- }
- rePopulate();
- setOtherTabCurrent();
- }
-}
-
-void AdvancedFm::doBeam() {
- Ir ir;
- if(!ir.supported()) {
- } else {
- QStringList curFileList = getPath();
- if( curFileList.count() > 0) {
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
- QString curFile = (*it);
- QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile;
- if( curFilePath.right(1) == "/") {
- curFilePath = curFilePath.left( curFilePath.length() -1);
- }
- Ir *file = new Ir(this, "IR");
- connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
- file->send( curFilePath, curFile );
- }
- }
- }
-}
-
-void AdvancedFm::fileBeamFinished( Ir *) {
- QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
-}
-
-void AdvancedFm::selectAll() {
- QListView *thisView = CurrentView();
- thisView->selectAll(true);
- thisView->setSelected( thisView->firstChild(),false);
-}
-
-void AdvancedFm::startProcess(const QString & cmd) {
- QStringList command;
- OProcess *process;
- process = new OProcess();
- connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
- this, SLOT( processEnded(Opie::Core::OProcess*)));
-
- connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
- this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
-
- command << "/bin/sh";
- command << "-c";
- command << cmd.latin1();
- *process << command;
- if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
- qDebug("could not start process");
-}
-
-void AdvancedFm::processEnded(OProcess *) {
- rePopulate();
-}
-
-void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
-// qWarning("received stderrt %d bytes", buflen);
-
- QString lineStr = buffer;
- QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
-}
-
-bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
- if ( o->inherits( "QLineEdit" ) ) {
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *ke = (QKeyEvent*)e;
- if ( ke->key() == Key_Return ||
- ke->key() == Key_Enter ) {
- okRename();
- return true;
- }
- else if ( ke->key() == Key_Escape ) {
- cancelRename();
- return true;
- }
- }
- else if ( e->type() == QEvent::FocusOut ) {
- cancelRename();
- return true;
- }
- }
- if ( o->inherits( "QListView" ) ) {
- if ( e->type() == QEvent::FocusIn ) {
- if( o == Local_View) { //keep track of which view
- whichTab=1;
- }
- else {
- whichTab=2;
- }
- }
- OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
- }
-
- return QWidget::eventFilter( o, e );
-}
-
-
-void AdvancedFm::cancelRename() {
-// qDebug("cancel rename");
- QListView * view;
- view = CurrentView();
-
- bool resetFocus = view->viewport()->focusProxy() == renameBox;
- delete renameBox;
- renameBox = 0;
- if ( resetFocus ) {
- view->viewport()->setFocusProxy( view);
- view->setFocus();
- }
-}
-
-void AdvancedFm::doRename(QListView * view) {
- if( !CurrentView()->currentItem()) return;
-
- QRect r = view->itemRect( view->currentItem( ));
- r = QRect( view->viewportToContents( r.topLeft() ), r.size() );
- r.setX( view->contentsX() );
-
- if ( r.width() > view->visibleWidth() )
- r.setWidth( view->visibleWidth() );
-
- renameBox = new QLineEdit( view->viewport(), "qt_renamebox" );
- renameBox->setFrame(true);
-
- renameBox->setText( view->currentItem()->text(0) );
-
- renameBox->selectAll();
- renameBox->installEventFilter( this );
-
- view->addChild( renameBox, r.x(), r.y() );
-
- renameBox->resize( r.size() );
-
- view->viewport()->setFocusProxy( renameBox );
-
- renameBox->setFocus();
- renameBox->show();
-}
-
-
-void AdvancedFm::renameIt() {
- if( !CurrentView()->currentItem()) return;
-
- QListView *thisView = CurrentView();
- oldName = thisView->currentItem()->text(0);
- doRename( thisView );
-}
-
-void AdvancedFm::okRename() {
- if( !renameBox) return;
-
- QString newName = renameBox->text();
- cancelRename();
- QListView * view = CurrentView();
- QString path = CurrentDir()->canonicalPath() + "/";
- oldName = path + oldName;
- newName = path + newName;
- if( rename( oldName.latin1(), newName.latin1())== -1)
- QMessageBox::message(tr("Note"),tr("Could not rename"));
- else
- oldName = "";
- QListViewItem *item = view->currentItem();
- view->takeItem( item );
- delete item;
- rePopulate();
-}
-
-void AdvancedFm::openSearch() {
- QMessageBox::message(tr("Note"),tr("Not Yet Implemented"));
-}
+/***************************************************************************
+ AdvancedFm.cpp
+ -------------------
+ ** Created: Sat Mar 9 23:33:09 2002
+ copyright : (C) 2002 by ljp
+ email : ljp@llornkcor.com
+ * This program is free software; you can redistribute it and/or modify *
+ * 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;
+
+/* 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>
+
+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)+"/";
+// owarn << pathItem << oendl;
+ gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
+ }
+}
+
+void AdvancedFm::showMenuHidden() {
+ if (b) {
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
+ } else {
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
+ }
+ b = !b;
+ populateView();
+}
+
+void AdvancedFm::showHidden() {
+ if (b) {
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ } else {
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ }
+ populateView();
+}
+
+QString AdvancedFm::dealWithSymName(const QString &fileName) {
+ QString strItem = fileName;
+ return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
+}
+
+void AdvancedFm::runThis() {
+ if( !CurrentView()->currentItem()) return;
+ QString fs;
+ QDir *thisDir = CurrentDir();
+
+ QString curFile = CurrentView()->currentItem()->text(0);
+ QString path = thisDir->canonicalPath();
+
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+
+ curFile = dealWithSymName((const QString&)curFile);
+
+ if(curFile != "../") {
+
+ fs = getFileSystemType((const QString &) path);
+ QFileInfo fileInfo( path + "/" + curFile);
+// odebug << fileInfo.owner() << oendl;
+
+ if( (fileInfo.permission( QFileInfo::ExeUser)
+ | fileInfo.permission( QFileInfo::ExeGroup)
+ | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) {
+ | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
+ QCopEnvelope e("QPE/System", "execute(QString)" );
+ e << curFile;
+ } else {
+ curFile = path + "/" + curFile;
+ DocLnk nf(curFile);
+ QString execStr = nf.exec();
+// odebug << execStr << oendl;
+ if( execStr.isEmpty() ) {
+ } else {
+ nf.execute();
+ }
+ }
+ }
+}
+
+void AdvancedFm::runText() {
+ if( !CurrentView()->currentItem()) return;
+ QString curFile = CurrentView()->currentItem()->text(0);
+ if(curFile != "../") {
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+ curFile = dealWithSymName((const QString&)curFile);
+ curFile = CurrentDir()->canonicalPath()+"/"+curFile;
+ QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
+ e << curFile;
+ }
+}
+
+void AdvancedFm::makeDir() {
+ InputDialog *fileDlg;
+ fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
+ fileDlg->exec();
+ if( fileDlg->result() == 1 ) {
+ QDir *thisDir = CurrentDir();
+ QString filename = fileDlg->LineEdit1->text();
+ thisDir->mkdir( thisDir->canonicalPath()+"/"+filename);
+ }
+ populateView();
+}
+
+void AdvancedFm::doDelete() {
+ QStringList curFileList = getPath();
+ bool doMsg=true;
+ int count = curFileList.count();
+ if( count > 0) {
+ if(count > 1 ) {
+ QString msg;
+ msg=tr("Really delete\n%1 files?").arg(count);
+ switch ( QMessageBox::warning(this,tr("Delete"),msg
+ ,tr("Yes"),tr("No"),0,0,1) )
+ {
+ case 0:
+ doMsg=false;
+ break;
+ case 1:
+ return;
+ break;
+ };
+ }
+
+ QString myFile;
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ myFile = (*it);
+ if( myFile.find(" -> ",0,TRUE) != -1)
+ myFile = myFile.left( myFile.find(" -> ",0,TRUE));
+
+ QString f = CurrentDir()->canonicalPath();
+ if(f.right(1).find("/",0,TRUE) == -1)
+ f += "/";
+ f += myFile;
+ if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) {
+ //if file is a directory
+
+ switch ( QMessageBox::warning( this, tr("Delete Directory?"),
+ tr("Really delete %1\nand all it's contents ?" ).arg( f ) ,
+ tr("Yes"), tr("No"), 0, 0, 1) ) {
+ case 0:
+ {
+ f=f.left(f.length()-1);
+ QString cmd="rm -rf "+f;
+ startProcess( (const QString)cmd.latin1() );
+ populateView();
+ }
+ break;
+ case 1:
+ // exit
+ break;
+ };
+
+ } else {
+ if(doMsg) {
+ switch ( QMessageBox::warning(this,tr("Delete"),
+ tr("Really delete\n%1?").arg( myFile ),
+ tr("Yes"), tr("No"), 0, 0, 1) ) {
+ case 1:
+ return;
+ break;
+ };
+ }
+
+ QString cmd="rm "+f;
+ QFile file(f);
+ QFileInfo fi(myFile);
+ if( fi.fileName().find("../",0,TRUE)==-1) {
+// odebug << "remove link files "+myFile << oendl;
+
+// DocLnk lnk(f);
+ DocLnk *lnk;
+ lnk = new DocLnk(f);
+// odebug << "Deleting doclnk " + lnk->linkFile() << oendl;
+ if(lnk->isValid())
+ lnk->removeLinkFile();
+ // delete lnk;
+ file.remove();
+ }
+ }
+ }
+ }
+ populateView();
+}
+
+void AdvancedFm::filePerms() {
+ QStringList curFileList = getPath();
+ QString filePath;
+
+ filePath = CurrentDir()->canonicalPath()+"/";
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ filePermissions *filePerm;
+ filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it));
+ QPEApplication::execDialog( filePerm );
+ if( filePerm )
+ delete filePerm;
+ }
+ populateView();
+}
+
+void AdvancedFm::doProperties() {
+#if defined(QT_QWS_OPIE)
+
+ QStringList curFileList = getPath();
+
+ QString filePath;
+ filePath = CurrentDir()->canonicalPath()+"/";
+
+// odebug << "" << curFileList.count() << "" << oendl;
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+// odebug << (filePath+*it) << oendl;
+ DocLnk lnk( (filePath+*it));
+ LnkProperties prop( &lnk );
+ QPEApplication::execDialog( &prop );
+ }
+#endif
+
+}
+
+void AdvancedFm::upDir() {
+ QDir *thisDir = CurrentDir();
+ QString current = thisDir->canonicalPath();
+ QDir dir(current);
+ dir.cdUp();
+ current = dir.canonicalPath();
+ chdir( current.latin1() );
+ thisDir->cd( current, TRUE);
+
+ populateView();
+ update();
+}
+
+void AdvancedFm::copy() {
+ qApp->processEvents();
+ QStringList curFileList = getPath();
+
+ QDir *thisDir = CurrentDir();
+ QDir *thatDir = OtherDir();
+
+ bool doMsg=true;
+ int count=curFileList.count();
+ if( count > 0) {
+ if(count > 1 ){
+ QString msg;
+ msg=tr("Really copy\n%1 files?").arg(count);
+ switch ( QMessageBox::warning(this,tr("Copy"),msg
+ ,tr("Yes"),tr("No"),0,0,1) )
+ {
+ case 0:
+ doMsg=false;
+ break;
+ case 1:
+ return;
+ break;
+ };
+ }
+
+ QString curFile, item, destFile;
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ item=(*it);
+ if(item.find("->",0,TRUE)) //symlink
+ item = item.left(item.find("->",0,TRUE));
+
+ curFile = thisDir->canonicalPath()+"/"+ item;
+ destFile = thatDir->canonicalPath()+"/"+ item;
+
+// odebug << "Destination file is "+destFile << oendl;
+// odebug << "CurrentFile file is " + curFile << oendl;
+
+ QFile f(destFile);
+ if( f.exists()) {
+ if(doMsg) {
+ switch ( QMessageBox::warning(this,tr("File Exists!"),
+ tr("%1 exists. Ok to overwrite?").arg( item ),
+ tr("Yes"),tr("No"),0,0,1) ) {
+ case 1:
+ return;
+ break;
+ };
+ }
+ f.remove();
+ }
+
+ if( !copyFile( curFile, destFile) ) {
+ QMessageBox::message("AdvancedFm",
+ tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) );
+ return;
+ }
+ }
+ setOtherTabCurrent();
+ rePopulate();
+ }
+}
+
+void AdvancedFm::copyAs() {
+ qApp->processEvents();
+
+ QStringList curFileList = getPath();
+ QString curFile, item;
+ InputDialog *fileDlg;
+
+ QDir *thisDir = CurrentDir();
+ QDir *thatDir = OtherDir();
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ QString destFile;
+ item=(*it);
+ curFile = thisDir->canonicalPath()+"/"+(*it);
+ fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0);
+
+ fileDlg->setInputText((const QString &) destFile );
+ fileDlg->exec();
+
+ if( fileDlg->result() == 1 ) {
+ QString filename = fileDlg->LineEdit1->text();
+ destFile = thatDir->canonicalPath()+"/"+filename;
+
+ QFile f( destFile);
+ if( f.exists()) {
+ switch (QMessageBox::warning(this,tr("File Exists!"),
+ item+tr("\nexists. Ok to overwrite?"),
+ tr("Yes"),tr("No"),0,0,1) ) {
+ case 0:
+ f.remove();
+ break;
+ case 1:
+ return;
+ break;
+ };
+ }
+ if( !copyFile( curFile, destFile) ) {
+ QMessageBox::message("AdvancedFm",tr("Could not copy\n")
+ +curFile +tr("to\n")+destFile);
+ return;
+ }
+ }
+ delete fileDlg;
+
+ }
+ rePopulate();
+ setOtherTabCurrent();
+}
+
+void AdvancedFm::copySameDir() {
+ qApp->processEvents();
+ QStringList curFileList = getPath();
+ QString curFile, item, destFile;
+ InputDialog *fileDlg;
+
+ QDir *thisDir = CurrentDir();
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ item=(*it);
+ curFile = thisDir->canonicalPath()+"/"+ item;
+
+ fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0);
+ fileDlg->setInputText((const QString &) destFile );
+ fileDlg->exec();
+
+ if( fileDlg->result() == 1 ) {
+
+ QString filename = fileDlg->LineEdit1->text();
+ destFile = thisDir->canonicalPath()+"/"+filename;
+
+ QFile f(destFile);
+ if( f.exists()) {
+ switch (QMessageBox::warning(this,tr("Delete"),
+ destFile+tr(" already exists.\nDo you really want to delete it?"),
+ tr("Yes"),tr("No"),0,0,1) ) {
+ case 0:
+
+ f.remove();
+ break;
+ case 1:
+ return;
+ break;
+ };
+ }
+ if(!copyFile( curFile,destFile) ) {
+ QMessageBox::message("AdvancedFm",tr("Could not copy\n")
+ +curFile +tr("to\n")+destFile);
+ return;
+ }
+
+// odebug << "copy "+curFile+" as "+destFile << oendl;
+ }
+ delete fileDlg;
+ }
+ rePopulate();
+}
+
+void AdvancedFm::move() {
+ qApp->processEvents();
+
+ QStringList curFileList = getPath();
+ if( curFileList.count() > 0) {
+ QString curFile, destFile, item;
+
+ QDir *thisDir = CurrentDir();
+ QDir *thatDir = OtherDir();
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ item=(*it);
+ QString destFile = thatDir->canonicalPath();
+
+ if(destFile.right(1).find("/",0,TRUE) == -1)
+ destFile+="/";
+ destFile += item;
+// odebug << "Destination file is "+destFile << oendl;
+
+ curFile = thisDir->canonicalPath();
+ if(curFile.right(1).find("/",0,TRUE) == -1)
+ curFile +="/";
+ curFile+= item;
+// odebug << "CurrentFile file is " + curFile << oendl;
+
+ if(QFileInfo(curFile).isDir()) {
+ moveDirectory( curFile, destFile );
+ rePopulate();
+ return;
+ }
+
+ QFile f( curFile);
+ if( f.exists()) {
+ if( !copyFile( curFile, destFile) ) {
+ QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile);
+ return;
+ } else
+ QFile::remove(curFile);
+ }
+ }
+
+ }
+ rePopulate();
+ setOtherTabCurrent();
+}
+
+bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) {
+ int err = 0;
+ if( copyDirectory( src, dest ) ) { QString cmd = "rm -rf " + src;
+ err = system((const char*)cmd);
+ } else
+ err = -1;
+
+ if(err!=0) {
+ QMessageBox::message(tr("Note"),tr("Could not move\n") + src);
+ return false;
+ }
+ return true;
+}
+
+bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
+
+ QString cmd = "/bin/cp -fpR " + src + " " + dest;
+ 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 ) );
+ return false;
+ }
+
+ return true;
+}
+
+
+bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
+
+
+ if(QFileInfo(src).isDir()) {
+ if( copyDirectory( src, dest )) {
+ setOtherTabCurrent();
+ populateView();
+ return true;
+ }
+ else
+ return false;
+ }
+
+
+ bool success = true;
+ struct stat status;
+ QFile srcFile(src);
+ QFile destFile(dest);
+ int err=0;
+ int read_fd=0;
+ int write_fd=0;
+ struct stat stat_buf;
+ off_t offset = 0;
+ if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
+// 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 ) ) {
+// owarn << "destfile open failed" << oendl;
+ return success = false;
+ }
+ write_fd = destFile.handle();
+ if(write_fd != -1) {
+ err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size);
+ if( err == -1) {
+ QString msg;
+ switch(err) {
+ case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. ";
+ case EINVAL: msg = "Descriptor is not valid or locked. ";
+ case ENOMEM: msg = "Insufficient memory to read from in_fd.";
+ case EIO: msg = "Unspecified error while reading from in_fd.";
+ };
+ success = false;
+// owarn << msg << oendl;
+ }
+ } else {
+ success = false;
+ }
+ } else {
+ success = false;
+ }
+ srcFile.close();
+ destFile.close();
+ // Set file permissions
+ if( stat( (const char *) src, &status ) == 0 ) {
+ chmod( (const char *) dest, status.st_mode );
+ }
+
+ return success;
+}
+
+void AdvancedFm::runCommand() {
+ if( !CurrentView()->currentItem()) return;
+ QDir *thisDir = CurrentDir();
+
+ QString curFile;
+ curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0);
+
+ InputDialog *fileDlg;
+ fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
+ fileDlg->setInputText(curFile);
+ fileDlg->exec();
+ //QString command;
+
+ if( fileDlg->result() == 1 ) {
+// odebug << fileDlg->LineEdit1->text() << oendl;
+ QStringList command;
+
+ command << "/bin/sh";
+ command << "-c";
+ command << fileDlg->LineEdit1->text();
+ Output *outDlg;
+ outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
+ QPEApplication::execDialog( outDlg );
+ qApp->processEvents();
+
+ }
+}
+
+void AdvancedFm::runCommandStd() {
+ if( !CurrentView()->currentItem()) return;
+ QString curFile;
+ QDir *thisDir = CurrentDir();
+ QListView *thisView = CurrentView();
+ if( thisView->currentItem())
+ curFile = thisDir->canonicalPath() +"/"+ thisView->currentItem()->text(0);
+
+ InputDialog *fileDlg;
+ fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
+ fileDlg->setInputText(curFile);
+ fileDlg->exec();
+
+ if( fileDlg->result() == 1 ) {
+ qApp->processEvents();
+ startProcess( (const QString)fileDlg->LineEdit1->text().latin1());
+ }
+}
+
+void AdvancedFm::fileStatus() {
+ if( !CurrentView()->currentItem()) return;
+ QString curFile;
+ curFile = CurrentView()->currentItem()->text(0);
+
+ QStringList command;
+ command << "/bin/sh";
+ command << "-c";
+ command << "stat -l "+ curFile;
+
+ Output *outDlg;
+ outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
+ QPEApplication::execDialog( outDlg );
+ qApp->processEvents();
+}
+
+
+void AdvancedFm::mkDir() {
+ makeDir();
+}
+
+void AdvancedFm::rn() {
+ renameIt();
+}
+
+void AdvancedFm::del() {
+ doDelete();
+}
+
+void AdvancedFm::mkSym() {
+ QString cmd;
+ QStringList curFileList = getPath();
+ if( curFileList.count() > 0) {
+ QDir *thisDir = CurrentDir();
+ QDir * thatDir = OtherDir();
+
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+
+ QString destName = thatDir->canonicalPath()+"/"+(*it);
+ if(destName.right(1) == "/") {
+ destName = destName.left( destName.length() -1);
+ }
+
+ QString curFile = thisDir->canonicalPath()+"/"+(*it);
+
+ if( curFile.right(1) == "/") {
+ curFile = curFile.left( curFile.length() -1);
+ }
+
+ cmd = "ln -s "+curFile+" "+destName;
+// odebug << cmd << oendl;
+ startProcess( (const QString)cmd );
+ }
+ rePopulate();
+ setOtherTabCurrent();
+ }
+}
+
+void AdvancedFm::doBeam() {
+ Ir ir;
+ if(!ir.supported()) {
+ } else {
+ QStringList curFileList = getPath();
+ if( curFileList.count() > 0) {
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
+ QString curFile = (*it);
+ QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile;
+ if( curFilePath.right(1) == "/") {
+ curFilePath = curFilePath.left( curFilePath.length() -1);
+ }
+ Ir *file = new Ir(this, "IR");
+ connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
+ file->send( curFilePath, curFile );
+ }
+ }
+ }
+}
+
+void AdvancedFm::fileBeamFinished( Ir *) {
+ QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
+}
+
+void AdvancedFm::selectAll() {
+ QListView *thisView = CurrentView();
+ thisView->selectAll(true);
+ thisView->setSelected( thisView->firstChild(),false);
+}
+
+void AdvancedFm::startProcess(const QString & cmd) {
+ QStringList command;
+ OProcess *process;
+ process = new OProcess();
+ connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
+ this, SLOT( processEnded(Opie::Core::OProcess*)));
+
+ connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
+ this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
+
+ command << "/bin/sh";
+ command << "-c";
+ command << cmd.latin1();
+ *process << command;
+ if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
+ odebug << "could not start process" << oendl;
+}
+
+void AdvancedFm::processEnded(OProcess *) {
+ rePopulate();
+}
+
+void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
+// owarn << "received stderrt " << buflen << " bytes" << oendl;
+
+ QString lineStr = buffer;
+ QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
+}
+
+bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
+ if ( o->inherits( "QLineEdit" ) ) {
+ if ( e->type() == QEvent::KeyPress ) {
+ QKeyEvent *ke = (QKeyEvent*)e;
+ if ( ke->key() == Key_Return ||
+ ke->key() == Key_Enter ) {
+ okRename();
+ return true;
+ }
+ else if ( ke->key() == Key_Escape ) {
+ cancelRename();
+ return true;
+ }
+ }
+ else if ( e->type() == QEvent::FocusOut ) {
+ cancelRename();
+ return true;
+ }
+ }
+ if ( o->inherits( "QListView" ) ) {
+ if ( e->type() == QEvent::FocusIn ) {
+ if( o == Local_View) { //keep track of which view
+ whichTab=1;
+ }
+ else {
+ whichTab=2;
+ }
+ }
+ OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
+ }
+
+ return QWidget::eventFilter( o, e );
+}
+
+
+void AdvancedFm::cancelRename() {
+// odebug << "cancel rename" << oendl;
+ QListView * view;
+ view = CurrentView();
+
+ bool resetFocus = view->viewport()->focusProxy() == renameBox;
+ delete renameBox;
+ renameBox = 0;
+ if ( resetFocus ) {
+ view->viewport()->setFocusProxy( view);
+ view->setFocus();
+ }
+}
+
+void AdvancedFm::doRename(QListView * view) {
+ if( !CurrentView()->currentItem()) return;
+
+ QRect r = view->itemRect( view->currentItem( ));
+ r = QRect( view->viewportToContents( r.topLeft() ), r.size() );
+ r.setX( view->contentsX() );
+
+ if ( r.width() > view->visibleWidth() )
+ r.setWidth( view->visibleWidth() );
+
+ renameBox = new QLineEdit( view->viewport(), "qt_renamebox" );
+ renameBox->setFrame(true);
+
+ renameBox->setText( view->currentItem()->text(0) );
+
+ renameBox->selectAll();
+ renameBox->installEventFilter( this );
+
+ view->addChild( renameBox, r.x(), r.y() );
+
+ renameBox->resize( r.size() );
+
+ view->viewport()->setFocusProxy( renameBox );
+
+ renameBox->setFocus();
+ renameBox->show();
+}
+
+
+void AdvancedFm::renameIt() {
+ if( !CurrentView()->currentItem()) return;
+
+ QListView *thisView = CurrentView();
+ oldName = thisView->currentItem()->text(0);
+ doRename( thisView );
+}
+
+void AdvancedFm::okRename() {
+ if( !renameBox) return;
+
+ QString newName = renameBox->text();
+ cancelRename();
+ QListView * view = CurrentView();
+ QString path = CurrentDir()->canonicalPath() + "/";
+ oldName = path + oldName;
+ newName = path + newName;
+ if( rename( oldName.latin1(), newName.latin1())== -1)
+ QMessageBox::message(tr("Note"),tr("Could not rename"));
+ else
+ oldName = "";
+ QListViewItem *item = view->currentItem();
+ view->takeItem( item );
+ delete item;
+ rePopulate();
+}
+
+void AdvancedFm::openSearch() {
+ QMessageBox::message(tr("Note"),tr("Not Yet Implemented"));
+}
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
@@ -32,7 +32,7 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal
{
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
@@ -5,19 +5,22 @@
****************************************************************************/
#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",
@@ -121,7 +124,7 @@ 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 );
@@ -157,7 +160,7 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
// * proc << commands.latin1();
for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
- qDebug( "%s", (*it).latin1() );
+ odebug << "" << (*it).latin1() << "" << oendl;
* proc << (*it).latin1();
}
@@ -186,7 +189,7 @@ void Output::saveOutput() {
filename+="/";
QString name = fileDlg->LineEdit1->text();
filename+="text/plain/"+name;
- qDebug(filename);
+ odebug << filename << oendl;
QFile f(filename);
f.open( IO_WriteOnly);
@@ -196,16 +199,16 @@ void Output::saveOutput() {
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);
@@ -222,13 +225,13 @@ 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);
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
@@ -1,4 +1,4 @@
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = mainwindow.h \
cbinfo.h \
traninfo.h \
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
@@ -27,14 +27,19 @@
*/
#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 )
@@ -302,7 +307,7 @@ void ListEdit::slotClick(QListViewItem *itm, const QPoint &pnt, int col)
}
_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
@@ -28,6 +28,8 @@
#include "tabledef.h"
+#include <opie2/odebug.h>
+using namespace Opie::Core;
// --- ColumnDef --------------------------------------------------------------
ColumnDef::ColumnDef(const char *sName, ColumnType type, const char *sNewValue)
@@ -42,14 +44,14 @@ ColumnDef::ColumnDef(const char *sName, ColumnType type, const char *sNewValue)
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
@@ -31,8 +31,12 @@
#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>
@@ -332,6 +336,6 @@ 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
@@ -1,21 +1,9 @@
-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
+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
-}
-
-
-
+include ( $(OPIEDIR)/include.pro )
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
@@ -9,10 +9,14 @@
// (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)
@@ -36,7 +40,7 @@ ListViewConfDir::~ListViewConfDir()
void ListViewConfDir::readConfFiles()
{
- confDir.setFilter( QDir::Files | QDir::NoSymLinks );
+ confDir.setFilter( QDir::Files | QDir::NoSymLinks );
confDir.setSorting( QDir::Name );
confDir.setNameFilter("*.conf");
const QFileInfoList *list = confDir.entryInfoList();
@@ -47,7 +51,7 @@ void ListViewConfDir::readConfFiles()
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
@@ -9,9 +9,15 @@
// (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
@@ -19,7 +25,7 @@ ListViewItemConfFile::ListViewItemConfFile(QFileInfo *file, QListView *parent)
: ListViewItemConf(parent), _valid(false)
{
confFileInfo = file;
-// parseFile();
+ // parseFile();
displayText();
}
@@ -40,8 +46,8 @@ QString ListViewItemConfFile::fileName()
void ListViewItemConfFile::parseFile()
{
- //qDebug("ListViewItemConfFile::parseFile BEGIN");
- QFile confFile(confFileInfo->absFilePath());
+ //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 );
@@ -52,7 +58,7 @@ void ListViewItemConfFile::parseFile()
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;
@@ -60,7 +66,7 @@ void ListViewItemConfFile::parseFile()
}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 );
@@ -68,15 +74,15 @@ void ListViewItemConfFile::parseFile()
} 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;
}
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
@@ -11,15 +11,18 @@
#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)
{
@@ -33,12 +36,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
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 );
@@ -98,7 +101,7 @@ MainWindow::~MainWindow()
void MainWindow::setCurrent(QListViewItem *item)
{
-// qDebug("MainWindow::setCurrent");
+// odebug << "MainWindow::setCurrent" << oendl;
if (!item) return;
_item = (ListViewItemConf*) item;
if (!_item) return;
@@ -174,7 +177,7 @@ void MainWindow::removeConfFile()
void MainWindow::showPopup()
{
-qDebug("showPopup");
+odebug << "showPopup" << oendl;
if (!_item) return;
popupActionRevert->setEnabled(_item->revertable());
popupActionSave->setEnabled(_item->isChanged());
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,6 +1,12 @@
-#include <qmessagebox.h>
#include "cfgfile.h"
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
+#include <qmessagebox.h>
+
// CfgEntry implementation
CfgEntry::CfgEntry() {
}
@@ -95,7 +101,7 @@ bool CfgParser::load(QString file, CfgFile& cfg) {
reader.parse(is);
if (!err.isEmpty()) {
- qDebug(err);
+ odebug << err << oendl;
return false;
}
@@ -106,7 +112,7 @@ bool CfgParser::load(QString file, CfgFile& cfg) {
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
@@ -2,23 +2,23 @@ TEMPLATE = app
DESTDIR = $(OPIEDIR)/bin
CONFIG = qt warn_on
HEADERS = zkb.h \
- zkbcfg.h \
- zkbnames.h \
- zkbxml.h \
- cfgdlg.h \
- cfgfile.h
+ zkbcfg.h \
+ zkbnames.h \
+ zkbxml.h \
+ cfgdlg.h \
+ cfgfile.h
SOURCES = main.cpp \
cfgdlg.cpp \
cfgfile.cpp \
zkb.cpp \
zkbcfg.cpp \
- zkbnames.cpp \
- zkbxml.cpp
+ zkbnames.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
@@ -364,7 +364,7 @@ State* Keymap::getStateByLabel(const QString& label) {
}
}
-// 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();
@@ -416,7 +416,7 @@ bool Keymap::setCurrentState(State* state) {
if (tit != stateLabelMap.end()) {
currentLabel = tit.data();
} else {
-// qDebug("no label for: " + currentStateName + "\n");
+// odebug << "no label for: " + currentStateName + "\n" << oendl;
currentLabel = "";
}
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,7 +1,11 @@
-#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) {
@@ -15,7 +19,7 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix)
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;
}
@@ -30,8 +34,7 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix)
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;
}
@@ -122,7 +125,7 @@ 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()) {
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
@@ -16,12 +16,13 @@
#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>
@@ -33,14 +34,16 @@
#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 )
@@ -144,13 +147,13 @@ void Bartender::fillList() {
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() {
@@ -171,7 +174,7 @@ 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();
@@ -207,7 +210,7 @@ void Bartender::showDrink( QListViewItem *item) {
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;
@@ -248,7 +251,7 @@ void Bartender::doSearchByName() {
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));
}
}
@@ -279,10 +282,10 @@ void Bartender::doSearchByDrink() {
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;
}
@@ -313,7 +316,7 @@ 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());
}
}
@@ -343,7 +346,7 @@ void Bartender::doEdit() {
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);
}
@@ -370,7 +373,7 @@ void Bartender::doEdit() {
////////// 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();
@@ -397,7 +400,7 @@ void Bartender::openCurrentDrink() {
}
void Bartender::fileMenuActivated( int item) {
- qDebug("Item %d", item);
+ odebug << "Item " << item << "" << oendl;
switch(item) {
case -3: // new -3
fileNew();
@@ -418,7 +421,7 @@ void Bartender::fileMenuActivated( int item) {
}
void Bartender::editMenuActivated(int item) {
- qDebug("Item %d", item);
+ odebug << "Item " << item << "" << oendl;
/*
edit -8
*/
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
-DESTDIR = $(OPIEDIR)/bin
-TARGET = bartender
+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
@@ -63,10 +63,18 @@
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>
@@ -81,10 +89,6 @@
#include <pty.h>
#endif
-#include "procctl.h"
-#include "MyPty.h"
-
-
#undef VERBOSE_DEBUG
@@ -97,7 +101,7 @@
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;
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
@@ -1029,7 +1029,7 @@ 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;
@@ -1068,11 +1068,11 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *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
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
@@ -70,6 +70,12 @@
*/
#include "TEmulation.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* STD */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -204,7 +210,7 @@ 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());
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,4 +1,11 @@
+#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>
@@ -7,10 +14,6 @@
#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 ) {
@@ -152,7 +155,7 @@ 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 ) );
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,5 +1,11 @@
#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>
@@ -8,13 +14,12 @@
#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,
@@ -104,7 +109,7 @@ void Dialer::slotCancel()
void Dialer::reset()
{
- qWarning("reset");
+ owarn << "reset" << oendl;
switchState(state_cancel);
}
@@ -136,18 +141,18 @@ 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"))
@@ -158,7 +163,7 @@ void Dialer::trydial(const QString& number)
{
switchState(state_options);
- qWarning("ATM3l3");
+ owarn << "ATM3l3" << oendl;
send("ATM3L3\r");
QString response3 = receive();
if(!response3.contains("\nOK\r"))
@@ -178,7 +183,7 @@ 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));
@@ -214,7 +219,7 @@ void Dialer::send(const QString& msg)
int bytes;
QString termination;
- qWarning("Sending: %s", m.latin1());
+ owarn << "Sending: " << m.latin1() << "" << oendl;
/* termination = "\r";
//termination = m_profile.readEntry("Termination");
@@ -247,11 +252,11 @@ 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") ) {
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,10 +1,12 @@
-
#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 )
{
@@ -128,11 +130,11 @@ QColor EmulationHandler::foreColor(int col) {
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;
}
@@ -152,11 +154,11 @@ QColor EmulationHandler::backColor(int col ) {
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
@@ -224,9 +224,9 @@ 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 )
{
@@ -258,7 +258,7 @@ 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 );
@@ -272,7 +272,7 @@ void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect
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 );
}
}
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,5 +1,10 @@
#include "function_keyboard.h"
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qlayout.h>
#include <qlistbox.h>
#include <qlabel.h>
@@ -37,7 +42,7 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
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();
@@ -256,7 +261,7 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par
: ProfileDialogKeyWidget(name, parent, na),
selectedRow(0), selectedCol(0)
{
- qWarning("FunctionKeyboardConfig");
+ owarn << "FunctionKeyboardConfig" << oendl;
kb = new FunctionKeyboard(this);
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,7 +1,10 @@
#include "io_bt.h"
+/* OPIE */
+#include <opie2/odebug.h>
using namespace Opie::Core;
+
IOBt::IOBt( const Profile &config ) : IOSerial( config ) {
m_attach = 0;
}
@@ -43,7 +46,7 @@ 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;
}
@@ -89,5 +92,5 @@ bool IOBt::isConnected() {
}
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,7 +1,9 @@
-
#include "io_irda.h"
+/* OPIE */
+#include <opie2/odebug.h>
using namespace Opie::Core;
+
IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) {
m_attach = 0;
}
@@ -35,7 +37,7 @@ bool IOIrda::open() {
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;
}
@@ -74,5 +76,5 @@ bool IOIrda::isConnected() {
}
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,10 +1,11 @@
#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;
@@ -12,7 +13,6 @@ IOModem::IOModem( const Profile &profile )
IOModem::~IOModem() {
-
}
@@ -104,5 +104,5 @@ bool IOModem::isConnected() {
}
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
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
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,16 +1,3 @@
-#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"
@@ -23,8 +10,24 @@
#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++ ) {
@@ -446,13 +449,13 @@ void MainWindow::slotClose() {
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 );
@@ -570,7 +573,7 @@ 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();
@@ -579,7 +582,7 @@ void MainWindow::slotSessionChanged( Session* ses ) {
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 );
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,15 +1,18 @@
+#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();
@@ -135,7 +138,7 @@ 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,7 +1,5 @@
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 \
@@ -70,7 +68,7 @@ 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
@@ -41,7 +41,7 @@ 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);
@@ -65,7 +65,7 @@ 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());
@@ -74,7 +74,7 @@ void SzTransfer::receivedStdin(const QByteArray &data) {
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,7 +1,10 @@
-
#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*) ),
@@ -12,7 +15,7 @@ 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() );
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,3 +1,10 @@
+#include "terminalwidget.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qlabel.h>
#include <qcheckbox.h>
#include <qcombobox.h>
@@ -6,8 +13,6 @@
#include <qhbuttongroup.h>
#include <qlayout.h>
-#include "terminalwidget.h"
-
namespace {
enum TermIds {
id_term_vt100 = 0,
@@ -69,7 +74,7 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent,
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 );
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
@@ -26,15 +26,15 @@ SenderUI::SenderUI()
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;
}
@@ -52,12 +52,12 @@ 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] );
}
@@ -66,13 +66,13 @@ void SenderUI::got(const QByteArray& ar) {
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
@@ -995,7 +995,7 @@ 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;
@@ -1034,11 +1034,11 @@ bool Widget::eventFilter( QObject *obj, QEvent *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
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
@@ -75,7 +75,7 @@ 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;
@@ -115,7 +115,7 @@ QChar(a,0));
//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
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
@@ -20,12 +20,16 @@
**********************************************************************/
#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>
@@ -444,7 +448,7 @@ void MainWindow::fileOpen()
void MainWindow::fileRevert()
{
- qDebug( "QMainWindow::fileRevert needs to be done" );
+ odebug << "QMainWindow::fileRevert needs to be done" << oendl;
}
void MainWindow::fileNew()
@@ -456,7 +460,7 @@ 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 )
@@ -475,7 +479,7 @@ 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();
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,6 +1,5 @@
-CONFIG += qt warn on quick-app
-
+CONFIG += qt warn on quick-app
HEADERS = qcleanuphandler.h \
qcomplextext_p.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
@@ -106,7 +106,7 @@ QBidiContext::~QBidiContext()
*/
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 ) {
@@ -124,7 +124,7 @@ static inline const QChar *nextChar( const QString &str, int 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
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
@@ -37,11 +37,17 @@
#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;
@@ -184,7 +190,7 @@ 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;
}
@@ -212,7 +218,7 @@ 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;
}
@@ -1544,10 +1550,10 @@ void QTextDocument::setRichTextInternal( const QString &text, QTextCursor* curso
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() ) {
@@ -2152,7 +2158,7 @@ QString QTextDocument::richText() const
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;
@@ -4096,7 +4102,7 @@ int QTextParagraph::lineHeightOfChar( int i, int *bl, int *y ) const
--it;
}
- qWarning( "QTextParagraph::lineHeightOfChar: couldn't find lh for %d", i );
+ owarn << "QTextParagraph::lineHeightOfChar: couldn't find lh for " << i << "" << oendl;
return 15;
}
@@ -4122,7 +4128,7 @@ QTextStringChar *QTextParagraph::lineStartOfChar( int i, int *index, int *line )
--l;
}
- qWarning( "QTextParagraph::lineStartOfChar: couldn't find %d", i );
+ owarn << "QTextParagraph::lineStartOfChar: couldn't find " << i << "" << oendl;
return 0;
}
@@ -4149,7 +4155,7 @@ QTextStringChar *QTextParagraph::lineStartOfLine( int line, int *index ) const
return &str->at( i );
}
- qWarning( "QTextParagraph::lineStartOfLine: couldn't find %d", line );
+ owarn << "QTextParagraph::lineStartOfLine: couldn't find " << line << "" << oendl;
return 0;
}
@@ -5697,7 +5703,7 @@ QTextFormat *QTextFormatCollection::format( const QFont &f, const QColor &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;
}
@@ -6083,11 +6089,11 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co
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;
}
}
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
@@ -35,6 +35,9 @@
**
**********************************************************************/
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
#include "qrichtext_p.h"
using namespace Qt3;
@@ -137,7 +140,7 @@ 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;
}
@@ -477,7 +480,7 @@ 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;
}
@@ -493,7 +496,7 @@ 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;
}
@@ -509,7 +512,7 @@ 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;
}
@@ -525,8 +528,8 @@ 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;
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,12 +1,17 @@
-#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;
@@ -267,7 +272,7 @@ 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 );
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
@@ -43,7 +43,7 @@ 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
@@ -17,15 +17,23 @@
** 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;
@@ -312,7 +320,7 @@ void TVVariant::load(QDataStream &s )
}
break;
default:
- qFatal("Unrecognized data type");
+ ofatal << "Unrecognized data type" << oendl;
}
}
@@ -1078,7 +1086,7 @@ QDataStream &operator>>( QDataStream &s, DataElem &d)
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 */
}
@@ -1377,7 +1385,7 @@ bool DataElem::contains(int i, TVVariant v) const
case TVVariant::Date:
break;
default:
- qWarning("Tried to compare unknown data type");
+ owarn << "Tried to compare unknown data type" << oendl;
}
return FALSE;
}
@@ -1403,7 +1411,7 @@ bool DataElem::startsWith(int i, TVVariant v) const
case TVVariant::Date:
return FALSE;
default:
- qWarning("Tried to compare unknown data type");
+ owarn << "Tried to compare unknown data type" << oendl;
}
return FALSE;
}
@@ -1429,7 +1437,7 @@ bool DataElem::endsWith(int i, TVVariant v) const
case TVVariant::Date:
return FALSE;
default:
- qWarning("Tried to compare unknown data type");
+ owarn << "Tried to compare unknown data type" << oendl;
}
return FALSE;
}
@@ -1461,7 +1469,7 @@ 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
@@ -26,9 +26,17 @@
#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
/*!
@@ -150,7 +158,7 @@ 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;
}
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
@@ -18,12 +18,18 @@
**
**********************************************************************/
#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)
{
@@ -140,7 +146,7 @@ DBXmlHandler::~DBXmlHandler()
QString DBXmlHandler::errorProtocol()
{
- qWarning("Error reading file");
+ owarn << "Error reading file" << oendl;
return errorProt;
}
@@ -172,7 +178,7 @@ bool DBXmlHandler::startElement(const QString&, const QString&,
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())
@@ -190,13 +196,13 @@ bool DBXmlHandler::startElement(const QString&, const QString&,
/* 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;
}
@@ -225,7 +231,7 @@ bool DBXmlHandler::endElement(const QString&, const QString&,
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;
}
@@ -254,7 +260,7 @@ bool DBXmlHandler::characters(const QString& ch)
return TRUE;
}
- qWarning("Junk characters found... ignored");
+ owarn << "Junk characters found... ignored" << oendl;
return TRUE;
}
@@ -270,7 +276,7 @@ bool DBXmlHandler::warning(const QXmlParseException& exception)
.arg(exception.lineNumber())
.arg(exception.columnNumber());
- qWarning(errorProt);
+ owarn << errorProt << oendl;
return QXmlDefaultHandler::fatalError(exception);
}
@@ -281,7 +287,7 @@ bool DBXmlHandler::error(const QXmlParseException& exception)
.arg(exception.lineNumber())
.arg(exception.columnNumber());
- qWarning(errorProt);
+ owarn << errorProt << oendl;
return QXmlDefaultHandler::fatalError(exception);
}
@@ -292,6 +298,6 @@ bool DBXmlHandler::fatalError(const QXmlParseException& exception)
.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
@@ -18,7 +18,6 @@
**
**********************************************************************/
-/* local includes */
#include "tableviewer.h"
#include "ui/tvbrowseview.h"
#include "ui/tvfilterview.h"
@@ -27,18 +26,21 @@
#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
@@ -201,7 +203,7 @@ void TableViewerWindow::saveDocument()
QIODevice *dev = fm.saveFile(doc);
if(!ds->saveSource(dev, doc.type())){
- qWarning("Save unsuccessful");
+ owarn << "Save unsuccessful" << oendl;
return;
}
dev->close();
@@ -288,7 +290,7 @@ void TableViewerWindow::openDocument(const DocLnk &f)
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
@@ -1,4 +1,4 @@
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
SUBDIRS = db ui
HEADERS = tableviewer.h \
xmlencodeattr.h \
@@ -31,8 +31,8 @@ SOURCES = main.cpp \
db/common.cpp
INTERFACES = ui/tvkeyedit_gen.ui
TARGET = tableviewer
-INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lqpe -lopiecore2
include ( $(OPIEDIR)/include.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
@@ -17,8 +17,15 @@
** 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>
@@ -163,7 +170,7 @@ 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
@@ -1,78 +1,75 @@
TEMPLATE = lib
-CONFIG = qt warn_on
-HEADERS = microkde/kapplication.h \
- kateconfig.h \
- microkde/kdebug.h \
- microkde/kdialog.h \
- microkde/kdialogbase.h \
- microkde/kfiledialog.h \
- microkde/kglobal.h \
- microkde/kiconloader.h \
- microkde/klineedit.h \
- microkde/klocale.h \
- microkde/kmessagebox.h \
- microkde/kprinter.h \
- microkde/krestrictedline.h \
- microkde/kseparator.h \
- microkde/kstandarddirs.h \
- microkde/ktempfile.h \
- microkde/kunload.h \
- microkde/kurlrequester.h \
- microkde/kfontdialog.h \
- microkde/krun.h \
- microkde/knumvalidator.h \
- microkde/kstaticdeleter.h \
- microkde/klistview.h \
- microkde/kglobalsettings.h \
- microkde/kcolorbtn.h \
- \
+CONFIG = qt warn_on
+HEADERS = microkde/kapplication.h \
+ kateconfig.h \
+ microkde/kdebug.h \
+ microkde/kdialog.h \
+ microkde/kdialogbase.h \
+ microkde/kfiledialog.h \
+ microkde/kglobal.h \
+ microkde/kiconloader.h \
+ microkde/klineedit.h \
+ microkde/klocale.h \
+ microkde/kmessagebox.h \
+ microkde/kprinter.h \
+ microkde/krestrictedline.h \
+ microkde/kseparator.h \
+ microkde/kstandarddirs.h \
+ microkde/ktempfile.h \
+ microkde/kunload.h \
+ microkde/kurlrequester.h \
+ microkde/kfontdialog.h \
+ microkde/krun.h \
+ microkde/knumvalidator.h \
+ microkde/kstaticdeleter.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 \
- document/katecmd.h \
- document/katehighlight.h \
- document/katecmds.h document/katedocument.h \
- document/katesyntaxdocument.h \
- view/kateundohistory.h \
- view/kateview.h \
- view/kateviewdialog.h \
- interfaces/view.h \
- interfaces/document.h \
- ktexteditor/ktexteditor.h
+ qt3back/qregexp3.h \
+ microkde/ksharedptr.h \
+ document/katebuffer.h document/katedialogs.h \
+ document/katetextline.h \
+ document/katecmd.h \
+ document/katehighlight.h \
+ document/katecmds.h document/katedocument.h \
+ document/katesyntaxdocument.h \
+ view/kateundohistory.h \
+ view/kateview.h \
+ view/kateviewdialog.h \
+ interfaces/view.h \
+ interfaces/document.h \
+ ktexteditor/ktexteditor.h
-SOURCES = microkde/kapplication.cpp \
- microkde/kdialogbase.cpp \
- kateconfig.cpp \
- microkde/klocale.cpp \
- microkde/kmessagebox.cpp \
- microkde/kprocess.cpp \
- microkde/kstandarddirs.cpp \
- microkde/ktempfile.cpp \
- microkde/kurlrequester.cpp \
- microkde/kfontdialog.cpp \
- microkde/krun.cpp \
- microkde/knumvalidator.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 \
- document/katecmd.cpp \
- document/katesyntaxdocument.cpp document/katecmds.cpp \
- document/katedocument.cpp document/katetextline.cpp \
- view/kateundohistory.cpp \
- view/kateview.cpp \
- view/kateviewdialog.cpp \
- interfaces/interfaces.cpp
-
-INTERFACES =
-INCLUDEPATH += $(OPIEDIR)/include \
+SOURCES = microkde/kapplication.cpp \
+ microkde/kdialogbase.cpp \
+ kateconfig.cpp \
+ microkde/klocale.cpp \
+ microkde/kmessagebox.cpp \
+ microkde/kprocess.cpp \
+ microkde/kstandarddirs.cpp \
+ microkde/ktempfile.cpp \
+ microkde/kurlrequester.cpp \
+ microkde/kfontdialog.cpp \
+ microkde/krun.cpp \
+ microkde/knumvalidator.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 \
+ document/katecmd.cpp \
+ document/katesyntaxdocument.cpp document/katecmds.cpp \
+ document/katedocument.cpp document/katetextline.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 \
$(OPIEDIR)/noncore/apps/tinykate/libkate/document \
@@ -80,9 +77,9 @@ INCLUDEPATH += $(OPIEDIR)/include \
$(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \
$(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \
$(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lqtaux2 -lopiecore2 -lopieui2
-TARGET = tinykate
+DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lqpe -lqtaux2 -lopiecore2 -lopieui2
+TARGET = tinykate
INCLUDEPATH += $(OPIEDIR)/include
DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
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
@@ -1,21 +1,19 @@
-TEMPLATE = app
-CONFIG = qt warn_on quick-app
+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
+ $(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,13 +1,10 @@
-/****************************************************************************
-** 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>
@@ -216,41 +213,41 @@ 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
@@ -29,7 +29,8 @@
#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"
@@ -38,8 +39,6 @@ using namespace Opie::Ui;
#include <qclipboard.h>
-#include <stdio.h>
-
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -2069,7 +2068,6 @@ 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
@@ -2089,7 +2087,6 @@ int ZSafe::loadInit(const char* _filename, const char *password)
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);
@@ -2259,7 +2256,7 @@ 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;
}
@@ -2303,7 +2300,7 @@ 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;
}
@@ -2312,7 +2309,7 @@ bool ZSafe::saveDocument(const char* _filename,
}
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
@@ -3190,7 +3187,7 @@ void ZSafe::editCategory()
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
@@ -1,5 +1,5 @@
-TEMPLATE = app
-CONFIG = qt warn_on
+TEMPLATE = app
+CONFIG = qt warn_on
DESTDIR = $(OPIEDIR)/bin
HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \
scqtfiledlg.h
@@ -7,11 +7,11 @@ SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \
categorylist.cpp zlistview.cpp shadedlistitem.cpp\
scqtfileedit.cpp scqtfileedit.moc.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
-TARGET = zsafe
+INTERFACES = newdialog.ui searchdialog.ui passworddialog.ui categorydialog.ui infoform.ui wait.ui
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include
+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
@@ -1,4 +1,4 @@
-CONFIG += qt warn_on quick-app
+CONFIG += qt warn_on quick-app
HEADERS = d3des.h \
krfbbuffer.h \
krfbcanvas.h \
@@ -23,12 +23,11 @@ SOURCES = d3des.c \
kvncconndlg.cpp \
kvncbookmarkdlg.cpp \
main.cpp
-INTERFACES = kvncconndlgbase.ui \
- kvncbookmarkdlgbase.ui
+INTERFACES = kvncconndlgbase.ui kvncbookmarkdlgbase.ui
-INCLUDEPATH += $(OPIEDIR)/include
+INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
TARGET = keypebble
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,16 +1,24 @@
-#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
@@ -39,7 +47,7 @@ KRFBBuffer::~KRFBBuffer()
void KRFBBuffer::resize( int w, int h )
{
- qWarning( "Resizing buffer" );
+ owarn << "Resizing buffer" << oendl;
pix->resize( w, h );
@@ -61,7 +69,7 @@ void KRFBBuffer::mouseEvent( QMouseEvent *e )
void KRFBBuffer::keyPressEvent( QKeyEvent *e )
{
- qWarning( "Buffer got a key" );
+ owarn << "Buffer got a key" << oendl;
decoder->sendKeyPressEvent( e );
}
@@ -74,7 +82,7 @@ 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
@@ -2,8 +2,12 @@
#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 )
@@ -42,7 +46,7 @@ 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;
}
@@ -74,7 +78,7 @@ 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,13 +1,20 @@
-#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" )
{
@@ -43,7 +50,7 @@ void KRFBConnection::connectTo( KRFBServer server)
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 );
@@ -51,7 +58,7 @@ void KRFBConnection::connectTo( KRFBServer server)
void KRFBConnection::disconnect()
{
- qWarning( "Disconnecting from server" );
+ owarn << "Disconnecting from server" << oendl;
if ( ( currentState_ != Disconnected )
&& ( currentState_ != Disconnecting )
@@ -82,7 +89,7 @@ void KRFBConnection::gotSocketConnection()
{
currentState_ = LoggingIn;
- qWarning( "Connected, logging in..." );
+ owarn << "Connected, logging in..." << oendl;
static QString statusMsg = tr( "Connected" );
emit statusChanged( statusMsg );
@@ -93,7 +100,7 @@ void KRFBConnection::gotSocketConnection()
void KRFBConnection::gotRFBConnection()
{
- qWarning( "Logged into server" );
+ owarn << "Logged into server" << oendl;
currentState_ = Connected;
emit connected();
@@ -122,7 +129,7 @@ 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" );
@@ -172,11 +179,11 @@ void KRFBConnection::waitForData( unsigned int sz )
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
@@ -3,15 +3,20 @@
#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
@@ -135,7 +140,7 @@ 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 );
@@ -147,7 +152,7 @@ void KRFBDecoder::sendClientInit()
void KRFBDecoder::gotServerInit()
{
- qWarning( "Got server init" );
+ owarn << "Got server init" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) );
if ( info )
@@ -181,7 +186,7 @@ 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",
@@ -192,7 +197,7 @@ 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 );
@@ -207,7 +212,7 @@ void KRFBDecoder::gotDesktopName()
assert( info );
assert( currentState == AwaitingDesktopName );
- qWarning( "Got desktop name" );
+ owarn << "Got desktop name" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
this, SLOT( gotDesktopName() ) );
@@ -219,7 +224,7 @@ void KRFBDecoder::gotDesktopName()
buf[ info->nameLength ] = '\0';
info->name = buf;
- qWarning( "Desktop: %s", info->name.latin1() );
+ owarn << "Desktop: " << info->name.latin1() << "" << oendl;
delete buf;
@@ -371,7 +376,7 @@ void KRFBDecoder::gotUpdateHeader()
{
assert( currentState == AwaitingUpdate );
- // qWarning( "Got update header" );
+ // owarn << "Got update header" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
this, SLOT( gotUpdateHeader() ) );
@@ -406,7 +411,7 @@ 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;
@@ -418,7 +423,7 @@ void KRFBDecoder::gotRectHeader()
{
assert( currentState == AwaitingRectHeader );
- // qWarning( "Got rect header" );
+ // owarn << "Got rect header" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
this, SLOT( gotRectHeader() ) );
@@ -446,23 +451,23 @@ void KRFBDecoder::gotRectHeader()
// 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 {
@@ -470,7 +475,7 @@ void KRFBDecoder::gotRectHeader()
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;
}
@@ -486,7 +491,7 @@ void KRFBDecoder::handleRawRect()
// 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;
@@ -509,7 +514,7 @@ void KRFBDecoder::getRawRectChunk( int 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() ) );
@@ -523,7 +528,7 @@ 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.
@@ -546,7 +551,7 @@ void KRFBDecoder::gotRawRectChunk()
else {
noRects--;
- // qWarning( "There are %d rects left", noRects );
+ // owarn << "There are " << noRects << " rects left" << oendl;
if ( noRects ) {
currentState = AwaitingRectHeader;
@@ -590,7 +595,7 @@ void KRFBDecoder::gotCopyRectPos()
noRects--;
- // qWarning( "There are %d rects left", noRects );
+ // owarn << "There are " << noRects << " rects left" << oendl;
if ( noRects ) {
currentState = AwaitingRectHeader;
@@ -603,17 +608,17 @@ 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 )
@@ -673,7 +678,7 @@ 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() ) );
@@ -721,7 +726,7 @@ void KRFBDecoder::gotServerCutText()
/* 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 );
@@ -738,14 +743,14 @@ void KRFBDecoder::gotServerCutText()
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)
@@ -758,7 +763,7 @@ void KRFBDecoder::gotBell()
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,14 +1,19 @@
-#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;
@@ -52,7 +57,7 @@ KRFBLogin::KRFBLogin( KRFBConnection *con )
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 );
@@ -74,7 +79,7 @@ KRFBLogin::State KRFBLogin::state() const
void KRFBLogin::gotServerVersion()
{
- qWarning( "Got server version" );
+ owarn << "Got server version" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
this, SLOT( gotServerVersion() ) );
@@ -92,7 +97,7 @@ 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;
@@ -106,20 +111,20 @@ void KRFBLogin::gotServerVersion()
+ (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
@@ -143,7 +148,7 @@ void KRFBLogin::gotAuthScheme()
switch ( scheme ) {
case 0:
- qWarning( "Failed" );
+ owarn << "Failed" << oendl;
// Handle failure
connect( con, SIGNAL( gotEnoughData() ), SLOT( gotFailureReasonSize() ) );
con->waitForData( FailureReasonSizeLength );
@@ -159,7 +164,7 @@ void KRFBLogin::gotAuthScheme()
con->waitForData( ChallengeLength );
break;
default:
- qWarning( "Unknown authentication scheme, 0x%08lx", scheme );
+ owarn << "Unknown authentication scheme, 0x" << scheme << "" << oendl;
currentState = Error;
break;
};
@@ -181,7 +186,7 @@ void KRFBLogin::getPassword()
// 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 );
}
@@ -216,7 +221,7 @@ void KRFBLogin::gotAuthResult()
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"
@@ -232,7 +237,7 @@ void KRFBLogin::gotAuthResult()
con->gotRFBConnection();
break;
case AuthFailed:
- qWarning( "Dammit" );
+ owarn << "Dammit" << oendl;
emit status( statusMsgFailed );
emit error( failed );
break;
@@ -241,13 +246,13 @@ void KRFBLogin::gotAuthResult()
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,8 +1,14 @@
+#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 )
@@ -175,7 +181,7 @@ void KVNCBookmarkDlg::writeBookmarks(void)
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';
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,19 +1,23 @@
#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>
@@ -33,7 +37,7 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
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");
@@ -78,7 +82,7 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
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");
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
@@ -457,7 +457,7 @@ 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;
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,10 +1,9 @@
-#CONFIG = qt warn_on
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = game.h kbounce.h
SOURCES = game.cpp kbounce.cpp main.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2
+LIBS += -lqpe -lopiecore2
TARGET = bounce
include ( $(OPIEDIR)/include.pro )
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
@@ -17,11 +17,18 @@
*/
-#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
@@ -367,7 +374,7 @@ 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 );
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
@@ -1,19 +1,18 @@
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = amigo.h \
go.h \
goplayutils.h \
gowidget.h
SOURCES = amigo.c \
- goplayer.c \
- goplayutils.c \
- killable.c \
- gowidget.cpp \
- main.cpp
-INCLUDEPATH += $(OPIEDIR)/include
+ goplayer.c \
+ goplayutils.c \
+ killable.c \
+ gowidget.cpp \
+ main.cpp
+INCLUDEPATH += $(OPIEDIR)/include
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
@@ -20,9 +20,13 @@
#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>
@@ -30,9 +34,6 @@
#include <qapplication.h> //processEvents()
#include <qlabel.h>
-//#include <stdio.h>
-
-
static const enum bVal computer_color = BLACK;
static int current_handicap = 1;
@@ -448,7 +449,7 @@ 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,7 +1,5 @@
TEMPLATE = app
-#CONFIG = qt warn_on
CONFIG = qt warn_on
-#TMAKE_CXXFLAGS +=
HEADERS = kpacmanwidget.h \
referee.h \
status.h \
@@ -34,7 +32,7 @@ SOURCES = kpacmanwidget.cpp \
main.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
DESTDIR = $(OPIEDIR)/bin
TARGET = kpacman
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
@@ -13,7 +13,8 @@
#include "kpacmanwidget.h"
#endif
-
+#include <opie2/odebug.h>
+using namespace Opie::Core;
KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name)
: QWidget( parent, name )
@@ -139,7 +140,7 @@ 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);
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
@@ -13,6 +13,9 @@
#include "status.h"
#endif
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
#include <qbitmap.h>
#include <qmsgbox.h>
#include <qfileinfo.h>
@@ -20,7 +23,7 @@
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;
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
@@ -90,7 +90,7 @@ 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;
}
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,10 +1,16 @@
#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 )
@@ -41,7 +47,7 @@ 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
@@ -109,7 +115,7 @@ void OYatzee::slotEndRound( int item )
sb->nextRB(currentPlayer-1)->updateMap( item , points );
nextPlayer();
- qDebug( "Punkte: %d" , points );
+ odebug << "Punkte: " << points << "" << oendl;
}
void OYatzee::nextPlayer()
@@ -156,7 +162,7 @@ OYatzee::~OYatzee()
void OYatzee::detectPosibilities()
{
posibilities.clear();
- qDebug( "running detectPosibilities()" );
+ odebug << "running detectPosibilities()" << oendl;
Dice *d = dw->diceList.first();
@@ -261,47 +267,47 @@ 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 }
@@ -335,7 +341,7 @@ 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 )
{
@@ -353,9 +359,9 @@ void OYatzee::slotRollDices()
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();
}
@@ -391,7 +397,7 @@ Resultboard* Scoreboard::nextRB( int currentPlayer )
b = rbList.at( currentPlayer );
- qDebug( "Anzahl: %d" , rbList.count() );
+ odebug << "Anzahl: " << rbList.count() << "" << oendl;
return b;
}
@@ -608,7 +614,7 @@ void Resultboard::paintEvent( QPaintEvent* )
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() ) );
}
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
@@ -6,6 +6,6 @@ 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
@@ -675,7 +675,7 @@ 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 ) {
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
@@ -3,15 +3,19 @@
* 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:
@@ -41,7 +45,7 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) {
}
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
@@ -6,19 +6,21 @@
#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()) );
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,8 +1,12 @@
#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>
@@ -23,7 +27,7 @@ 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 ) {
@@ -78,10 +82,10 @@ 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();
@@ -105,7 +109,7 @@ void SlaveMaster::recieve( const QCString& str, const QByteArray& at) {
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 ) {
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
@@ -31,6 +31,6 @@ 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,10 +1,14 @@
#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>
@@ -119,7 +123,7 @@ 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; }
};
@@ -262,7 +266,7 @@ int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode)
if (a >= 6){
- qWarning( "too many padding bytes" );
+ owarn << "too many padding bytes" << oendl;
return false;
}
@@ -327,7 +331,7 @@ 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
@@ -726,7 +730,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
// 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;
}
@@ -913,7 +917,7 @@ bool ExifData::scan(const QString & path)
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
@@ -31,26 +31,26 @@ 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,4 +1,4 @@
-CONFIG += qte
+CONFIG = qt
TEMPLATE = app
TARGET = opie-eye_slave
DESTDIR = $(OPIEDIR)/bin
@@ -13,6 +13,6 @@ 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
+include ( $(OPIEDIR)/include.pro )
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
@@ -5,9 +5,13 @@
#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;
@@ -37,7 +41,7 @@ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) {
*/
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) {
@@ -82,7 +86,7 @@ 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;
@@ -94,7 +98,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar)
}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);
}
@@ -105,7 +109,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar)
}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);
@@ -117,7 +121,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar)
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()" ) {
@@ -181,7 +185,7 @@ void SlaveReciever::slotThumbNail() {
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;
@@ -200,7 +204,7 @@ 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
@@ -209,14 +213,14 @@ void SlaveReciever::slotSend() {
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;
}
}
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,5 +1,10 @@
#include "thumbnailtool.h"
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qfileinfo.h>
#include <qdir.h>
#include <qimage.h>
@@ -26,13 +31,13 @@ static bool makeThumbDir( const QFileInfo& inf, bool make = false) {
*/
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" );
}
@@ -41,7 +46,7 @@ void ThumbNailTool::putThumb( const QString& path, const QPixmap& pix, int width
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
@@ -133,7 +133,7 @@ void AudioWidget::sliderReleased() {
}
void AudioWidget::setPosition( long i ) {
- // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i);
+ // odebug << "<<<<<<<<<<<<<<<<<<<<<<<<set position " << i << "" << oendl;
updateSlider( i, mediaPlayerState.length() );
}
@@ -187,7 +187,7 @@ void AudioWidget::loadSkin()
void AudioWidget::setSeekable( bool isSeekable ) {
if ( !isSeekable ) {
- qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
+ odebug << "<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>" << oendl;
if( !slider.isHidden()) {
slider.hide();
}
@@ -199,7 +199,7 @@ void AudioWidget::setSeekable( bool isSeekable ) {
// 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() ) );
@@ -271,7 +271,7 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
break;
case Key_F9: //activity
hide();
- // qDebug("Audio F9");
+ // odebug << "Audio F9" << oendl;
e->accept();
break;
case Key_F10: //contacts
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
@@ -106,10 +106,10 @@ 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()
@@ -215,7 +215,7 @@ 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 );
}
@@ -327,9 +327,9 @@ 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 )
@@ -422,7 +422,7 @@ 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;
}
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
@@ -152,7 +152,7 @@ void MediaPlayer::next() {
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);
@@ -285,7 +285,7 @@ void MediaPlayer::blank( bool b ) {
#endif
if (fd != -1) {
if ( b ) {
- qDebug("do blanking");
+ odebug << "do blanking" << oendl;
#ifdef QT_QWS_SL5XXX
ioctl( fd, FBIOBLANK, 1 );
if(fl !=-1) {
@@ -297,7 +297,7 @@ void MediaPlayer::blank( bool b ) {
#endif
isBlanked = TRUE;
} else {
- qDebug("do unblanking");
+ odebug << "do unblanking" << oendl;
ioctl( fd, FBIOBLANK, 0);
#ifdef QT_QWS_SL5XXX
if(fl != -1) {
@@ -309,7 +309,7 @@ void MediaPlayer::blank( bool b ) {
}
close( fd );
} else {
- qDebug("<< /dev/fb0 could not be opened >>");
+ odebug << "<< /dev/fb0 could not be opened >>" << oendl;
}
}
@@ -325,11 +325,11 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
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
@@ -37,7 +37,7 @@
Om3u::Om3u( const QString &filePath, int mode)
: QStringList (){
-qDebug("<<<<<<<new m3u "+filePath);
+odebug << "<<<<<<<new m3u "+filePath << oendl;
f.setName(filePath);
f.open(mode);
}
@@ -45,13 +45,13 @@ qDebug("<<<<<<<new m3u "+filePath);
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 );
@@ -60,7 +60,7 @@ void Om3u::readM3u() {
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;
@@ -80,7 +80,7 @@ void Om3u::readPls() { //it's a pls 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
@@ -114,7 +114,7 @@ void Om3u::write() { //writes list to m3u file
t.setEncoding(QTextStream::UnicodeUTF8);
if(count()>0) {
for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
-// qDebug(*it);
+// odebug << *it << oendl;
t << *it << "\n";
}
}
@@ -130,7 +130,7 @@ void Om3u::remove(const QString &filePath) { //removes from m3u list
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
@@ -44,7 +44,7 @@ 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" ) );
@@ -65,7 +65,7 @@ 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() )
@@ -184,7 +184,7 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
QListViewItem *item = selectedItem();
if ( item )
cfg.writeEntry("current", item->text(0) );
- qDebug(item->text(0));
+ odebug << item->text(0) << oendl;
}
@@ -193,9 +193,9 @@ 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
@@ -182,11 +182,11 @@ void PlayListWidget::writeDefaultPlaylist() {
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() );
@@ -325,7 +325,7 @@ void PlayListWidget::addAllVideoToList() {
void PlayListWidget::setDocument( const QString& fileref ) {
- // qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref );
+ // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl;
fromSetDocument = TRUE;
QFileInfo fileInfo(fileref);
@@ -401,7 +401,7 @@ bool PlayListWidget::prev() {
bool PlayListWidget::next() {
-//qDebug("<<<<<<<<<<<<next()");
+//odebug << "<<<<<<<<<<<<next()" << oendl;
if ( mediaPlayerState->isShuffled() ) {
return prev();
} else {
@@ -612,7 +612,7 @@ void PlayListWidget::openURL() {
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" );
@@ -688,7 +688,7 @@ void PlayListWidget::openFile() {
if( !str.isEmpty() ) {
- qDebug( "Selected filename is " + str );
+ odebug << "Selected filename is " + str << oendl;
filename = str;
DocLnk lnk;
@@ -706,7 +706,7 @@ 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;
@@ -719,7 +719,7 @@ 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");
@@ -753,7 +753,7 @@ 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");
@@ -763,11 +763,11 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
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();
}
@@ -812,7 +812,7 @@ 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 );
@@ -830,7 +830,7 @@ void PlayListWidget::writem3u() {
m3uList->add( d->selectedFiles->current()->file());
}
while ( d->selectedFiles->next() );
- // qDebug( list );
+ // odebug << list << oendl;
m3uList->write();
m3uList->close();
delete m3uList;
@@ -842,7 +842,7 @@ void PlayListWidget::writem3u() {
lnk.setIcon("opieplayer2/playlist2");
lnk.setName( name); //sets file name
- // qDebug(filename);
+ // odebug << filename << oendl;
Config config( "OpiePlayer" );
config.setGroup( "PlayList" );
@@ -850,7 +850,7 @@ void PlayListWidget::writem3u() {
currentPlayList=filename;
if(!lnk.writeLink()) {
- qDebug("Writing doclink did not work");
+ odebug << "Writing doclink did not work" << oendl;
}
setCaption(tr("OpiePlayer: ") + name);
@@ -884,7 +884,7 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
removeSelected();
break;
// case Key_P: //play
- // qDebug("Play");
+ // odebug << "Play" << oendl;
// playSelected();
// break;
case Key_Space:
@@ -914,7 +914,7 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
}
void PlayListWidget::pmViewActivated(int index) {
-// qDebug("%d", index);
+// odebug << "" << index << "" << oendl;
switch(index) {
case -16:
{
@@ -944,7 +944,7 @@ void PlayListWidget::populateSkinsMenu() {
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() ) ;
}
@@ -1000,7 +1000,7 @@ 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);
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
@@ -183,7 +183,7 @@ 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
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
@@ -178,11 +178,11 @@ SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &file
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
@@ -218,23 +218,23 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
{
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++;
@@ -243,7 +243,7 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
break;
case LoadButtonMask:
- qDebug( "load whole mask" );
+ odebug << "load whole mask" << oendl;
m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount );
return LoadingCompleted;
}
@@ -258,7 +258,7 @@ SkinLoader::SkinLoader()
SkinLoader::~SkinLoader()
{
- qDebug( "SkinLoader::~SkinLoader()" );
+ odebug << "SkinLoader::~SkinLoader()" << oendl;
killTimers();
delete m_currentLoader;
}
@@ -277,7 +277,7 @@ 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 )
@@ -290,7 +290,7 @@ 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();
@@ -302,7 +302,7 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
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 ) {
@@ -310,7 +310,7 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
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
@@ -187,7 +187,7 @@ 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;
}
@@ -196,7 +196,7 @@ void Thread::start()
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;
}
@@ -284,7 +284,7 @@ void ChannelMessage::reply()
{
if ( !m_isCall )
{
- qDebug( "ChannelMessage::reply() - can't reply oneway message!" );
+ odebug << "ChannelMessage::reply() - can't reply oneway message!" << oendl;
return;
}
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
@@ -93,7 +93,7 @@ void XineControl::play( const QString& fileName ) {
hasAudioChannel = FALSE;
m_fileName = fileName;
- qDebug("<<FILENAME: " + fileName + ">>>>");
+ odebug << "<<FILENAME: " + fileName + ">>>>" << oendl;
if ( !libXine->play( fileName, 0, 0 ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
@@ -106,12 +106,12 @@ 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;
}
@@ -243,7 +243,7 @@ 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" );
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
@@ -2,20 +2,20 @@
#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 <sys/wait.h>
#include <unistd.h>
#include <errno.h>
@@ -32,10 +32,10 @@ Device::Device( QObject * parent, const char * dsp, const char * mixr, bool reco
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;
@@ -96,7 +96,7 @@ void Device::changedOutVolume(int vol) {
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);
}
@@ -111,7 +111,7 @@ void Device::changedInVolume(int vol ) {
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);
}
@@ -149,22 +149,22 @@ exit(1);
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){
@@ -180,7 +180,7 @@ 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:
@@ -206,13 +206,13 @@ 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;
}
@@ -230,12 +230,12 @@ 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;
@@ -245,7 +245,7 @@ bool Device::setDeviceFormat( int form) {
}
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;
@@ -255,7 +255,7 @@ bool Device::setDeviceChannels( int ch) {
}
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;
@@ -318,9 +318,9 @@ 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
@@ -9,14 +9,19 @@
*****************************************************************************/
#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 )
@@ -25,7 +30,7 @@ HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* par
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_);
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,6 +1,4 @@
-#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 \
@@ -29,7 +27,7 @@ contains(CONFIG, pdaudio) {
# DESTDIR=$(QPEDIR)/bin
}
-contains(CONFIG, opie) {
+!contains(CONFIG, pdaudio) {
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
DESTDIR=$(OPIEDIR)/bin
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
@@ -8,24 +8,22 @@
#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>
@@ -38,6 +36,7 @@ extern "C" {
#include <qtabwidget.h>
#include <qtimer.h>
+/* STD */
#include <errno.h>
#include <fcntl.h>
#include <math.h>
@@ -53,7 +52,7 @@ extern "C" {
#include <unistd.h>
#include <sys/wait.h>
#include <sys/signal.h>
-
+#include <pthread.h>
#ifdef PDAUDIO //ALSA
#include <alsa/asoundlib.h>
@@ -136,17 +135,17 @@ void quickRec()
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 ];
@@ -157,7 +156,7 @@ void quickRec()
for(;;) {
if ( stopped) {
-// qDebug("quickRec:: stopped");
+// odebug << "quickRec:: stopped" << oendl;
break;
}
@@ -166,7 +165,7 @@ void quickRec()
if(number <= 0) {
perror("recording error ");
- qDebug( "%s %d", filePara.fileName, number);
+ odebug << "" << filePara.fileName << " " << number << "" << oendl;
stopped = true;
return;
}
@@ -192,14 +191,14 @@ 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;
@@ -210,7 +209,7 @@ void quickRec()
if( number <= 0) {
perror( "recording error ");
- qDebug( filePara.fileName);
+ odebug << filePara.fileName << oendl;
stopped = true;
return;
}
@@ -250,7 +249,7 @@ void quickRec()
for(;;) {
if ( stopped) {
- qDebug("quickRec:: stopped");
+ odebug << "quickRec:: stopped" << oendl;
break; // stop if playing was set to false
}
@@ -373,7 +372,7 @@ 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;
@@ -718,7 +717,7 @@ void QtRec::initIconView() {
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++) {
@@ -860,7 +859,7 @@ void QtRec::initConfig() {
}
void QtRec::stop() {
- qWarning("STOP");
+ owarn << "STOP" << oendl;
setRecordButton(false);
if( !recording)
@@ -922,20 +921,20 @@ bool QtRec::rec() { //record
// 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;
}
@@ -947,7 +946,7 @@ bool QtRec::rec() { //record
paused = false;
}
// else {
- qDebug("Setting timeslider %d", filePara.samplesToRecord);
+ odebug << "Setting timeslider " << filePara.samplesToRecord << "" << oendl;
// if(fileSize != 0)
timeSlider->setRange(0, filePara.samplesToRecord);
// }
@@ -966,7 +965,7 @@ bool QtRec::rec() { //record
setCaption( msg);
#endif
filePara.fileName=currentFile.latin1();
- qDebug("Start recording thread");
+ odebug << "Start recording thread" << oendl;
stopped = false;
#ifdef THREADED
@@ -1010,13 +1009,13 @@ 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);
}
@@ -1090,11 +1089,11 @@ bool QtRec::setupAudio( bool b) {
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
@@ -1110,15 +1109,15 @@ bool QtRec::setupAudio( bool b) {
}
// 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);
@@ -1149,7 +1148,7 @@ 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,
@@ -1182,7 +1181,7 @@ bool QtRec::doPlay() {
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);
@@ -1234,7 +1233,7 @@ void QtRec::changesamplerateCombo(int i) {
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();
}
@@ -1254,7 +1253,7 @@ void QtRec::changeDirCombo(int index) {
const QString path = (*it)->path();
recDir = path;
cfg.writeEntry("directory", recDir);
- qDebug("new rec dir "+recDir);
+ odebug << "new rec dir "+recDir << oendl;
}
}
cfg.write();
@@ -1374,7 +1373,7 @@ void QtRec::keyPressEvent( QKeyEvent *e) {
// newSound();
break;
case Key_Left: {
- qDebug("rewinding");
+ odebug << "rewinding" << oendl;
if( !e->isAutoRepeat())
rewindPressed();
}
@@ -1428,19 +1427,19 @@ void QtRec::keyReleaseEvent( QKeyEvent *e) {
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;
}
@@ -1475,11 +1474,11 @@ void QtRec::endRecording() {
// 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");
@@ -1495,10 +1494,10 @@ 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("");
}
@@ -1516,7 +1515,7 @@ void QtRec::endPlaying() {
stopped = true;
waveform->reset();
// errorStop();
-// qDebug("end playing");
+// odebug << "end playing" << oendl;
setRecordButton( false);
toBeginningButton->setEnabled( true);
@@ -1528,7 +1527,7 @@ 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;
@@ -1537,9 +1536,9 @@ void QtRec::endPlaying() {
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;
@@ -1561,7 +1560,7 @@ bool QtRec::openPlayFile() {
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,
@@ -1586,10 +1585,10 @@ bool QtRec::openPlayFile() {
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 );
}
@@ -1690,7 +1689,7 @@ void QtRec::doRename() {
}
void QtRec::okRename() {
- qDebug(renameBox->text());
+ odebug << renameBox->text() << oendl;
QString filename = renameBox->text();
cancelRename();
@@ -1702,7 +1701,7 @@ void QtRec::okRename() {
QString file = ListView1->currentItem()->text(0);
- qDebug("filename is " + filename);
+ odebug << "filename is " + filename << oendl;
int nFiles = cfg.readNumEntry("NumberofFiles",0);
@@ -1773,7 +1772,7 @@ void QtRec::doVolMuting(bool b) {
}
void QtRec::doMicMuting(bool b) {
- // qDebug("mic mute");
+ // odebug << "mic mute" << oendl;
Config cfg( "qpe" );
cfg. setGroup( "Volume" );
cfg.writeEntry( "MicMute",b);
@@ -1829,7 +1828,7 @@ long QtRec::checkDiskSpace(const QString &path) {
// 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;
}
@@ -1854,7 +1853,7 @@ void QtRec::timerEvent( QTimerEvent * ) {
stop();
}
- qDebug( "%d", secCount );
+ odebug << "" << secCount << "" << oendl;
QString timeString;
#ifdef DEV_VERSION
QString msg;
@@ -1870,7 +1869,7 @@ 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;
@@ -1885,7 +1884,7 @@ void QtRec::changeTimeSlider(int index) {
void QtRec::timeSliderPressed() {
if( ListView1->currentItem() == 0) return;
- // qDebug("slider pressed");
+ // odebug << "slider pressed" << oendl;
paused = true;
stopped = true;
}
@@ -1894,7 +1893,7 @@ 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;
@@ -1924,7 +1923,7 @@ void QtRec::rewindTimerTimeout() {
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);
@@ -1938,7 +1937,7 @@ void QtRec::rewindReleased() {
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();
}
@@ -2002,7 +2001,7 @@ QString QtRec::getStorage(const QString &fileName) {
// 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;
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
@@ -2,17 +2,20 @@
#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>
@@ -24,7 +27,7 @@ WavFile::WavFile( QObject * parent,const QString &fileName, bool makeNwFile, int
int channels, int resolution, int format )
: QObject( parent)
{
-//qDebug("new wave file");
+//odebug << "new wave file" << oendl;
bool b = makeNwFile;
wavSampleRate=sampleRate;
wavFormat=format;
@@ -40,7 +43,7 @@ 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");
@@ -60,7 +63,7 @@ bool WavFile::newFile() {
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;
@@ -75,7 +78,7 @@ bool WavFile::newFile() {
return false;
}
-// qDebug("Opening tmp file %s",pointer);
+// odebug << "Opening tmp file " << pointer << "" << oendl;
track.setName( pointer);
} else { //just use regular file.. no moving
@@ -85,7 +88,7 @@ bool WavFile::newFile() {
}
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;
@@ -106,14 +109,14 @@ void WavFile::closeFile() {
}
int WavFile::openFile(const QString &currentFileName) {
-// 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 {
@@ -131,11 +134,11 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) {
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
@@ -160,12 +163,12 @@ bool WavFile::adjustHeaders(int fd, int total) {
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;
@@ -173,39 +176,39 @@ int WavFile::parseWavHeader(int fd) {
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) {
@@ -215,30 +218,30 @@ int WavFile::parseWavHeader(int fd) {
}
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++;
}
@@ -246,20 +249,20 @@ int WavFile::parseWavHeader(int fd) {
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;
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
@@ -19,8 +19,12 @@
**********************************************************************/
#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 )
@@ -38,9 +42,9 @@ 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;
@@ -96,7 +100,7 @@ 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
@@ -18,8 +18,7 @@ SOURCES = main.cpp \
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
-#INTERFACES = powerchordbase.ui
+LIBS += -lqpe -lopiecore2
DESTDIR = $(OPIEDIR)/bin
TARGET = powerchord
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
@@ -7,9 +7,15 @@
** 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>
@@ -18,8 +24,6 @@
#include <qtabwidget.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qpe/resource.h>
-
/*
* Constructs a PowerchordBase which is a child of 'parent', with the
@@ -580,6 +584,6 @@ 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,14 +1,16 @@
+#include "ImageFileSelector.h"
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qpe/qpeapplication.h>
+using namespace Opie::Core;
-#include "qpe/qpeapplication.h"
-
-#include <stdlib.h>
-
-#include <qlabel.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)
@@ -155,7 +157,7 @@ void ImageFileSelector::updateSizes()
void ImageFileSelector::reread(bool)
{
-// qDebug("reread");
+// odebug << "reread" << oendl;
ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem();
QString oldFile;
if ( item )
@@ -221,7 +223,7 @@ int ImageFileSelector::fileCount()
}
const DocLnk * ImageFileSelector::selected()
{
- qDebug("image selected");
+ odebug << "image selected" << oendl;
ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem();
if ( item )
return new DocLnk( item->file() );
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
@@ -26,23 +26,25 @@
#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)
{
@@ -286,7 +288,7 @@ ImageViewer::ImageViewer( QWidget *parent, const char *name, int /*wFlags*/ )
else
cv=ImageFileSelector::DETAILED;
- qDebug("cv = %d",cv);
+ odebug << "cv = " << cv << "" << oendl;
fileSelector = new ImageFileSelector( cv,stack, "fs");
@@ -413,7 +415,7 @@ void ImageViewer::settings()
dlg.setFastLoad(fastLoad);
if ( QPEApplication::execDialog(&dlg) == QDialog::Accepted ) {
- qDebug("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>");
+ odebug << "<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>" << oendl;
slideDelay = dlg.delay();
slideRepeat = dlg.repeat();
slideReverse = dlg.reverse();
@@ -505,7 +507,7 @@ void ImageViewer::show()
void ImageViewer::show(const QString& fileref)
{
-// qDebug("Show "+fileref);
+// odebug << "Show "+fileref << oendl;
bFromDocView = TRUE;
closeFileSelector();
DocLnk link(fileref);
@@ -535,7 +537,7 @@ 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()) {
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
@@ -1,4 +1,4 @@
-CONFIG += qt warn_on quick-app
+CONFIG += qt warn_on quick-app
HEADERS = showimg.h ImageFileSelector.h settingsdialog.h settingsdialogbase.h
SOURCES = main.cpp showimg.cpp ImageFileSelector.cpp settingsdialog.cpp settingsdialogbase.cpp
TARGET = showimg
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,8 +1,13 @@
#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)
@@ -100,7 +105,7 @@ 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,5 +1,10 @@
#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)
@@ -27,7 +32,7 @@ void Graph::FretBoard::paintEvent(QPaintEvent* 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();
@@ -143,17 +148,17 @@ 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)
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,9 +1,10 @@
#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)
@@ -152,7 +153,7 @@ Instrument TonleiterData::getInstrument(int id)
return instruments[id];
else
{
- qDebug("undefined insrtument %d of %d",id,instruments.count());
+ odebug << "undefined insrtument " << id << " of " << instruments.count() << "" << oendl;
return Instrument();
}
@@ -174,7 +175,7 @@ Scale TonleiterData::getScale(int id)
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
@@ -34,7 +34,7 @@ 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;
}
//****************************************************************************
@@ -131,12 +131,12 @@ bool Scale::noteInScale(int base,int 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
@@ -78,7 +78,7 @@ void POP3viewItem::refresh()
RECBODYP POP3viewItem::fetchBody( const RecMailP &mail )
{
- qDebug( "POP3 fetchBody" );
+ odebug << "POP3 fetchBody" << oendl;
return wrapper->fetchBody( mail );
}
@@ -269,7 +269,7 @@ void NNTPviewItem::refresh()
RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail )
{
- qDebug( "NNTP fetchBody" );
+ odebug << "NNTP fetchBody" << oendl;
return wrapper->fetchBody( mail );
}
@@ -460,7 +460,7 @@ void IMAPviewItem::refreshFolders(bool force)
{
item = new IMAPfolderItem( (*it), this , item );
folders->remove(it);
- qDebug("inbox found");
+ odebug << "inbox found" << oendl;
break;
}
}
@@ -533,7 +533,7 @@ void IMAPviewItem::createNewFolder()
void IMAPviewItem::contextMenuSelected(int id)
{
- qDebug("Id selected: %i",id);
+ odebug << "Id selected: " << id << "" << oendl;
switch (id)
{
case 0:
@@ -671,7 +671,7 @@ void IMAPfolderItem::deleteFolder()
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))
@@ -698,7 +698,7 @@ void IMAPfolderItem::downloadMails()
void IMAPfolderItem::contextMenuSelected(int id)
{
- qDebug("Selected id: %i",id);
+ odebug << "Selected id: " << id << "" << oendl;
AccountView * view = (AccountView*)listView();
switch(id)
{
@@ -802,7 +802,7 @@ void MHviewItem::refresh(bool force)
RECBODYP MHviewItem::fetchBody( const RecMailP &mail )
{
- qDebug( "MH fetchBody" );
+ odebug << "MH fetchBody" << oendl;
return wrapper->fetchBody( mail );
}
@@ -932,7 +932,7 @@ void MHfolderItem::deleteFolder()
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))
@@ -1074,7 +1074,7 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder)
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
@@ -66,20 +66,20 @@ 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 );
}
@@ -89,7 +89,7 @@ void AccountView::populate( QList<Account> list )
void AccountView::refresh(QListViewItem *item)
{
- qDebug("AccountView refresh...");
+ odebug << "AccountView refresh..." << oendl;
if ( item )
{
m_currentItem = item;
@@ -162,8 +162,8 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe
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
@@ -183,7 +183,7 @@ void ComposeMail::removeAttachment()
void ComposeMail::accept()
{
if ( checkBoxLater->isChecked() ) {
- qDebug( "Send later" );
+ odebug << "Send later" << oendl;
}
#if 0
@@ -256,7 +256,7 @@ void ComposeMail::reject()
txt.append( "\n--\n" );
txt.append( sigMultiLine->text() );
}
- qDebug(txt);
+ odebug << txt << oendl;
mail->setMessage( txt );
/* only use the default drafts folder name! */
@@ -292,7 +292,7 @@ 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() );
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
@@ -40,7 +40,7 @@ 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" ) );
@@ -80,7 +80,7 @@ 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();
@@ -94,7 +94,7 @@ 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 ) )
@@ -110,7 +110,7 @@ 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 ) )
@@ -126,7 +126,7 @@ 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 ) )
@@ -143,7 +143,7 @@ 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 ) )
@@ -212,7 +212,7 @@ 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" ),
@@ -241,13 +241,13 @@ 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" ),
@@ -262,7 +262,7 @@ void EditAccounts::slotEditNews()
void EditAccounts::slotDeleteNews()
{
- qDebug( "Delete News Account" );
+ odebug << "Delete News Account" << oendl;
if ( !newsList->currentItem() )
{
QMessageBox::information( this, tr( "Error" ),
@@ -578,7 +578,7 @@ void NNTPconfig::save()
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
@@ -52,7 +52,7 @@ 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! */
@@ -76,7 +76,7 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin
if (err == MAILIMF_NO_ERROR) {
result->setContent(result_text,target_length);
}
- qDebug("Decode string finished");
+ odebug << "Decode string finished" << oendl;
return result;
}
@@ -91,10 +91,10 @@ 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
@@ -97,7 +97,7 @@ 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;
}
// !!!! this is a MUST BE!
startpos = ++i;
@@ -110,16 +110,16 @@ 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;
@@ -175,7 +175,7 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet
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;
}
@@ -206,23 +206,23 @@ 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;
}
}
}
@@ -270,7 +270,7 @@ err_free_content:
err_free_param:
mailmime_parameter_free( param );
err_free:
- qDebug( "buildTxtPart - error" );
+ odebug << "buildTxtPart - error" << oendl;
return NULL; // Error :(
}
@@ -345,7 +345,7 @@ mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Ma
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;
}
}
@@ -353,7 +353,7 @@ mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Ma
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;
}
}
@@ -435,7 +435,7 @@ err_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
@@ -135,7 +135,7 @@ 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;
@@ -272,7 +272,7 @@ QString Genericwrapper::parseAddressList( mailimf_address_list *list )
result.append( parseGroup( addr->ad_data.ad_group ) );
break;
default:
- qDebug( "Generic: unkown mailimf address type" );
+ odebug << "Generic: unkown mailimf address type" << oendl;
break;
}
}
@@ -365,7 +365,7 @@ void Genericwrapper::cleanMimeCache()
if (t) delete t;
}
bodyCache.clear();
- qDebug("Genericwrapper: cache cleaned");
+ odebug << "Genericwrapper: cache cleaned" << oendl;
}
QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies)
@@ -394,12 +394,12 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &
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);
}
@@ -413,7 +413,7 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &
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();
@@ -448,7 +448,7 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &
// 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) {
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
@@ -30,7 +30,7 @@ int IMAPwrapper::selectMbox(const QString&mbox)
}
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;
}
@@ -41,7 +41,7 @@ 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)
@@ -53,7 +53,7 @@ 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;
@@ -74,7 +74,7 @@ bool IMAPwrapper::start_tls(bool force_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;
@@ -125,7 +125,7 @@ void IMAPwrapper::login()
pass = login.getPassword().latin1();
} else {
// cancel
- qDebug( "IMAP: Login canceled" );
+ odebug << "IMAP: Login canceled" << oendl;
return;
}
} else {
@@ -148,7 +148,7 @@ void IMAPwrapper::login()
}
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 );
@@ -176,7 +176,7 @@ 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;
}
@@ -317,7 +317,7 @@ 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 );
@@ -327,7 +327,7 @@ 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;
@@ -354,7 +354,7 @@ 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;
}
if (result) mailimap_list_result_free( result );
return folders;
@@ -466,8 +466,8 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
#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;
@@ -524,7 +524,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
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;
@@ -636,7 +636,7 @@ 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;
@@ -663,7 +663,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
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!
@@ -704,7 +704,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
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) {
@@ -748,7 +748,7 @@ void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_tex
}
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);
@@ -760,7 +760,7 @@ void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*
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);
@@ -819,7 +819,7 @@ void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_ba
} 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);
@@ -895,16 +895,16 @@ void IMAPwrapper::deleteMail(const RecMailP&mail)
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)
@@ -930,7 +930,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail)
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;
}
}
@@ -998,14 +998,14 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
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;
}
@@ -1030,7 +1030,7 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons
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));
@@ -1089,7 +1089,7 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)
}
}
} 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);
@@ -1113,7 +1113,7 @@ 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();
}
@@ -1129,7 +1129,7 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
{
if (targetWrapper != this) {
AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit);
- qDebug("Using generic");
+ odebug << "Using generic" << oendl;
return;
}
mailimap_set *set = 0;
@@ -1148,7 +1148,7 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
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) {
@@ -1159,7 +1159,7 @@ 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;
}
@@ -1178,7 +1178,7 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra
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) {
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
@@ -24,6 +24,6 @@ void LoginDialog::accept()
_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
@@ -13,7 +13,7 @@ RecMail::RecMail(const RecMail&old)
{
init();
copy_old(old);
- qDebug("Copy constructor RecMail");
+ odebug << "Copy constructor RecMail" << oendl;
}
RecMail::~RecMail()
@@ -131,7 +131,7 @@ RecPart::RecPart(const RecPart&old)
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()
@@ -255,7 +255,7 @@ 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()
@@ -320,14 +320,14 @@ 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;
}
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
@@ -51,7 +51,7 @@ 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;
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
@@ -31,7 +31,7 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta
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;
@@ -70,14 +70,14 @@ void MBOXwrapper::deleteMail(const RecMailP & mail)
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);
@@ -102,21 +102,21 @@ RecBodyP MBOXwrapper::fetchBody( const RecMailP &mail )
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);
@@ -132,7 +132,7 @@ 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 )
@@ -220,7 +220,7 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP>
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);
@@ -235,12 +235,12 @@ void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &targ
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;
}
}
@@ -269,7 +269,7 @@ 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;
}
}
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
@@ -16,7 +16,7 @@ MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name)
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);
@@ -33,7 +33,7 @@ void MHwrapper::init_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;
@@ -41,7 +41,7 @@ void MHwrapper::init_storage()
}
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;
}
@@ -70,7 +70,7 @@ 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);
@@ -90,7 +90,7 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders()
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)) {
@@ -110,12 +110,12 @@ void MHwrapper::deleteMail(const RecMailP&mail)
}
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;
}
}
@@ -140,7 +140,7 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail )
}
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);
@@ -150,7 +150,7 @@ 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)
@@ -183,13 +183,13 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri
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;
}
@@ -202,12 +202,12 @@ 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;
}
@@ -224,7 +224,7 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail)
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);
@@ -248,14 +248,14 @@ 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;
}
}
@@ -271,13 +271,13 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder)
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;
@@ -308,7 +308,7 @@ 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();
@@ -326,10 +326,10 @@ 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;
}
@@ -378,15 +378,15 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract
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) {
@@ -395,7 +395,7 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract
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;
}
}
@@ -407,21 +407,21 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder,
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) {
@@ -434,7 +434,7 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder,
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;
}
}
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
@@ -29,7 +29,7 @@ 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;
}
@@ -46,7 +46,7 @@ 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;
}
@@ -134,7 +134,7 @@ void NNTPwrapper::login()
Pass = login.getPassword().latin1();
} else {
// cancel
- qDebug( "NNTP: Login canceled" );
+ odebug << "NNTP: Login canceled" << oendl;
return;
}
} else {
@@ -171,7 +171,7 @@ 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
@@ -28,7 +28,7 @@ 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 ) {
@@ -45,7 +45,7 @@ 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;
}
@@ -130,7 +130,7 @@ void POP3wrapper::login()
pass = login.getPassword().latin1();
} else {
// cancel
- qDebug( "POP3: Login canceled" );
+ odebug << "POP3: Login canceled" << oendl;
return;
}
} else {
@@ -162,7 +162,7 @@ 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;
@@ -236,7 +236,7 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) {
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;
}
}
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
@@ -26,7 +26,7 @@ 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;
}
}
@@ -54,28 +54,28 @@ void Settings::updateAccounts()
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 );
}
@@ -179,7 +179,7 @@ void IMAPaccount::read()
void IMAPaccount::save()
{
- qDebug( "saving " + getFileName() );
+ odebug << "saving " + getFileName() << oendl;
Settings::checkDirectory();
Config *conf = new Config( getFileName(), Config::File );
@@ -257,7 +257,7 @@ void POP3account::read()
void POP3account::save()
{
- qDebug( "saving " + getFileName() );
+ odebug << "saving " + getFileName() << oendl;
Settings::checkDirectory();
Config *conf = new Config( getFileName(), Config::File );
@@ -339,7 +339,7 @@ void SMTPaccount::read()
void SMTPaccount::save()
{
- qDebug( "saving " + getFileName() );
+ odebug << "saving " + getFileName() << oendl;
Settings::checkDirectory();
Config *conf = new Config( getFileName(), Config::File );
@@ -416,7 +416,7 @@ void NNTPaccount::read()
void NNTPaccount::save()
{
- qDebug( "saving " + getFileName() );
+ odebug << "saving " + getFileName() << oendl;
Settings::checkDirectory();
Config *conf = new Config( getFileName(), Config::File );
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
@@ -115,7 +115,7 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
if (r != MAIL_NO_ERROR || !data) {
if (data)
free(data);
- qDebug("Error fetching mime...");
+ odebug << "Error fetching mime..." << oendl;
return;
}
msg = 0;
@@ -208,16 +208,16 @@ void SMTPwrapper::connect_server()
}
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;
}
@@ -246,7 +246,7 @@ void SMTPwrapper::connect_server()
}
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(),
@@ -264,11 +264,11 @@ void SMTPwrapper::connect_server()
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;
@@ -307,7 +307,7 @@ 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;
@@ -319,13 +319,13 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
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;
@@ -378,9 +378,9 @@ int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) {
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;
}
@@ -388,7 +388,7 @@ bool SMTPwrapper::flushOutbox() {
QString localfolders = AbstractMail::defaultLocalfolder();
AbstractMail*wrap = AbstractMail::getWrapper(localfolders);
if (!wrap) {
- qDebug("memory error");
+ odebug << "memory error" << oendl;
return false;
}
QString oldPw, oldUser;
@@ -398,7 +398,7 @@ bool SMTPwrapper::flushOutbox() {
wrap->listMessages(mbox,mailsToSend);
if (mailsToSend.count()==0) {
delete wrap;
- qDebug("No mails to send");
+ odebug << "No mails to send" << oendl;
return false;
}
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
@@ -43,7 +43,7 @@ void StatusMail::initAccounts(QList<Account>&accounts)
}
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;
@@ -72,10 +72,10 @@ void StatusMail::check_current_stat(folderStat&targetStat)
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;
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
@@ -58,7 +58,7 @@ 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;
@@ -73,7 +73,7 @@ int Storemail::storeMail(const Opie::Core::OSmartPointer<Mail>&mail)
mailmessage_free(msg);
msg = 0;
if (r != MAIL_NO_ERROR || !data) {
- qDebug("Error fetching mime...");
+ odebug << "Error fetching mime..." << oendl;
ret = 0;
}
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
@@ -141,7 +141,7 @@ MainWindow::~MainWindow()
void MainWindow::appMessage(const QCString &, const QByteArray &)
{
- qDebug("appMessage not reached");
+ odebug << "appMessage not reached" << oendl;
}
void MainWindow::slotAdjustLayout() {
@@ -175,32 +175,32 @@ 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
@@ -53,7 +53,7 @@ void NNTPGroups::storeValues()
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) );
}
}
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
@@ -67,13 +67,13 @@ 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();
@@ -120,7 +120,7 @@ void OpieMail::slotSendQueued()
void OpieMail::slotSearchMails()
{
- qDebug( "Search Mails" );
+ odebug << "Search Mails" << oendl;
}
void OpieMail::slotEditSettings()
@@ -131,7 +131,7 @@ 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 );
@@ -180,7 +180,7 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
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)
@@ -204,15 +204,15 @@ 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
@@ -104,7 +104,7 @@ void MailApplet::slotCheck() {
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() )
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
@@ -139,7 +139,7 @@ void ViewMail::setBody(const RecBodyP&body )
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
@@ -32,7 +32,7 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal
{
if ( !name )
setName( tr("filePermissions") );
-// qDebug("FilePermissions "+fileName);
+// odebug << "FilePermissions "+fileName << oendl;
resize( 236, 210 );
isRemote=useRemote;
setMaximumSize( QSize( 236, 210 ) );
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
@@ -19,11 +19,13 @@ 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>
@@ -36,14 +38,15 @@ extern "C" {
#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;
@@ -61,7 +64,7 @@ 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;
@@ -334,7 +337,7 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
// ServerComboBox->setCurrentItem(currentServerConfig);
TabWidget->setCurrentPage(2);
- qDebug("Constructor done");
+ odebug << "Constructor done" << oendl;
}
OpieFtp::~OpieFtp()
@@ -405,7 +408,7 @@ void OpieFtp::newConnection()
void OpieFtp::serverComboEdited(const QString & )
{
// if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) {
-// qDebug("ServerComboEdited");
+// odebug << "ServerComboEdited" << oendl;
// // currentServerConfig = -1;
// }
}
@@ -530,7 +533,7 @@ void OpieFtp::localUpload()
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;
@@ -591,7 +594,7 @@ void OpieFtp::remoteDownload()
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;
@@ -620,7 +623,7 @@ bool OpieFtp::remoteDirList(const QString &dir)
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;
@@ -642,7 +645,7 @@ bool OpieFtp::remoteChDir(const QString &dir)
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;
}
@@ -664,20 +667,20 @@ void OpieFtp::populateLocalView()
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()) {
@@ -720,7 +723,7 @@ void OpieFtp::populateLocalView()
bool OpieFtp::populateRemoteView( )
{
-// qDebug("populate remoteview");
+// odebug << "populate remoteview" << oendl;
QString sfile=QDir::homeDirPath();
if(sfile.right(1) != "/")
sfile+="/._temp";
@@ -769,7 +772,7 @@ bool OpieFtp::populateRemoteView( )
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;
}
@@ -788,7 +791,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
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
@@ -796,7 +799,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
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 {
@@ -807,13 +810,13 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
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;
@@ -866,7 +869,7 @@ 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
@@ -1170,7 +1173,7 @@ void OpieFtp::fillRemoteCombo(const QString &currentPath) {
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() );
@@ -1216,14 +1219,14 @@ void OpieFtp::readConfig()
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");
@@ -1254,7 +1257,7 @@ void OpieFtp::writeConfig()
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())
@@ -1273,7 +1276,7 @@ void OpieFtp::writeConfig()
}
void OpieFtp::clearCombos() {
- qDebug("clearing");
+ odebug << "clearing" << oendl;
ServerComboBox->clear();
UsernameComboBox->clear();
PasswordEdit->clear();
@@ -1292,10 +1295,10 @@ void OpieFtp::fillCombos()
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);
@@ -1303,7 +1306,7 @@ void OpieFtp::fillCombos()
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);
@@ -1321,7 +1324,7 @@ 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);
@@ -1332,9 +1335,9 @@ 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;
@@ -1349,8 +1352,8 @@ void OpieFtp::serverComboSelected(int index)
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
@@ -1362,7 +1365,7 @@ 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();
}
@@ -1391,7 +1394,7 @@ void OpieFtp::deleteServer()
serverListView->removeItem(i);
- qDebug("OK DELETE "+tempname);
+ odebug << "OK DELETE "+tempname << oendl;
cfg.removeEntry(QString::number(i));
for ( ; i <= numberOfEntries; i++) {
cfg.setGroup("Server");
@@ -1446,7 +1449,7 @@ void OpieFtp::upDir()
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
@@ -1454,7 +1457,7 @@ void OpieFtp::upDir()
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
@@ -1515,7 +1518,7 @@ 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));
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
+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,6 +1,9 @@
-#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) {
}
@@ -64,7 +67,7 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
m_history.prepend(text());
m_index = -1;
} else if (key == Key_Tab) {
- printf("got tab\n");
+ odebug << "got tab" << oendl;
return;
}
QLineEdit::keyPressEvent(event);
@@ -75,7 +78,7 @@ bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) {
QKeyEvent *k = (QKeyEvent *) event;
/* Catch tab characters */
if (k->key() == Key_Tab) {
- qDebug("tab!");
+ odebug << "tab!" << oendl;
return TRUE;
}
}
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
@@ -1,5 +1,5 @@
-CONFIG = qt warn_on quick-app
-HEADERS = ircchannel.h ircconnection.h \
+CONFIG = qt warn_on quick-app
+HEADERS = ircchannel.h ircconnection.h \
ircmessage.h \
ircmessageparser.h ircoutput.h \
ircperson.h ircserver.h ircsession.h \
@@ -7,7 +7,7 @@ HEADERS = ircchannel.h ircconnection.h \
ircchanneltab.h ircchannellist.h \
ircserverlist.h ircservereditor.h \
ircquerytab.h ircsettings.h ircmisc.h
-SOURCES = ircchannel.cpp ircconnection.cpp \
+SOURCES = ircchannel.cpp ircconnection.cpp \
ircmessage.cpp \
ircmessageparser.cpp ircoutput.cpp \
ircperson.cpp ircserver.cpp \
@@ -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
-
-TARGET = opieirc
+DEPENDPATH += $(OPIEDIR)/include
+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
@@ -206,7 +206,7 @@ namespace OpieTooth {
*/
void BluezApplet::paintEvent( QPaintEvent* ) {
QPainter p(this);
- qDebug("paint bluetooth pixmap");
+ odebug << "paint bluetooth pixmap" << oendl;
if (bluezactive > 0) {
p.drawPixmap( 0, 1, bluezOnPixmap );
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
@@ -45,7 +45,7 @@ void StartDunConnection::start() {
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
@@ -39,7 +39,7 @@ 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*) ) ,
@@ -47,7 +47,7 @@ void StartPanConnection::start() {
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;
}
}
@@ -68,7 +68,7 @@ void StartPanConnection::stop() {
m_panConnect = 0l;
}
m_panConnect = new OProcess();
- qDebug("IM STOP " + m_mac);
+ odebug << "IM STOP " + m_mac << oendl;
*m_panConnect << "pand" << "--kill" << m_mac;
@@ -77,7 +77,7 @@ void StartPanConnection::stop() {
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
@@ -155,7 +155,7 @@ void BlueBase::writeConfig()
*/
void BlueBase::writeToHciConfig()
{
- qWarning("writeToHciConfig");
+ owarn << "writeToHciConfig" << oendl;
HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" );
hciconf.load();
hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" );
@@ -367,25 +367,25 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
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 )
{
;
@@ -406,7 +406,7 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
*/
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 );
@@ -423,7 +423,7 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item )
*/
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;
@@ -607,7 +607,7 @@ void BlueBase::deviceActive( const RemoteDevice &device )
*/
void BlueBase::deviceActive( const QString& device, bool connected )
{
- qDebug("deviceActive slot");
+ odebug << "deviceActive slot" << oendl;
QMap<QString,BTDeviceItem*>::Iterator it;
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
@@ -33,13 +33,13 @@ QString path = QDir::homeDirPath() + "/Settings/bluetooth";
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 );
@@ -66,14 +66,14 @@ void DeviceHandler::save( const RemoteDevice::ValueList& list) {
*/
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/" +
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
@@ -11,7 +11,7 @@ using namespace OpieTooth;
*/
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
@@ -74,16 +74,16 @@ namespace OpieTooth {
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
@@ -98,11 +98,11 @@ namespace OpieTooth {
* 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;
}
@@ -119,13 +119,13 @@ namespace OpieTooth {
}
}
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;
}
@@ -134,6 +134,6 @@ namespace OpieTooth {
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
@@ -80,7 +80,7 @@ void ObexDialog::sendData() {
*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
@@ -16,7 +16,7 @@ using namespace OpieTooth;
ObexPopup::ObexPopup()
: QPopupMenu()
{
- qWarning("RfcCommPopup c'tor");
+ owarn << "RfcCommPopup c'tor" << oendl;
QAction* a;
@@ -36,7 +36,7 @@ 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
@@ -11,7 +11,7 @@ using namespace OpieTooth;
*/
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
@@ -16,10 +16,10 @@ void PopupHelper::insert( int id, popupFactory 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);
}
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
@@ -56,7 +56,7 @@ void PPPDialog::connectToDevice() {
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
@@ -71,7 +71,7 @@ void RfcommAssignDialog::newDevice( const QString & mac )
rfcomm->setMac( mac );
rfcomm->setChannel( newDev->channel() );
rfcomm->setComment( newDev->comment() );
- qDebug( "New device set up" );
+ odebug << "New device set up" << oendl;
}
}
}
@@ -92,7 +92,7 @@ void RfcommAssignDialog::loadConfig()
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
@@ -92,23 +92,23 @@ void RfCommConfHandler::load() {
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
@@ -17,7 +17,7 @@ using namespace OpieTooth;
RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
: QPopupMenu()
{
- qWarning("RfcCommPopup c'tor");
+ owarn << "RfcCommPopup c'tor" << oendl;
QAction* a;
@@ -70,7 +70,7 @@ RfcCommPopup::~RfcCommPopup()
void RfcCommPopup::slotConnect()
{
- qWarning("connect");
+ owarn << "connect" << oendl;
PPPDialog pppDialog;
QPEApplication::execDialog( &pppDialog );
@@ -79,7 +79,7 @@ void RfcCommPopup::slotConnect()
void RfcCommPopup::slotDisconnect()
{
- qWarning("slot disconnected");
+ owarn << "slot disconnected" << oendl;
}
@@ -98,6 +98,6 @@ 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
@@ -155,7 +155,7 @@ 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
@@ -23,7 +23,9 @@
#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 */
@@ -40,15 +42,9 @@ using namespace Opie;
#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 )
@@ -116,7 +112,7 @@ void WellenreiterConfigWindow::performAutodetection()
// 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" );
@@ -137,7 +133,7 @@ void WellenreiterConfigWindow::performAutodetection()
{
deviceType->setCurrentItem( devicetype );
_guess = devicetype;
- qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
+ odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl;
}
}
}
@@ -241,7 +237,7 @@ 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 );
@@ -316,11 +312,11 @@ void WellenreiterConfigWindow::performAction( const QString& type,
}
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 )
{
@@ -345,9 +341,9 @@ void WellenreiterConfigWindow::performAction( const QString& type,
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 );
@@ -361,7 +357,7 @@ void WellenreiterConfigWindow::load()
#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! */
@@ -439,7 +435,7 @@ 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! */
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
@@ -15,6 +15,10 @@
#include "gps.h"
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
/* QT */
#include <qtextstream.h>
@@ -25,14 +29,14 @@
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;
}
@@ -53,7 +57,7 @@ GpsLocation GPS::position() const
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 );
@@ -61,7 +65,7 @@ GpsLocation GPS::position() const
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
@@ -14,6 +14,12 @@
**********************************************************************/
#include "logwindow.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qmultilineedit.h>
#include <qdatetime.h>
@@ -38,7 +44,7 @@ void MLogWindow::log( QString text )
int row;
ledit->getCursorPosition( &col, &row );
ledit->insertAt( line, col, row );
- qDebug( line );
+ odebug << line << oendl;
}
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
@@ -14,24 +14,27 @@
**********************************************************************/
#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
@@ -55,10 +58,10 @@ 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;
}
@@ -69,7 +72,7 @@ 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 );
@@ -86,7 +89,7 @@ int main( int argc, char **argv )
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
@@ -21,6 +21,21 @@
#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>
@@ -39,23 +54,9 @@
#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 )
{
@@ -188,7 +189,7 @@ 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 );
@@ -231,7 +232,7 @@ void WellenreiterMainWindow::changedSniffingState()
WellenreiterMainWindow::~WellenreiterMainWindow()
{
- qDebug( "Wellenreiter: bye." );
+ odebug << "Wellenreiter: bye." << oendl;
};
@@ -251,7 +252,7 @@ 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() ) );
@@ -305,11 +306,11 @@ 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;
}
}
}
@@ -326,11 +327,11 @@ 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;
}
}
}
@@ -348,11 +349,11 @@ 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;
}
}
*/
@@ -369,11 +370,11 @@ 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;
}
}
}
@@ -438,11 +439,11 @@ void WellenreiterMainWindow::uploadSession()
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;
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
@@ -84,7 +84,7 @@ void PacketView::showPacket( int number )
}
else
{
- qDebug( "D'oh! No packet!" );
+ odebug << "D'oh! No packet!" << oendl;
}
}
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
@@ -29,7 +29,7 @@ QPixmap loadPixmap( const QString& 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;
};
@@ -41,7 +41,7 @@ QIconSet loadIconSet( const QString& 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
@@ -17,21 +17,26 @@
#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;
@@ -46,12 +51,6 @@ 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 )
{
@@ -106,14 +105,14 @@ 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 );
}
@@ -143,7 +142,7 @@ 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() );
}
@@ -159,7 +158,7 @@ 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() );
}
@@ -168,7 +167,7 @@ void MScanListView::addNewItem( const QString& type,
{
// 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;
@@ -186,7 +185,7 @@ void MScanListView::addNewItem( const QString& type,
// 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 );
@@ -212,7 +211,7 @@ 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() );
}
@@ -221,7 +220,7 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
{
// 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;
@@ -246,7 +245,7 @@ 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;
@@ -264,7 +263,7 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& 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!" );
}
}
@@ -286,7 +285,7 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
}
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!" );
}
@@ -309,7 +308,7 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
}
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!" );
}
}
@@ -317,14 +316,14 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
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 )
@@ -335,7 +334,7 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& 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 ) );
}
@@ -343,7 +342,7 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& 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
@@ -360,7 +359,7 @@ 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() );
}
@@ -369,7 +368,7 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
{
// 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;
@@ -383,7 +382,7 @@ 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 ) );
}
@@ -421,7 +420,7 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr
_channel( channel ), _signal( signal ), _beacons( 1 )
{
#ifdef DEBUG
- qDebug( "creating scanlist item" );
+ odebug << "creating scanlist item" << oendl;
#endif
if ( WellenreiterConfigWindow::instance() )
@@ -435,7 +434,7 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const
: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
@@ -459,7 +458,7 @@ OListViewItem* MScanListItem::childFactory()
void MScanListItem::serializeTo( QDataStream& s ) const
{
#ifdef DEBUG
- qDebug( "serializing MScanListItem" );
+ odebug << "serializing MScanListItem" << oendl;
#endif
OListViewItem::serializeTo( s );
@@ -470,7 +469,7 @@ void MScanListItem::serializeTo( QDataStream& s ) const
void MScanListItem::serializeFrom( QDataStream& s )
{
#ifdef DEBUG
- qDebug( "serializing MScanListItem" );
+ odebug << "serializing MScanListItem" << oendl;
#endif
OListViewItem::serializeFrom( s );
@@ -556,7 +555,7 @@ 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
@@ -11,8 +11,6 @@
**
***********************************************************************/
-// Local
-
#include "gps.h"
#include "wellenreiter.h"
#include "scanlist.h"
@@ -23,10 +21,10 @@
#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>
@@ -35,10 +33,11 @@
#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>
@@ -52,8 +51,7 @@ using namespace Opie;
#include <qtoolbutton.h>
#include <qmainwindow.h>
-// Standard
-
+/* STD */
#include <assert.h>
#include <errno.h>
#include <unistd.h>
@@ -61,12 +59,6 @@ using namespace Opie;
#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 )
@@ -106,7 +98,7 @@ Wellenreiter::~Wellenreiter()
void Wellenreiter::initialTimer()
{
- qDebug( "Wellenreiter::preloading manufacturer database..." );
+ odebug << "Wellenreiter::preloading manufacturer database..." << oendl;
OManufacturerDB::instance();
}
@@ -149,12 +141,12 @@ void Wellenreiter::handleNotification( OPacket* p )
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;
}
@@ -166,7 +158,7 @@ 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;
}
@@ -182,14 +174,14 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
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;
}
@@ -211,7 +203,7 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
}
else
{
- qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" );
+ owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
return;
}
@@ -226,9 +218,9 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
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 );
@@ -255,7 +247,7 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
}
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;
}
}
@@ -304,7 +296,7 @@ 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() );
@@ -325,16 +317,16 @@ 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() );
}
}
@@ -368,7 +360,7 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
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 ) );
@@ -377,7 +369,7 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
}
else
{
- qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name );
+ odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl;
}
++it;
}
@@ -551,7 +543,7 @@ void Wellenreiter::startClicked()
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
}
@@ -572,7 +564,7 @@ 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() );
}
@@ -596,7 +588,7 @@ void Wellenreiter::startClicked()
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() )
@@ -652,7 +644,7 @@ void Wellenreiter::startClicked()
void Wellenreiter::timerEvent( QTimerEvent* )
{
- qDebug( "Wellenreiter::timerEvent()" );
+ odebug << "Wellenreiter::timerEvent()" << oendl;
OPacket* p = pcap->next();
if ( !p ) // no more packets available
{
@@ -715,15 +707,15 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
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" ) );
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,10 +1,11 @@
-
#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>
@@ -40,7 +41,6 @@
const QString tempFileName = "/tmp/backup.err";
-
BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags fl)
: BackupAndRestoreBase(parent, name, fl)
{
@@ -73,17 +73,17 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f
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");
@@ -203,7 +203,7 @@ void BackupAndRestore::scanForApplicationSettings()
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());
@@ -249,7 +249,7 @@ 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() )
@@ -258,7 +258,7 @@ void BackupAndRestore::backup()
.arg( outputFile.latin1() )
.arg( tempFileName.latin1() );
- qDebug( commandLine );
+ odebug << commandLine << oendl;
int r = system( commandLine );
@@ -272,7 +272,7 @@ void BackupAndRestore::backup()
{
case 1:
- qWarning("Details pressed !");
+ owarn << "Details pressed !" << oendl;
ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true );
QFile errorFile( tempFileName );
if ( errorFile.open(IO_ReadOnly) )
@@ -359,7 +359,7 @@ void BackupAndRestore::sourceDirChanged(int selection)
void BackupAndRestore::fileListUpdate()
{
- qWarning("void BackupAndRestore::fileListUpdate()");
+ owarn << "void BackupAndRestore::fileListUpdate()" << oendl;
restoreList->clear();
rescanFolder( backupLocations[restoreSource->currentText()] );
}
@@ -371,7 +371,7 @@ void BackupAndRestore::fileListUpdate()
*/
void BackupAndRestore::rescanFolder(QString directory)
{
- //qDebug(QString("rescanFolder: ") + directory.latin1());
+ //odebug << QString("rescanFolder: ") + directory.latin1() << oendl;
QDir d(directory);
if(!d.exists())
return;
@@ -419,7 +419,7 @@ void BackupAndRestore::restore()
restoreFile += "/" + restoreItem->text(0);
- qDebug( restoreFile );
+ odebug << restoreFile << oendl;
//check if backup file come from opie 1.0.x
@@ -442,7 +442,7 @@ void BackupAndRestore::restore()
.arg( restoreFile.latin1() )
.arg( tempFileName.latin1() );
- qDebug( commandLine );
+ odebug << commandLine << oendl;
r = system( commandLine );
@@ -454,7 +454,7 @@ void BackupAndRestore::restore()
+ 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
@@ -139,7 +139,7 @@ void SettingsTabWidget::saveSettings()
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
@@ -137,13 +137,13 @@ 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;
}
@@ -201,7 +201,7 @@ 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;
}
@@ -220,14 +220,14 @@ bool Interface::refresh(){
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;
}
@@ -240,7 +240,7 @@ 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;
}
@@ -249,7 +249,7 @@ bool Interface::refresh(){
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() ) {
@@ -278,12 +278,12 @@ bool Interface::refresh(){
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
@@ -24,7 +24,7 @@ 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;
@@ -76,7 +76,7 @@ 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;
}
@@ -152,7 +152,7 @@ bool Interfaces::isInterfaceSet() const {
* @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();
@@ -168,7 +168,7 @@ bool Interfaces::addInterface(const QString &interface, const QString &family, c
* @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;
@@ -275,14 +275,14 @@ QString Interfaces::getInterfaceMethod(bool &error){
* @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;
@@ -345,7 +345,7 @@ 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);
}
@@ -486,7 +486,7 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString
}
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;
@@ -505,12 +505,12 @@ 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)) ){
@@ -518,10 +518,10 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op
// && 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;
@@ -529,23 +529,23 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op
}
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;
@@ -582,7 +582,7 @@ 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
@@ -610,7 +610,7 @@ 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
@@ -663,7 +663,7 @@ QString Interfaces::getOption(const QStringList::Iterator &start, const QString
}
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());
@@ -687,7 +687,7 @@ bool Interfaces::write(){
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 );
@@ -700,7 +700,7 @@ bool Interfaces::write(){
else
whiteSpaceCount = 0;
if(whiteSpaceCount < 2){
- qDebug((*it).latin1());
+ odebug << (*it).latin1() << oendl;
stream << (*it) << '\n';
}
}
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
@@ -46,7 +46,7 @@ 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;
@@ -72,7 +72,7 @@ bool InterfaceSetupImp::saveChanges(){
qApp->processEvents();
if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) {
- qWarning("unstable to spawn ifdown/ifup");
+ owarn << "unstable to spawn ifdown/ifup" << oendl;
}
owait->hide();
@@ -157,7 +157,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){
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;
}
}
@@ -167,7 +167,7 @@ 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;
}
}
@@ -185,7 +185,7 @@ 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()));
@@ -199,8 +199,8 @@ void InterfaceSetupImp::setProfile(const QString &profile){
- 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;
}
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
@@ -79,7 +79,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi
*/
if (m_handledIfaces.contains( *ni) )
{
- qDebug("Not up iface handled by module");
+ odebug << "Not up iface handled by module" << oendl;
continue;
}
bool found = false;
@@ -219,7 +219,7 @@ 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;
@@ -249,7 +249,7 @@ void MainWindowImp::getAllInterfaces()
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*)),
@@ -265,7 +265,7 @@ 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*)),
@@ -283,7 +283,7 @@ 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())
@@ -304,7 +304,7 @@ void MainWindowImp::loadModules(const QString &path)
{
#endif
loadPlugin(path + "/" + fi->fileName());
- qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1());
+ odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl;
}
++it;
}
@@ -319,7 +319,7 @@ 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);
@@ -327,7 +327,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
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;
@@ -337,7 +337,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
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;
@@ -352,7 +352,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
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.
@@ -360,12 +360,12 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
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);
@@ -411,7 +411,7 @@ 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);
}
@@ -513,7 +513,7 @@ void MainWindowImp::informationClicked()
{
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;
}
@@ -650,7 +650,7 @@ void MainWindowImp::removeProfile()
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();
@@ -719,7 +719,7 @@ 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();
@@ -729,12 +729,12 @@ 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 );
@@ -744,5 +744,5 @@ 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
@@ -118,7 +118,7 @@ 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
@@ -142,7 +142,7 @@ 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 );
@@ -151,7 +151,7 @@ void AuthWidget::authChanged( const QString &authStr )
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
@@ -472,7 +472,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
scriptCommand = *(comlist->at(scriptindex));
scriptArgument = *(arglist->at(scriptindex));
} else {
- qDebug( "End of script" );
+ odebug << "End of script" << oendl;
vmain = 10;
return;
}
@@ -838,7 +838,7 @@ 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());
@@ -848,7 +848,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
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())
@@ -1064,7 +1064,7 @@ 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);
@@ -1271,7 +1271,7 @@ 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();
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
@@ -72,11 +72,11 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam
// 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
@@ -335,7 +335,7 @@ bool ModemWidget::save()
!_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());
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
@@ -20,7 +20,7 @@
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
@@ -14,13 +14,13 @@ InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool 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() );
@@ -31,7 +31,7 @@ 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;
@@ -39,7 +39,7 @@ Modem* InterfacePPP::modem()const
bool InterfacePPP::refresh()
{
- qDebug("InterfacePPP::refresh()");
+ odebug << "InterfacePPP::refresh()" << oendl;
QString old = getInterfaceName();
setInterfaceName( modem()->pppDevice() );
@@ -53,7 +53,7 @@ bool InterfacePPP::refresh()
void InterfacePPP::start()
{
- qDebug("InterfacePPP::start");
+ odebug << "InterfacePPP::start" << oendl;
if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) {
@@ -143,12 +143,12 @@ void InterfacePPP::start()
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 );
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
@@ -74,13 +74,13 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
// 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)
@@ -305,7 +305,7 @@ KPPPWidget::~KPPPWidget()
// if(e->type() == QEvent::User) {
// switch(((SignalEvent*)e)->sigType()) {
// case SIGINT:
-// qDebug( "Received a SIGINT" );
+// odebug << "Received a SIGINT" << oendl;
// interruptConnection();
// break;
// case SIGCHLD:
@@ -423,13 +423,13 @@ 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
@@ -442,7 +442,7 @@ void KPPPWidget::sigPPPDDied() {
_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());
@@ -489,7 +489,7 @@ void KPPPWidget::sigPPPDDied() {
// // 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 ||
@@ -511,7 +511,7 @@ 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;
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
@@ -55,7 +55,7 @@
#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); }
@@ -165,7 +165,7 @@ bool Modem::opentty() {
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;
}
@@ -306,9 +306,9 @@ void Modem::startNotifier() {
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);
}
}
@@ -321,7 +321,7 @@ void Modem::stopNotifier() {
disconnect(sn);
delete sn;
sn = 0;
- qDebug( "QSocketNotifier stopped!" );
+ odebug << "QSocketNotifier stopped!" << oendl;
}
}
@@ -337,7 +337,7 @@ bool Modem::writeChar(unsigned char c) {
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);
@@ -365,7 +365,7 @@ bool Modem::writeLine(const char *buf) {
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;
}
@@ -474,7 +474,7 @@ QString Modem::parseModemSpeed(const QString &s) {
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;
@@ -560,7 +560,7 @@ QString Modem::parseModemSpeed(const QString &s) {
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;
}
@@ -573,7 +573,7 @@ int Modem::lockdevice() {
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;
}
@@ -595,7 +595,7 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 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);
@@ -608,14 +608,14 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
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);
@@ -632,7 +632,7 @@ 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);
@@ -654,7 +654,7 @@ 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) {
@@ -666,7 +666,7 @@ int Modem::openLockfile( QString lockfile, int flags)
// 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
@@ -927,7 +927,7 @@ bool Modem::execpppd(const char *arguments) {
break;
default:
- qDebug("In parent: pppd pid %d\n",pppdPid);
+ odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl;
close(modemfd);
::close( m_pppdLOG[1] );
@@ -935,7 +935,7 @@ bool Modem::execpppd(const char *arguments) {
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 );
}
@@ -954,15 +954,15 @@ 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;
}
}
@@ -1035,7 +1035,7 @@ 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;
@@ -1056,7 +1056,7 @@ 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
@@ -25,10 +25,10 @@ PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent,
}
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 );
@@ -58,9 +58,9 @@ 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();
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
@@ -56,8 +56,8 @@ PPPData::PPPData()
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;
@@ -86,7 +86,7 @@ Config PPPData::config()
//
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;
@@ -100,9 +100,9 @@ void PPPData::save()
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);
}
@@ -110,9 +110,9 @@ void PPPData::save()
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);
}
@@ -121,7 +121,7 @@ void PPPData::save()
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);
@@ -142,7 +142,7 @@ void PPPData::cancel() {
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];
@@ -365,21 +365,21 @@ const QString PPPData::modemDevice() {
// }
// 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
}
@@ -739,18 +739,18 @@ 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;
}
@@ -772,11 +772,11 @@ 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;
}
@@ -788,13 +788,13 @@ 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;
}
@@ -820,7 +820,7 @@ bool PPPData::deleteAccount() {
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();
@@ -830,7 +830,7 @@ bool PPPData::deleteAccount() {
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();
@@ -840,7 +840,7 @@ bool PPPData::deleteAccount() {
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;
}
}
@@ -860,7 +860,7 @@ 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;
@@ -869,7 +869,7 @@ int PPPData::newaccount() {
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;
}
@@ -965,9 +965,9 @@ 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, "");
}
@@ -1329,10 +1329,10 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces )
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 );
}
@@ -1372,7 +1372,7 @@ 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;
}
@@ -1390,20 +1390,20 @@ 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;
}
@@ -1424,7 +1424,7 @@ bool PPPData::deleteDevice()
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();
@@ -1434,7 +1434,7 @@ bool PPPData::deleteDevice()
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();
@@ -1444,7 +1444,7 @@ bool PPPData::deleteDevice()
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;
}
}
@@ -1463,14 +1463,14 @@ 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;
}
@@ -1484,10 +1484,10 @@ 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;
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
@@ -60,10 +60,10 @@ 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 );
@@ -71,7 +71,7 @@ PPPModule::PPPModule() : Module()
// 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 );
@@ -88,7 +88,7 @@ PPPModule::PPPModule() : Module()
*/
PPPModule::~PPPModule()
{
- qDebug("PPPModule::~PPPModule() " );
+ odebug << "PPPModule::~PPPModule() " << oendl;
QMap<QString,QString> ifaces;
InterfaceKeeper keeper;
Interface *i;
@@ -97,7 +97,7 @@ PPPModule::~PPPModule()
/* 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() );
}
@@ -141,7 +141,7 @@ bool PPPModule::isOwner(Interface *i)
*/
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));
@@ -168,7 +168,7 @@ 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;
}
@@ -261,7 +261,7 @@ namespace
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 );
@@ -272,11 +272,11 @@ namespace
{
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
@@ -13,7 +13,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
WExtensions *wExtensions = new WExtensions(name);
if(!wExtensions->doesHaveWirelessExtensions()){
delete wExtensions;
- qDebug("WlanInfoImp::No wireless extension");
+ odebug << "WlanInfoImp::No wireless extension" << oendl;
return;
}
delete wExtensions;
@@ -28,7 +28,7 @@ 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
@@ -112,7 +112,7 @@ int WExtensions::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;
}
@@ -177,12 +177,12 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
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;
@@ -190,7 +190,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
}
}
- qDebug("WExtensions::statsCard no longer present.");
+ odebug << "WExtensions::statsCard no longer present." << oendl;
quality = -1;
signal = IW_LOWER;
noise = IW_LOWER;
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
@@ -45,7 +45,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
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)));
}
@@ -146,7 +146,7 @@ void WLANImp::changeAndSaveSettingFile(){
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;
}
@@ -236,7 +236,7 @@ void WLANImp::accept(){
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
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
@@ -52,7 +52,7 @@ 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() ) );
@@ -233,7 +233,7 @@ void WLANImp::writeOpts() {
}
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!!!");
@@ -307,7 +307,7 @@ 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 );
@@ -330,12 +330,12 @@ 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
@@ -349,14 +349,14 @@ void WLANImp::rescanNeighbourhood()
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;
}
@@ -365,7 +365,7 @@ void WLANImp::rescanNeighbourhood()
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;
}
@@ -398,15 +398,15 @@ 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 );
}
}
@@ -439,7 +439,7 @@ void WLANImp::handlePacket( OPacket* p )
}
else
{
- qWarning( "handlePacket(): invalid frame [possibly noise] detected!" );
+ owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
return;
}
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
@@ -122,13 +122,13 @@ bool WLANModule::remove(Interface*){
void WLANModule::receive(const QCString &param, 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;
}
@@ -137,38 +137,38 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
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;
}
@@ -195,9 +195,9 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}
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") ){
@@ -218,10 +218,10 @@ void WLANModule::receive(const QCString &param, 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 );
}
@@ -229,27 +229,27 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
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,10 +1,9 @@
-CONFIG += qt warn_on quick-app
-HEADERS = soundsettings.h soundsettingsbase.h
-SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp
-#INTERFACES = soundsettingsbase.ui
+CONFIG += qt warn_on quick-app
+HEADERS = soundsettings.h soundsettingsbase.h
+SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2
-TARGET = sound
+LIBS += -lqpe -lopiecore2
+TARGET = sound
include ( $(OPIEDIR)/include.pro )
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
@@ -21,20 +21,24 @@
#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>
@@ -73,7 +77,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
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;
}
}
@@ -85,7 +89,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
#else
#endif
int sRate=cfg.readNumEntry("SizeLimit", 30);
- qDebug("%d",sRate);
+ odebug << "" << sRate << "" << oendl;
if(sRate ==30)
timeLimitComboBox->setCurrentItem(0);
@@ -143,7 +147,7 @@ void SoundSettings::updateStorageCombo() {
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;
@@ -152,7 +156,7 @@ void SoundSettings::updateStorageCombo() {
}
LocationComboBox->insertStringList(list);
- qDebug("set item %d", set);
+ odebug << "set item " << set << "" << oendl;
LocationComboBox->setCurrentItem(set);
}
@@ -160,7 +164,7 @@ 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();
}
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
@@ -19,6 +19,7 @@
#include "benchmarkinfo.h"
/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/ostorageinfo.h>
#include <opie2/olistview.h>
#include <qpe/qpeapplication.h>
@@ -26,6 +27,8 @@
#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>
@@ -51,10 +54,7 @@
#define round qRound
#endif
-using namespace Opie::Ui;
-using namespace Opie::Core;
extern "C"
-
{
void BenchFFT( void );
double dhry_main( int );
@@ -148,7 +148,7 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
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 );
@@ -173,7 +173,7 @@ 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();
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
@@ -63,7 +63,7 @@ TabManager::~TabManager(){
* 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);
@@ -207,7 +207,7 @@ 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;
}
@@ -244,7 +244,7 @@ void TabManager::editItem( QListViewItem * item){
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;
}
@@ -273,7 +273,7 @@ void TabManager::editItem( QListViewItem * item){
imageOfFile.convertFromImage(foo);
application->iconLineEdit->insertItem(imageOfFile,fileName);
}
- //qDebug(fi->fileName().latin1());
+ //odebug << fi->fileName().latin1() << oendl;
++it;
}
waitDialog.hide();
@@ -402,8 +402,8 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){
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);
@@ -415,7 +415,7 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){
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);
@@ -464,7 +464,7 @@ 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;
@@ -479,7 +479,7 @@ 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;
}
@@ -496,7 +496,7 @@ 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 );
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
@@ -11,8 +11,11 @@
#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>
@@ -26,15 +29,10 @@
#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;
@@ -245,7 +243,7 @@ bool UserDialog::addUser(int uid, int gid)
{
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(),
@@ -374,7 +372,7 @@ bool UserDialog::editUser(const char *username)
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 )
{
@@ -389,7 +387,7 @@ bool UserDialog::editUser(const char *username)
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 )
{
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
@@ -9,12 +9,15 @@
#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>
/**
@@ -253,5 +256,5 @@ 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,10 +1,9 @@
-#CONFIG = qt warn_on
-CONFIG = qt warn_on quick-app
+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
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2 -lopieui2 -lcrypt
-TARGET = usermanager
+DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lqpe -lopiecore2 -lopieui2 -lcrypt
+TARGET = usermanager
include ( $(OPIEDIR)/include.pro )
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
@@ -11,12 +11,19 @@
#define INCLUDE_MENUITEM_DEF
#endif
-#include <qmenudata.h>
#include "liquid.h"
-//#include "liquiddeco.h"
-#include <qapplication.h>
+#include "effects.h"
+#include "htmlmasks.h"
+#include "embeddata.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/config.h>
-#include "effects.h"
+using namespace Opie::Core;
+
+/* QT */
+#include <qmenudata.h>
+#include <qapplication.h>
#include <qpalette.h>
#include <qbitmap.h>
#include <qtabbar.h>
@@ -31,17 +38,15 @@
#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);
@@ -149,7 +154,7 @@ 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"))
@@ -494,7 +499,7 @@ 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)
@@ -860,7 +865,7 @@ 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) &&
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
@@ -1,5 +1,5 @@
TEMPLATE = lib
-CONFIG = qt plugin embedded warn_on
+CONFIG = qt plugin embedded warn_on
SOURCES = liquid.cpp \
effects.cpp \
liquidset.cpp \
@@ -10,10 +10,10 @@ HEADERS = liquid.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
@@ -15,24 +15,26 @@
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>
+#include <qpe/config.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>
@@ -262,27 +264,21 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ )
}
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
@@ -295,7 +291,6 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ )
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
@@ -407,7 +402,7 @@ OThemePixmap* OThemeBase::scale( int w, int h, WidgetType 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 {
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,5 +1,4 @@
TEMPLATE = lib
-#CONFIG -= moc
CONFIG += qt plugin
# Input
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
@@ -16,9 +16,14 @@
#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>
@@ -26,8 +31,6 @@
#include <qobject.h>
#include <qlayout.h>
-using namespace Opie::Core;
-using namespace Opie::Ui;
FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name )
{
@@ -67,7 +70,7 @@ void FortunePluginWidget::getFortune() {
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,5 +1,12 @@
#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>
@@ -9,16 +16,11 @@
#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 ) {
@@ -54,7 +56,7 @@ 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;
/*
@@ -76,7 +78,7 @@ void InputDialog::doLookup() {
}
void InputDialog::showBrowser(OProcess*) {
- qDebug("BLAH");
+ odebug << "BLAH" << oendl;
QString tempHtml = "/tmp/stockticker.html";
HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup");
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,5 +1,4 @@
TEMPLATE = lib
-CONFIG -= moc
CONFIG += qt plugin
HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \
@@ -20,8 +19,8 @@ INCLUDEPATH += $(OPIEDIR)/include \
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
@@ -45,7 +45,7 @@ void getStocks(char *blah) {
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;
@@ -278,7 +278,7 @@ void getStocks(char *blah) {
}
void StockTickerPluginWidget::checkConnection() {
- // qDebug("checking connection");
+ // odebug << "checking connection" << oendl;
// Sock = new QSocket( this );
// if( wasError)
@@ -289,13 +289,13 @@ void getStocks(char *blah) {
// 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();
@@ -304,7 +304,7 @@ void getStocks(char *blah) {
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
@@ -101,7 +101,7 @@ void Engine::pushValue (char v)
};
if (!ok) {
state = sError;
- qDebug("pushValue() - num->string conversion");
+ odebug << "pushValue() - num->string conversion" << oendl;
} else {
const QString constString = displayString;
emit(display(constString));
@@ -127,7 +127,7 @@ void Engine::del ()
num.dbl=displayString.toDouble(&ok);
break;
case rFraction:
- qDebug("not available");
+ odebug << "not available" << oendl;
break;
default:
displayString.truncate(displayString.length());
@@ -136,7 +136,7 @@ void Engine::del ()
if (!ok) {
state = sError;
- qDebug("del() - num->string conversion");
+ odebug << "del() - num->string conversion" << oendl;
} else {
const QString constString = displayString;
emit(display(constString));
@@ -149,7 +149,7 @@ void Engine::displayData(Data d) {
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());
@@ -172,7 +172,7 @@ int Engine::calcBase () {
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
@@ -1,8 +1,8 @@
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = calculatorimpl.h
SOURCES = calculatorimpl.cpp \
main.cpp
-INCLUDEPATH += $(OPIEDIR)/include
+INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopiecore2
INTERFACES = calculator.ui
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
@@ -26,10 +26,14 @@
#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>
@@ -39,7 +43,10 @@
#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 */
@@ -233,7 +240,7 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
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);
}
@@ -507,7 +514,7 @@ void CalculatorImpl::execOp( Operation i )
return;
processStack( oAdd );
if ( operationStack.top().operation != oOpenBrace )
- qDebug( "Calculator: internal Error" );
+ odebug << "Calculator: internal Error" << oendl;
operationStack.pop();
state = sNewNumber;
numOpenBraces--;
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
@@ -11,13 +11,14 @@
#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>
@@ -35,6 +36,7 @@
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
+#include <qtoolbar.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlayout.h>
@@ -238,12 +240,12 @@ void FormatterApp::doFormat()
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;
@@ -256,7 +258,7 @@ void FormatterApp::doFormat()
{
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;
@@ -272,7 +274,7 @@ 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);
@@ -281,7 +283,7 @@ void FormatterApp::doFormat()
{
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");
@@ -305,7 +307,7 @@ void FormatterApp::doFormat()
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") );
}
@@ -380,7 +382,7 @@ void FormatterApp::storageComboSelected(int index )
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))
@@ -464,7 +466,7 @@ void FormatterApp::parsetab(const QString &fileName)
& filesystemType.find("auto",0,TRUE) == -1)
fsList << filesystemType;
deviceList << deviceName;
- qDebug(deviceName+"::"+filesystemType);
+ odebug << deviceName+"::"+filesystemType << oendl;
fileSystemTypeList << deviceName+"::"+filesystemType;
}
}
@@ -506,7 +508,7 @@ QString FormatterApp::getFileSystemType(const QString &currentText)
if( temp.find( currentText,0,TRUE) != -1)
{
return temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
- // qDebug(fsType);
+ // odebug << fsType << oendl;
}
}
return "";
@@ -533,7 +535,7 @@ bool FormatterApp::doFsck()
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";
@@ -547,12 +549,12 @@ bool FormatterApp::doFsck()
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;
@@ -565,7 +567,7 @@ bool FormatterApp::doFsck()
{
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);
@@ -587,7 +589,7 @@ bool FormatterApp::doFsck()
{
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");
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
@@ -1,9 +1,9 @@
-CONFIG += qt warn_on quick-app
-HEADERS = formatter.h inputDialog.h output.h
-SOURCES = formatter.cpp inputDialog.cpp output.cpp main.cpp
-TARGET = formatter
+CONFIG += qt warn_on quick-app
+HEADERS = formatter.h inputDialog.h output.h
+SOURCES = formatter.cpp inputDialog.cpp output.cpp main.cpp
+TARGET = formatter
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2
+LIBS += -lqpe -lopiecore2
include ( $(OPIEDIR)/include.pro )