https://bugs.kde.org/show_bug.cgi?id=185433
David Faure <fa...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/fram | |eworks/kio/commit/87adf7f6b | |cbd9baddafda58e2dbf7052eb32 | |3358 Status|ASSIGNED |RESOLVED --- Comment #19 from David Faure <fa...@kde.org> --- Git commit 87adf7f6bcbd9baddafda58e2dbf7052eb323358 by David Faure, on behalf of Andreas Bontozoglou. Committed on 12/09/2020 at 18:03. Pushed by dfaure into branch 'master'. [kio] BUG: Allowing double-quotes in open/save dialog tl;dr: Allowing double-quotes in filenames in KFileWidget by escaping them with `\` and modifying the tokenizer to understand this. In this patch: - Introduce `escapeDoubleQuotes` function that is used to escape selected file paths and correctly populate the `locationEdit` - Disabling old KFileWidgetPrivate::tokenize and writing a new one which works by iterating each character in the `locationEdit` while it remembers if it is in "escape mode" (seen a '\') or not. - Introducing **public API** `KFileWidget::setSelectedUrls`. This was mainly needed for the tests to work. I originally wanted to test only the tokenizer but (a) this is in private implementation and (b) testing that things are escaped properly in the text-box is also very important - Adding a test for various filenames that contain a mix of backslashes and quotes - Adding a new logging category for the kfilewidget.cpp (KIO_KFILEWIDGETS_FW) - Adding command-line options to `kfilewidgettest_saving_gui` which I used for functional tests at some point. My work there is a bit sloppy atm but I assume this is an auxiliary file (let me now if you want me to clean it up) Questions: - Do I need to add a @since in the docblock? - Do I need to change minor/major version here (and how would I do this)? I am not sure if the addition of `setSelectedUrls` is backwards compatible M +105 -0 autotests/kfilewidgettest.cpp M +9 -0 src/filewidgets/CMakeLists.txt M +98 -46 src/filewidgets/kfilewidget.cpp M +8 -0 src/filewidgets/kfilewidget.h M +25 -7 tests/kfilewidgettest_saving_gui.cpp https://invent.kde.org/frameworks/kio/commit/87adf7f6bcbd9baddafda58e2dbf7052eb323358 -- You are receiving this mail because: You are watching all bug changes.