summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp137
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
@@ -159,2 +159,5 @@ void AdvancedFm::doDelete() {
break;
+ default:
+ return;
+ break;
};
@@ -180,12 +183,14 @@ void AdvancedFm::doDelete() {
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;
};
@@ -194,9 +199,12 @@ void AdvancedFm::doDelete() {
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;
+ };
}
@@ -286,8 +294,11 @@ void AdvancedFm::copy() {
{
- case 0:
- doMsg=false;
- break;
- case 1:
- return;
- break;
+ case 0:
+ doMsg=false;
+ break;
+ case 1:
+ return;
+ break;
+ default:
+ return;
+ break;
};
@@ -310,9 +321,12 @@ void AdvancedFm::copy() {
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;
+ };
}
@@ -359,12 +373,15 @@ void AdvancedFm::copyAs() {
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;
+ };
}
@@ -411,13 +428,16 @@ void AdvancedFm::copySameDir() {
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;
+ };
}
@@ -469,9 +489,12 @@ void AdvancedFm::move() {
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) ) {