summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-05-29 01:18:11 (UTC)
committer llornkcor <llornkcor>2003-05-29 01:18:11 (UTC)
commit74f2f13e53b066eb461154f11f156bb4ce9c0646 (patch) (side-by-side diff)
tree94c8a576edd980e294a50acb95f2fdc08e1e278c
parent52047fd3d3f30509d65834747c3a0c5c6760dc01 (diff)
downloadopie-74f2f13e53b066eb461154f11f156bb4ce9c0646.zip
opie-74f2f13e53b066eb461154f11f156bb4ce9c0646.tar.gz
opie-74f2f13e53b066eb461154f11f156bb4ce9c0646.tar.bz2
fix tr and clean up compile
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/formatter/formatter.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp
index cca0c26..21de4d2 100644
--- a/noncore/tools/formatter/formatter.cpp
+++ b/noncore/tools/formatter/formatter.cpp
@@ -22,9 +22,10 @@
#include <qmultilineedit.h>
#include <qstring.h>
+#include <qlist.h>
#include <qstringlist.h>
#include <qdir.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <qtstream.h>
#include <qcombobox.h>
@@ -54,5 +55,5 @@
/*
Blah blah blah blah */
-FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFlags fl )
+FormatterApp::FormatterApp( QWidget* parent, const char* name, bool , WFlags fl )
: QMainWindow( parent, name, fl )
// : QDialog( parent, name, modal, fl )
@@ -123,5 +124,5 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFla
"Changing parameters on this \n"
"page may cause your system \n"
- "to stop functioning properly!!" ) );//idiot message
+ "to stop functioning properly!" ) );//idiot message
tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1);
@@ -204,6 +205,12 @@ void FormatterApp::doFormat() {
}
- switch ( QMessageBox::warning(this,tr("Format?!?"),tr("Really format\n") +diskName+" "+ currentText +
- tr("\nwith ") + fs + tr(" filesystem?!?\nYou will loose all data!!"),tr("Yes"),tr("No"),0,1,1) ) {
+ switch ( QMessageBox::warning(this,tr("Format?")
+ , tr("Really format\n") +diskName+" "+ currentText +
+ tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs )
+ ,tr("Yes")
+ ,tr("No")
+ ,0
+ ,1
+ ,1) ) {
case 0: {
if(fs == "vfat")
@@ -222,5 +229,7 @@ void FormatterApp::doFormat() {
FILE *fp;
char line[130];
- outDlg->OutputEdit->append( tr("Trying to umount.") + currentText );
+
+
+ outDlg->OutputEdit->append( tr("Trying to umount %1.").arg( currentText) );
outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE);
@@ -228,5 +237,5 @@ void FormatterApp::doFormat() {
qDebug("Command is "+umountS);
fp = popen( (const char *) umountS, "r");
- qDebug("%d", fp);
+ // qDebug("%d", fp);
if ( !fp ) {
qDebug("Could not execute '" + umountS + "'! err=%d\n" +(QString)strerror(errno), err);
@@ -277,5 +286,5 @@ void FormatterApp::doFormat() {
pclose(fp);
- outDlg->OutputEdit->append( tr("Trying to mount.") + currentText );
+ outDlg->OutputEdit->append( tr("Trying to mount %1.").arg( currentText) );
outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE);
fp = popen( (const char *) remountS, "r");
@@ -285,5 +294,5 @@ void FormatterApp::doFormat() {
} else {
- outDlg->OutputEdit->append( currentText + tr("\nhas been successfully mounted."));
+ outDlg->OutputEdit->append(tr("%1\nhas been successfully mounted.").arg( currentText ));
while ( fgets( line, sizeof line, fp)) {
QString lineStr = line;
@@ -336,5 +345,5 @@ void FormatterApp::fillCombos() {
-void FormatterApp::fsComboSelected(int index) {
+void FormatterApp::fsComboSelected(int ) {
}
@@ -345,5 +354,5 @@ void FormatterApp::storageComboSelected(int index ) {
QString nameS = currentText.left( currentText.find("->",0,TRUE));
- TextLabel4->setText( tr( "Storage Type : ") + nameS );
+ TextLabel4->setText( tr( "Storage Type: %1").arg( nameS) );
currentText = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4);
@@ -392,5 +401,5 @@ void FormatterApp::deviceComboSelected(int index) {
fsType = getFileSystemType((const QString &)selectedText);
- TextLabel5->setText("Type: "+ nameS+"\nFormatted with "+ fsType + " \n" + totalS + usedS + avS);
+ TextLabel5->setText(tr("Type: %1\nFormatted with %1\n%1, %1, %1").arg( nameS).arg( fsType).arg(totalS).arg( usedS).arg( avS ));
// storageComboSelected(0);
}
@@ -564,10 +573,10 @@ bool FormatterApp::doFsckCheck() {
}
-int FormatterApp::formatCheck(const QString &deviceStr) {
+int FormatterApp::formatCheck(const QString &) {
return -1;
}
-int FormatterApp::runCommand(const QString &command) {
+int FormatterApp::runCommand(const QString &) {
return -1;