From 7531a620650cdf0985525775ca84160933e99f26 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 23 Dec 2014 08:46:02 -0500 Subject: Clean up all the Qt5 *.pro files a bit. Now they should always work. Also do a large clean up of the file operations in lumina-fm: 1) When doing copies of directories, make sure to properly copy all child files/dirs (no matter how deep) 2) Clean the order of directory copies so that you can successfull make a copy of a directory into itself (copy ~/Test -> ~/Test/Test for example) 3) Check for attempting to *move* a directory into itself and show a warning to the user about an invalid operation. 4) Get the total number of files/dirs to be operated on before starting operations. This allows the UI to be more detailed about what it is doing at that particular time. 5) If a directory fails to copy for some reason, don't try to copy all the children of that directory either (they will all fail and just bloat the list of errors) --- lumina-fm/MainUI.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'lumina-fm/MainUI.cpp') diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 03e7a533..f77d8290 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -1105,12 +1105,17 @@ void MainUI::RemoveItem(){ if(!checkUserPerms()){ return; } //Get the selected items QStringList paths, names; - QFileInfoList sel = getSelectedItems(); - for(int i=0; i" << newcopy; FODialog dlg(this); dlg.CopyFiles(copy, newcopy); + dlg.show(); dlg.exec(); errs = errs || !dlg.noerrors; } @@ -1255,6 +1264,7 @@ void MainUI::PasteItems(){ qDebug() << "Paste Cut:" << cut << "->" << newcut; FODialog dlg(this); dlg.MoveFiles(cut, newcut); + dlg.show(); dlg.exec(); errs = errs || !dlg.noerrors; } -- cgit