summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp23
1 files changed, 23 insertions, 0 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
@@ -152,16 +152,19 @@ void AdvancedFm::doDelete() {
,tr("Yes"),tr("No"),0,0,1) )
{
case 0:
doMsg=false;
break;
case 1:
return;
break;
+ default:
+ return;
+ break;
};
}
QString myFile;
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
myFile = (*it);
if( myFile.find(" -> ",0,TRUE) != -1)
@@ -183,26 +186,31 @@ void AdvancedFm::doDelete() {
QString cmd="rm -rf "+f;
startProcess( (const QString)cmd.latin1() );
populateView();
}
break;
case 1:
// 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;
+ default:
+ return;
+ break;
};
}
QString cmd="rm "+f;
QFile file(f);
QFileInfo fi(myFile);
if( fi.fileName().find("../",0,TRUE)==-1) {
// odebug << "remove link files "+myFile << oendl;
@@ -285,16 +293,19 @@ void AdvancedFm::copy() {
,tr("Yes"),tr("No"),0,0,1) )
{
case 0:
doMsg=false;
break;
case 1:
return;
break;
+ default:
+ return;
+ break;
};
}
QString curFile, item, destFile;
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
item=(*it);
if(item.find("->",0,TRUE)) //symlink
item = item.left(item.find("->",0,TRUE));
@@ -309,16 +320,19 @@ 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;
+ default:
+ return;
+ break;
};
}
f.remove();
}
if( !copyFile( curFile, destFile) ) {
QMessageBox::message("AdvancedFm",
tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
@@ -361,16 +375,19 @@ void AdvancedFm::copyAs() {
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) ) {
QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
return;
}
}
delete fileDlg;
@@ -414,16 +431,19 @@ void AdvancedFm::copySameDir() {
tr("Yes"),tr("No"),0,0,1) ) {
case 0:
f.remove();
break;
case 1:
return;
break;
+ default:
+ return;
+ break;
};
}
if(!copyFile( curFile,destFile) ) {
QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
return;
}
// odebug << "copy "+curFile+" as "+destFile << oendl;
@@ -468,16 +488,19 @@ 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;
+ default:
+ return;
+ break;
};
if( !copyFile( curFile, destFile) ) {
QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg(curFile));
return;
} else
QFile::remove(curFile);
}
}