mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
PlacesModel: Only allow folders to be pinned
It makes no sense to pin files. Plus the old PlacesModel from kdelibs had the same behaviour. REVIEW: 110347
This commit is contained in:
parent
c69ebd1e0c
commit
844738fb91
|
@ -444,6 +444,11 @@ void PlacesItemModel::dropMimeDataBefore(int index, const QMimeData* mimeData)
|
|||
text = url.host();
|
||||
}
|
||||
|
||||
if (url.isLocalFile() && !QFileInfo(url.toLocalFile()).isDir()) {
|
||||
// Only directories are allowed
|
||||
continue;
|
||||
}
|
||||
|
||||
PlacesItem* newItem = createPlacesItem(text, url);
|
||||
const int dropIndex = groupedDropIndex(index, newItem);
|
||||
insertItem(dropIndex, newItem);
|
||||
|
|
Loading…
Reference in a new issue