Commit 1d125057 authored by Jan Paul Batrina's avatar Jan Paul Batrina Committed by Méven Car
Browse files

FoldersPanel: Fix inline renaming

Commit 5a0da4a9 changed the value
for emitRoleEditingFinished() to a struct containing
the new name, but folderspanel was not updated.

BUG: 441124
parent 542e2a21
Pipeline #76776 passed with stage
in 5 minutes and 27 seconds
......@@ -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);
......
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