┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <[email protected]>2013-05-07 15:37:27 +0530
committerVishesh Handa <[email protected]>2013-05-28 21:21:27 +0530
commitc69ebd1e0c5ae1803f2e7e01d433168aba57115f (patch)
tree53fca0b275ebc975f2769f52bf7a3b99b15d7284
parentc756bc6c8946a05dc4c61169ca3a677618e39256 (diff)
PlacesPanel: Do not allow drop events into timeline or search folder
They are read only. You cannot modify them, so it makes no point showing the "Move/Copy Into" context menu. REVIEW: 110348
-rw-r--r--src/panels/places/placespanel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index 0f5b83ad5..d5308eabe 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -332,6 +332,12 @@ void PlacesPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
return;
}
+ const PlacesItem* destItem = m_model->placesItem(index);
+ const PlacesItem::GroupType group = destItem->groupType();
+ if (group == PlacesItem::SearchForType || group == PlacesItem::RecentlyAccessedType) {
+ return;
+ }
+
if (m_model->storageSetupNeeded(index)) {
connect(m_model, SIGNAL(storageSetupDone(int,bool)),
this, SLOT(slotItemDropEventStorageSetupDone(int,bool)));
@@ -356,7 +362,7 @@ void PlacesPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
return;
}
- KUrl destUrl = m_model->placesItem(index)->url();
+ KUrl destUrl = destItem->url();
QDropEvent dropEvent(event->pos().toPoint(),
event->possibleActions(),
event->mimeData(),