-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 36 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.pro | 10 |
2 files changed, 24 insertions, 22 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") ); 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,8 +1,8 @@ -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 |