From 398162a1be83d7f3c3645b44a10a165f769e5f59 Mon Sep 17 00:00:00 2001 From: Arjun AK Date: Sun, 21 Sep 2014 17:01:51 +0530 Subject: [PATCH] Do not allow files or folders inside trash to be added to dolphin's places panel REVIEW: 120286 BUG: 339204 FIXED-IN: 4.14.2 --- src/panels/places/placesitemmodel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 1f05e07f95..2ac2169586 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -432,8 +432,9 @@ void PlacesItemModel::dropMimeDataBefore(int index, const QMimeData* mimeData) text = url.host(); } - if (url.isLocalFile() && !QFileInfo(url.toLocalFile()).isDir()) { - // Only directories are allowed + if ((url.isLocalFile() && !QFileInfo(url.toLocalFile()).isDir()) + || url.protocol() == "trash") { + // Only directories outside the trash are allowed continue; }