aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-28 11:46:17 -0400
committerKen Moore <ken@pcbsd.org>2015-05-28 11:46:17 -0400
commita9bc35756f87ecc59959cace0534e81ffa3d9b44 (patch)
tree370717071d6c5e2c262d43a81d3b8ad003e89db4
parentAdd new options to the system-wide settings configuration file: (diff)
downloadlumina-a9bc35756f87ecc59959cace0534e81ffa3d9b44.tar.gz
lumina-a9bc35756f87ecc59959cace0534e81ffa3d9b44.tar.bz2
lumina-a9bc35756f87ecc59959cace0534e81ffa3d9b44.zip
Allow the desktopview plugin the ability to remove directories as well (not just files)
-rw-r--r--lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
index 467b802b..991abf2e 100644
--- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
@@ -97,7 +97,11 @@ void DesktopViewPlugin::cutItems(){
void DesktopViewPlugin::deleteItems(){
QList<QListWidgetItem*> sel = list->selectedItems();
for(int i=0; i<sel.length(); i++){
- QFile::remove(sel[i]->whatsThis());
+ if(QFileInfo(sel[i]->whatsThis()).isDir()){
+ QProcess::startDetached("rm -r \""+sel[i]->whatsThis()+"\"");
+ }else{
+ QFile::remove(sel[i]->whatsThis());
+ }
}
}
bgstack15