Bug 267070

Summary: kdialog have problems handling the # character when multi-selecting is used
Product: [Unmaintained] kdelibs Reporter: Thomas Lindroth <thomas.lindroth>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: celloman, dodonvictor, faure, rakuco, simonandric5
Priority: NOR    
Version: 4.14.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Lindroth 2011-02-24 18:05:37 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

kdialog --multiple --getopenfilename will sometimes substitute spaces with %20 when the filenames contain the # characters.

Reproducible: Always

Steps to Reproduce:
run:
touch "Name #1"
touch "Name #2"
kdialog --multiple --getopenfilename .
select the two files

Actual Results:  
the output is:
/home/tholin/temp/Name%20#1 /home/tholin/temp/Name%20#2

Expected Results:  
the output should be:
/home/tholin/temp/Name #1 /home/tholin/temp/Name #2

This only happens when the filenames contain the # character and --multiple flag is used. The output is normal if I only select one of the files.
The problem might be related to bug 185433
Comment 1 Raphael Kubo da Costa 2017-12-29 15:27:58 UTC
*** Bug 335922 has been marked as a duplicate of this bug. ***
Comment 2 Raphael Kubo da Costa 2017-12-29 15:29:27 UTC
*** Bug 280796 has been marked as a duplicate of this bug. ***
Comment 3 Raphael Kubo da Costa 2017-12-29 15:53:21 UTC
This used to be a problem in kdelibs' KFileWidget due to its conversions between KUrl's and QString's in slotOk().

KFileWidget uses QUrl directly in KF5, so this is no longer an issue. I've tried kdialog here with inputs such as "foo  bar.txt" (which used to become "foo%20 bar.txt") and "foo #1.txt" and everything works as expected.