mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
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
This commit is contained in:
parent
c756bc6c89
commit
c69ebd1e0c
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue