Bug 410253 - Loading of Find & Replace settings handles spaces incorrectly
Summary: Loading of Find & Replace settings handles spaces incorrectly
Status: RESOLVED DUPLICATE of bug 394853
Alias: None
Product: krename
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Heiko Becker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-26 21:15 UTC by Marcin Orlowski
Modified: 2020-11-24 06:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Orlowski 2019-07-26 21:15:24 UTC
SUMMARY

Loading of Find and Replace settings is handled incorrectly as it seems that either spaces are ignored or trimmed. I haven't tried all the cases but it looks like " x " would work as expected, while " " fails. The space is properly saved in XML file anyway, but it's gone while loading.

STEPS TO REPRODUCE
1. On "Filename" tab hit "Find and Replace" and add new rule where you search for a single " " (space) and replace with anything (i.e. single "_" (underscore)
2. save settings
3. load settings you just saved
4. edit your rule. The "Find" field is empty.

EXPECTED RESULT

Find field should contain " "

SOFTWARE/OS VERSIONS
Krename: 5.0.0
KDE Frameworks 5.56.0
Qt 5.12.2 (built against 5.12.2)
The xcb windowing system
Comment 1 kramski 2020-03-01 13:07:43 UTC
This is still an issue for Version 5.0.60 (krename-git 5.0.60.r533.64d6c66-1 on Arch Linux).

Testcase:

- Given a file "aaa bbb ccc.txt"

-- Add interactively Find: (a single blank), Replace: (nothing)
-- Gets you "aaa-bbb-ccc.txt"

-- Save/Load this exact definition
-- Gets you "-a-a-a- -b-b-b- -c-c-c-.-t-x-t-"

KDE Frameworks 5.67.0
Qt 5.14.1 (built against 5.14.1)
The xcb windowing system
Comment 2 kramski 2020-03-01 13:09:00 UTC
Sorry, this should read:

-- Add interactively Find: (a single blank), Replace: - (a single dash)
Comment 3 Justin Zobel 2020-11-24 06:36:19 UTC
This appears to be a duplicate of 394853. Please reopen if this is not the case.

*** This bug has been marked as a duplicate of bug 394853 ***