┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2012-12-12 22:57:20 +0100
committerEmmanuel Pescosta <[email protected]>2012-12-12 22:57:20 +0100
commitfe5c03fb588792a454552bf805b15300768f16f8 (patch)
treecadc22c3f99cfb369b7e313ff9c18d7a8614a92e /src
parentc52d57d872b5ac6d113ad16ebbeda6e667be33e9 (diff)
Fix Bug 240820 - [Usability Bug] Handling Bad Filenames, dolphin gives unclear error message
Fix Bug 308597 - Regression: Renaming a file/folder to something that contains a "/" will result in several message boxes Uses the same solution as Dolphin-Rename-Dialog does. (KIO::encodeFileName) BUG: 240820 BUG: 308597 REVIEW: 107681 FIXED-IN: 4.9.5
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/private/kitemlistroleeditor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp
index 1e4b5fd4e..4f4006010 100644
--- a/src/kitemviews/private/kitemlistroleeditor.cpp
+++ b/src/kitemviews/private/kitemlistroleeditor.cpp
@@ -20,6 +20,7 @@
#include "kitemlistroleeditor.h"
#include <KDebug>
+#include <kio/global.h>
#include <QKeyEvent>
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()));
}
}