mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
FoldersPanel: Fix inline renaming
Commit 5a0da4a9c8
changed the value
for emitRoleEditingFinished() to a struct containing
the new name, but folderspanel was not updated.
BUG: 441124
This commit is contained in:
parent
542e2a214a
commit
1d125057cb
|
@ -15,6 +15,7 @@
|
|||
#include "kitemviews/kitemlistcontainer.h"
|
||||
#include "kitemviews/kitemlistcontroller.h"
|
||||
#include "kitemviews/kitemlistselectionmanager.h"
|
||||
#include "kitemviews/private/kitemlistroleeditor.h"
|
||||
#include "treeviewcontextmenu.h"
|
||||
#include "views/draganddrophelper.h"
|
||||
|
||||
|
@ -245,7 +246,8 @@ void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, co
|
|||
{
|
||||
if (role == "text") {
|
||||
const KFileItem item = m_model->fileItem(index);
|
||||
const QString newName = value.toString();
|
||||
const EditResult retVal = value.value<EditResult>();
|
||||
const QString newName = retVal.newName;
|
||||
if (!newName.isEmpty() && newName != item.text() && newName != QLatin1Char('.') && newName != QLatin1String("..")) {
|
||||
const QUrl oldUrl = item.url();
|
||||
QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename);
|
||||
|
|
Loading…
Reference in a new issue