Commit 12ba7f30 authored by Isa Kindov's avatar Isa Kindov
parent e755b5f0
...@@ -403,7 +403,7 @@ void UBLibraryController::trashElements(QList<UBLibElement*> trashList) ...@@ -403,7 +403,7 @@ void UBLibraryController::trashElements(QList<UBLibElement*> trashList)
void UBLibraryController::emptyElementsOnTrash( QList<UBLibElement*> elementsList) void UBLibraryController::emptyElementsOnTrash( QList<UBLibElement*> elementsList)
{ {
foreach(UBLibElement* eachElement, elementsList) { foreach(UBLibElement* eachElement, elementsList) {
if (eachElement->type() == eUBLibElementType_Folder) if (QFileInfo(eachElement->path().toLocalFile()).isDir())
UBFileSystemUtils::deleteDir(eachElement->path().toLocalFile()); UBFileSystemUtils::deleteDir(eachElement->path().toLocalFile());
else else
QFile::remove(eachElement->path().toLocalFile()); QFile::remove(eachElement->path().toLocalFile());
...@@ -412,10 +412,6 @@ void UBLibraryController::emptyElementsOnTrash( QList<UBLibElement*> elementsLis ...@@ -412,10 +412,6 @@ void UBLibraryController::emptyElementsOnTrash( QList<UBLibElement*> elementsLis
void UBLibraryController::cleanElementsList() void UBLibraryController::cleanElementsList()
{ {
// qDebug() << "cleanElementsList()";
// qDebug() << this;
// foreach(UBLibElement*eachElement, mElementsList)
// qDebug() << eachElement;
qDeleteAll(mElementsList); qDeleteAll(mElementsList);
mElementsList.clear(); mElementsList.clear();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment