summaryrefslogtreecommitdiff
path: root/noncore/tools
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 /noncore/tools
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/tools') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/calc2/engine.cpp10
-rw-r--r--noncore/tools/calculator/calculator.pro0
-rw-r--r--noncore/tools/calculator/calculatorimpl.cpp11
-rw-r--r--noncore/tools/formatter/formatter.cpp36
-rw-r--r--noncore/tools/formatter/formatter.pro0
5 files changed, 33 insertions, 24 deletions
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
@@ -102,5 +102,5 @@ 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;
@@ -128,5 +128,5 @@ void Engine::del ()
break;
case rFraction:
- qDebug("not available");
+ odebug << "not available" << oendl;
break;
default:
@@ -137,5 +137,5 @@ void Engine::del ()
if (!ok) {
state = sError;
- qDebug("del() - num->string conversion");
+ odebug << "del() - num->string conversion" << oendl;
} else {
const QString constString = displayString;
@@ -150,5 +150,5 @@ void Engine::displayData(Data d) {
break;
case rFraction:
- qDebug("fractional display not yet impl");
+ odebug << "fractional display not yet impl" << oendl;
break;
default:
@@ -173,5 +173,5 @@ int Engine::calcBase () {
default:
state = sError;
- qDebug("Error - attempt to calc base for non-integer");
+ odebug << "Error - attempt to calc base for non-integer" << oendl;
return 10;
};
diff --git a/noncore/tools/calculator/calculator.pro b/noncore/tools/calculator/calculator.pro
index ae6a666..78d4519 100644
--- a/noncore/tools/calculator/calculator.pro
+++ b/noncore/tools/calculator/calculator.pro
diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp
index dead03d..05cb9b5 100644
--- a/noncore/tools/calculator/calculatorimpl.cpp
+++ b/noncore/tools/calculator/calculatorimpl.cpp
@@ -27,8 +27,12 @@
#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>
@@ -40,5 +44,8 @@
#include <qtextstream.h>
#include <qmessagebox.h>
+
+/* STD */
#include <math.h>
+
/* XPM */
static char *oneoverx_xpm[] = {
@@ -234,5 +241,5 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
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);
@@ -508,5 +515,5 @@ void CalculatorImpl::execOp( Operation i )
processStack( oAdd );
if ( operationStack.top().operation != oOpenBrace )
- qDebug( "Calculator: internal Error" );
+ odebug << "Calculator: internal Error" << oendl;
operationStack.pop();
state = sNewNumber;
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
@@ -12,5 +12,5 @@
/* OPIE */
-#include <qtoolbar.h>
+#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
@@ -19,4 +19,5 @@
#include <qpe/qcopenvelope_qws.h>
#include <qpe/storage.h>
+using namespace Opie::Core;
/* QT */
@@ -36,4 +37,5 @@
#include <qlineedit.h>
#include <qpushbutton.h>
+#include <qtoolbar.h>
#include <qtabwidget.h>
#include <qwidget.h>
@@ -239,10 +241,10 @@ void FormatterApp::doFormat()
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);
@@ -257,5 +259,5 @@ 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);
@@ -273,5 +275,5 @@ 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);
@@ -282,5 +284,5 @@ 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);
@@ -306,5 +308,5 @@ void FormatterApp::doFormat()
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") );
@@ -381,5 +383,5 @@ void FormatterApp::storageComboSelected(int index )
QString fsType = getFileSystemType((const QString &) currentText);
- // qDebug(fsType);
+ // odebug << fsType << oendl;
for(int i = 0; i < fileSystemsCombo->count(); i++)
{
@@ -465,5 +467,5 @@ void FormatterApp::parsetab(const QString &fileName)
fsList << filesystemType;
deviceList << deviceName;
- qDebug(deviceName+"::"+filesystemType);
+ odebug << deviceName+"::"+filesystemType << oendl;
fileSystemTypeList << deviceName+"::"+filesystemType;
}
@@ -507,5 +509,5 @@ QString FormatterApp::getFileSystemType(const QString &currentText)
{
return temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
- // qDebug(fsType);
+ // odebug << fsType << oendl;
}
}
@@ -534,5 +536,5 @@ 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 ";
@@ -548,10 +550,10 @@ bool FormatterApp::doFsck()
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);
@@ -566,5 +568,5 @@ 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") );
@@ -588,5 +590,5 @@ 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);
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