-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 137 |
1 files changed, 80 insertions, 57 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 4802771..f25048a 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -158,4 +158,7 @@ void AdvancedFm::doDelete() { return; break; + default: + return; + break; }; } @@ -179,25 +182,30 @@ void AdvancedFm::doDelete() { tr("Yes"), tr("No"), 0, 0, 1) ) { case 0: - { - f=f.left(f.length()-1); - QString cmd="rm -rf "+f; - startProcess( (const QString)cmd.latin1() ); - populateView(); - } - break; + { + f=f.left(f.length()-1); + QString cmd="rm -rf "+f; + startProcess( (const QString)cmd.latin1() ); + populateView(); + } + break; case 1: - // exit - break; + // exit + break; + default: + break; }; } else { if(doMsg) { - switch ( QMessageBox::warning(this,tr("Delete"), - tr("<p>Really delete %1?</p>").arg( myFile ), - tr("Yes"), tr("No"), 0, 0, 1) ) { - case 1: - return; - break; - }; + switch ( QMessageBox::warning(this,tr("Delete"), + tr("<p>Really delete %1?</p>").arg( myFile ), + tr("Yes"), tr("No"), 0, 0, 1) ) { + case 1: + return; + break; + default: + return; + break; + }; } @@ -285,10 +293,13 @@ void AdvancedFm::copy() { ,tr("Yes"),tr("No"),0,0,1) ) { - case 0: - doMsg=false; - break; - case 1: - return; - break; + case 0: + doMsg=false; + break; + case 1: + return; + break; + default: + return; + break; }; } @@ -309,11 +320,14 @@ void AdvancedFm::copy() { if( f.exists()) { if(doMsg) { - switch ( QMessageBox::warning(this,tr("File Exists!"), - tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), - tr("Yes"),tr("No"),0,0,1)) { - case 1: - return; - break; - }; + switch ( QMessageBox::warning(this,tr("File Exists!"), + tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), + tr("Yes"),tr("No"),0,0,1)) { + case 1: + return; + break; + default: + return; + break; + }; } f.remove(); @@ -358,14 +372,17 @@ void AdvancedFm::copyAs() { QFile f( destFile); if( f.exists()) { - switch (QMessageBox::warning(this,tr("File Exists!"), - tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), - tr("Yes"),tr("No"),0,0,1) ) { - case 0: - f.remove(); - break; - case 1: - return; - break; - }; + switch (QMessageBox::warning(this,tr("File Exists!"), + tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), + tr("Yes"),tr("No"),0,0,1) ) { + case 0: + f.remove(); + break; + case 1: + return; + break; + default: + return; + break; + }; } if( !copyFile( curFile, destFile) ) { @@ -410,15 +427,18 @@ void AdvancedFm::copySameDir() { QFile f(destFile); if( f.exists()) { - switch (QMessageBox::warning(this,tr("Delete"), - tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), - tr("Yes"),tr("No"),0,0,1) ) { - case 0: - - f.remove(); - break; - case 1: - return; - break; - }; + switch (QMessageBox::warning(this,tr("Delete"), + tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), + tr("Yes"),tr("No"),0,0,1) ) { + case 0: + + f.remove(); + break; + case 1: + return; + break; + default: + return; + break; + }; } if(!copyFile( curFile,destFile) ) { @@ -468,11 +488,14 @@ void AdvancedFm::move() { QFile f( destFile); if( f.exists()) { - switch ( QMessageBox::warning(this,tr("File Exists!"), - tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile), - tr("Yes"),tr("No"),0,0,1)) { - case 1: - return; - break; - }; + switch ( QMessageBox::warning(this,tr("File Exists!"), + tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile), + tr("Yes"),tr("No"),0,0,1)) { + case 1: + return; + break; + default: + return; + break; + }; if( !copyFile( curFile, destFile) ) { QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg(curFile)); |