mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-17 15:31:20 +00:00
Prevent "Two clicks renaming" if the selected file/folder is not movable
Summary: 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: https://phabricator.kde.org/D8740
This commit is contained in:
parent
0905b13dc4
commit
fa04e37569
|
@ -1125,10 +1125,14 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons
|
||||||
void DolphinView::slotSelectedItemTextPressed(int index)
|
void DolphinView::slotSelectedItemTextPressed(int index)
|
||||||
{
|
{
|
||||||
if (GeneralSettings::renameInline()) {
|
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();
|
||||||
m_twoClicksRenamingTimer->start(QApplication::doubleClickInterval());
|
m_twoClicksRenamingTimer->start(QApplication::doubleClickInterval());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DolphinView::slotItemCreated(const QUrl& url)
|
void DolphinView::slotItemCreated(const QUrl& url)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue