Bug 317772 - "Replace..." does not work when trying to rename a file
Summary: "Replace..." does not work when trying to rename a file
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.2
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2013-04-03 08:53 UTC by boogiepoph
Modified: 2013-04-23 17:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.10.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description boogiepoph 2013-04-03 08:53:29 UTC
When I try to rename a file using the "Replace... (Ctrl + R)" option, everything works properly until the moment Dolphin tries to replace the characters, which stay unchanged. It happens with every

Reproducible: Always

Steps to Reproduce:
This is just an example, but this happens with every file
1. Select Symbols.pdf, then press F2 to rename.
2. Right click on the text (it does not matter if there is text selected or not), then click on "Replace..."
3. Text to find: s. Replacement text: t. Use default options. Click on "Replace"
4. Tell Dolphin to replace both "s". Dolphin tells me 2 replacements have been done.
Actual Results:  
The file is still named Symbols.pdf

Expected Results:  
The file should be named tymbolt.pdf

My Linux Distribution is Linux Mint KDE 14, with KDE 4.10, which I obtained from the Kubuntu Backports at Launchpad. However, the problem happened even when I was using the KDE 4.9 that comes with Mint.
Comment 1 Frank Reininghaus 2013-04-03 09:02:42 UTC
Thanks for the bug report. The problem is the following: as soon as the "rename inline" line edit loses focus (which happens when the "Replace" dialog pops up), the renaming is considered finished. Therefore, the changes in the text which are done via "Replace..." are lost.

In other words: it's impossible to fix this with the current design. IMHO, we should find a way to remove the "Replace..." entry from the context menu.
Comment 2 boogiepoph 2013-04-03 09:15:28 UTC
Thanks a lot for the fast answer :D. I hope there is some other way to implement some kind of complex renaming of files for Dolphin, although I guess there already are already other tools better suited for that.
Comment 3 Frank Reininghaus 2013-04-23 17:33:26 UTC
Git commit a16562cd55199e1daee496019cbea7496554624b by Frank Reininghaus.
Committed on 23/04/2013 at 19:31.
Pushed by freininghaus into branch 'KDE/4.10'.

Disable Find/Replace in the "rename inline" line edit

These actions do not work correctly because renaming is considered
finished as soon as the line edit loses focus, which happens when the
"Replace" dialog pops up.
FIXED-IN: 4.10.3

M  +1    -0    dolphin/src/kitemviews/private/kitemlistroleeditor.cpp

http://commits.kde.org/kde-baseapps/a16562cd55199e1daee496019cbea7496554624b