} else if (action == hideAction) {
item->setHidden(hideAction->isChecked());
} else if (action == openInNewTabAction) {
- const KUrl url = m_model->item(index)->dataValue("url").value<KUrl>();
- emit placeMiddleClicked(url);
+ // TriggerItem does set up the storage first and then it will
+ // emit the slotItemMiddleClicked signal, because of Qt::MiddleButton.
+ triggerItem(index, Qt::MiddleButton);
} else if (action == teardownAction) {
m_model->requestTeardown(index);
} else if (action == ejectAction) {
return;
}
+ const PlacesItem* destItem = m_model->placesItem(index);
+ const PlacesItem::GroupType group = destItem->groupType();
+ if (group == PlacesItem::SearchForType || group == PlacesItem::RecentlySavedType) {
+ return;
+ }
+
if (m_model->storageSetupNeeded(index)) {
connect(m_model, SIGNAL(storageSetupDone(int,bool)),
this, SLOT(slotItemDropEventStorageSetupDone(int,bool)));
return;
}
- KUrl destUrl = m_model->placesItem(index)->url();
+ KUrl destUrl = destItem->url();
QDropEvent dropEvent(event->pos().toPoint(),
event->possibleActions(),
event->mimeData(),