[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkde-baseapps=5D_dolphin/src/views=3A_Improves_79ccd?=
From: Matthias Fuchs <mat69 () gmx ! net>
Date: 2011-05-31 21:45:58
Message-ID: 20110531214558.7D23AA60A4 () git ! kde ! org
[Download RAW message or body]
Git commit d034afc892e21a0b8fd9147f1914d6b356413e10 by Matthias Fuchs.
Committed on 31/05/2011 at 23:42.
Pushed by mfuchs into branch 'master'.
Improves 79ccd0202d106a9c16b79a20cd79831a60dc5393 by allowing "/" in file names.
Though here "/" is not the ascii char '/' but the "unicode fraction slash" one, thus \
it is not taken as directory command. CCBUG:211751
REVIEW:101454
M +3 -3 dolphin/src/views/renamedialog.cpp
http://commits.kde.org/kde-baseapps/d034afc892e21a0b8fd9147f1914d6b356413e10
diff --git a/dolphin/src/views/renamedialog.cpp b/dolphin/src/views/renamedialog.cpp
index a14ba77..c0c6ad5 100644
--- a/dolphin/src/views/renamedialog.cpp
+++ b/dolphin/src/views/renamedialog.cpp
@@ -136,7 +136,7 @@ void RenameDialog::slotButtonClicked(int button)
Q_ASSERT(m_items.count() == 1);
const KUrl oldUrl = m_items.first().url();
KUrl newUrl = oldUrl;
- newUrl.setFileName(m_newName);
+ newUrl.setFileName(KIO::encodeFileName(m_newName));
KonqOperations::rename(this, oldUrl, newUrl);
} else {
renameItems();
@@ -148,7 +148,7 @@ void RenameDialog::slotButtonClicked(int button)
void RenameDialog::slotTextChanged(const QString& newName)
{
- bool enable = !newName.isEmpty() && (newName != QLatin1String("..")) && (newName \
!= QLatin1String(".")) && !newName.contains('/'); + bool enable = \
!newName.isEmpty() && (newName != QLatin1String("..")) && (newName != \
QLatin1String(".")); if (enable) {
if (m_renameOneItem) {
enable = enable && (newName != m_newName);
@@ -185,7 +185,7 @@ void RenameDialog::renameItems()
const KUrl oldUrl = item.url();
if (oldUrl.fileName() != newName) {
KUrl newUrl = oldUrl;
- newUrl.setFileName(newName);
+ newUrl.setFileName(KIO::encodeFileName(newName));
KonqOperations::rename(this, oldUrl, newUrl);
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic