From: Jan Paul Batrina Date: Thu, 19 Aug 2021 14:34:40 +0000 (+0800) Subject: FoldersPanel: Fix inline renaming X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/1d125057cb6318bca795fd4a153c2675c881a9d1?ds=sidebyside FoldersPanel: Fix inline renaming Commit 5a0da4a9c8d10dc1921077d84bdabf05d20150b0 changed the value for emitRoleEditingFinished() to a struct containing the new name, but folderspanel was not updated. BUG: 441124 --- diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 82b2e1b12..19a05d2b6 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -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(); + 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);