Commit fa04e375 authored by Andreas Krutzler's avatar Andreas Krutzler Committed by Nathaniel Graham

Prevent "Two clicks renaming" if the selected file/folder is not movable

Two clicks renaming doesn't check if the user is actually allowed to rename a file/folder. With this patch, this get fixed.
Depends on D7647

Reviewers: rkflx, #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: elvisangelaccio, ngraham, #dolphin

Differential Revision:
parent 0905b13d
......@@ -1125,8 +1125,12 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons
void DolphinView::slotSelectedItemTextPressed(int index)
if (GeneralSettings::renameInline()) {
m_twoClicksRenamingItemUrl = m_model->fileItem(index).url();
const KFileItem item = m_model->fileItem(index);
const KFileItemListProperties capabilities(KFileItemList() << item);
if (capabilities.supportsMoving()) {
m_twoClicksRenamingItemUrl = item.url();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment