author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/tools/formatter/formatter.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/tools/formatter/formatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
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 @@ -13,3 +13,3 @@ /* OPIE */ -#include <qtoolbar.h> +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> @@ -20,2 +20,3 @@ #include <qpe/storage.h> +using namespace Opie::Core; @@ -37,2 +38,3 @@ #include <qpushbutton.h> +#include <qtoolbar.h> #include <qtabwidget.h> @@ -240,8 +242,8 @@ 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") ); @@ -258,3 +260,3 @@ void FormatterApp::doFormat() { - 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") ); @@ -274,3 +276,3 @@ void FormatterApp::doFormat() - qDebug("Command would be: "+cmd); + odebug << "Command would be: "+cmd << oendl; outDlg->OutputEdit->append( tr("Trying to format.") ); @@ -283,3 +285,3 @@ void FormatterApp::doFormat() { - qDebug("No such device '" + umountS); + odebug << "No such device '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("No such device!"), tr("&OK") ); @@ -307,3 +309,3 @@ void FormatterApp::doFormat() { - 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") ); @@ -382,3 +384,3 @@ void FormatterApp::storageComboSelected(int index ) QString fsType = getFileSystemType((const QString &) currentText); - // qDebug(fsType); + // odebug << fsType << oendl; for(int i = 0; i < fileSystemsCombo->count(); i++) @@ -466,3 +468,3 @@ void FormatterApp::parsetab(const QString &fileName) deviceList << deviceName; - qDebug(deviceName+"::"+filesystemType); + odebug << deviceName+"::"+filesystemType << oendl; fileSystemTypeList << deviceName+"::"+filesystemType; @@ -508,3 +510,3 @@ QString FormatterApp::getFileSystemType(const QString ¤tText) return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); - // qDebug(fsType); + // odebug << fsType << oendl; } @@ -535,3 +537,3 @@ bool FormatterApp::doFsck() QString cmd; - qDebug( selectedDevice +" "+ fsType); + odebug << selectedDevice +" "+ fsType << oendl; if(fsType == "vfat") cmd = "dosfsck -vy "; @@ -549,8 +551,8 @@ 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") ); @@ -567,3 +569,3 @@ bool FormatterApp::doFsck() { - qDebug("Could not find '" + umountS); + odebug << "Could not find '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), @@ -589,3 +591,3 @@ bool FormatterApp::doFsck() { - qDebug("No such device '" + umountS); + odebug << "No such device '" + umountS << oendl; QMessageBox::warning( this, tr("Formatter"), tr("No such device!"), tr("&OK") ); |