diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp index 1e4b5fd4e0..4f40060109 100644 --- a/src/kitemviews/private/kitemlistroleeditor.cpp +++ b/src/kitemviews/private/kitemlistroleeditor.cpp @@ -20,6 +20,7 @@ #include "kitemlistroleeditor.h" #include +#include #include KItemListRoleEditor::KItemListRoleEditor(QWidget *parent) : @@ -93,7 +94,7 @@ void KItemListRoleEditor::keyPressEvent(QKeyEvent* event) // a roleEditingFinished signal (see KItemListRoleEditor::event), // which is not wanted in this case. m_blockFinishedSignal = true; - emit roleEditingCanceled(m_index, m_role, toPlainText()); + emit roleEditingCanceled(m_index, m_role, KIO::encodeFileName(toPlainText())); m_blockFinishedSignal = false; event->accept(); return; @@ -137,7 +138,7 @@ void KItemListRoleEditor::autoAdjustSize() void KItemListRoleEditor::emitRoleEditingFinished() { if (!m_blockFinishedSignal) { - emit roleEditingFinished(m_index, m_role, toPlainText()); + emit roleEditingFinished(m_index, m_role, KIO::encodeFileName(toPlainText())); } }