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
@@ -23,2 +23,3 @@
#include <qstring.h>
+#include <qlist.h>
#include <qstringlist.h>
@@ -27,3 +28,3 @@
-#include <qtextstream.h>
+#include <qtstream.h>
@@ -55,3 +56,3 @@
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 )
@@ -124,3 +125,3 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFla
"page may cause your system \n"
- "to stop functioning properly!!" ) );//idiot message
+ "to stop functioning properly!" ) );//idiot message
@@ -205,4 +206,10 @@ 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: {
@@ -223,3 +230,5 @@ void FormatterApp::doFormat() {
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);
@@ -229,3 +238,3 @@ void FormatterApp::doFormat() {
fp = popen( (const char *) umountS, "r");
- qDebug("%d", fp);
+ // qDebug("%d", fp);
if ( !fp ) {
@@ -278,3 +287,3 @@ void FormatterApp::doFormat() {
- 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);
@@ -286,3 +295,3 @@ 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)) {
@@ -337,3 +346,3 @@ void FormatterApp::fillCombos() {
-void FormatterApp::fsComboSelected(int index) {
+void FormatterApp::fsComboSelected(int ) {
@@ -346,3 +355,3 @@ void FormatterApp::storageComboSelected(int index ) {
- TextLabel4->setText( tr( "Storage Type : ") + nameS );
+ TextLabel4->setText( tr( "Storage Type: %1").arg( nameS) );
currentText = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4);
@@ -393,3 +402,3 @@ void FormatterApp::deviceComboSelected(int index) {
- 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);
@@ -565,3 +574,3 @@ bool FormatterApp::doFsckCheck() {
-int FormatterApp::formatCheck(const QString &deviceStr) {
+int FormatterApp::formatCheck(const QString &) {
@@ -570,3 +579,3 @@ int FormatterApp::formatCheck(const QString &deviceStr) {
-int FormatterApp::runCommand(const QString &command) {
+int FormatterApp::runCommand(const QString &) {