Bug 500103 - Window title wraps search query with '%27' in non-indexed locations
Summary: Window title wraps search query with '%27' in non-indexed locations
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: search (other bugs)
Version First Reported In: 24.12.2
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-15 00:47 UTC by Luke Horwell
Modified: 2025-04-07 21:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 25.08
Sentry Crash Report:


Attachments
Screenshot of the window title with character escaping issue (103.73 KB, image/jpeg)
2025-02-15 00:47 UTC, Luke Horwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Horwell 2025-02-15 00:47:43 UTC
Created attachment 178390 [details]
Screenshot of the window title with character escaping issue

SUMMARY
In Dolphin 24.12.2, perform a search in most (or all) locations will show %27 in the window title.

STEPS TO REPRODUCE
1. Click the search icon and type "test".
2. Observe the window title.

OBSERVED WINDOW TITLE
Query Results from %27test%27 — Dolphin

EXPECTED WINDOW TITLE
Query Results from test — Dolphin

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma: 6.1.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Dolphin 24.08.3 does not have this bug. However, the window title in that version simply says "Search for test — Dolphin" - which I think was better at conveying the same meaning in less words (especially with the "icons and text task manager" on the panel)
Comment 1 Luke Horwell 2025-02-19 17:59:00 UTC
From looking at the code (dolphinsearchbox.cpp, queryTitle):
* At first glance, involves this commit: https://invent.kde.org/system/dolphin/-/commit/2059ce2986e2d2cf6e22041b2ffe28e50b913c7f
* Later fixed by: https://invent.kde.org/system/dolphin/-/merge_requests/806
* Then fixed in KIO here: https://invent.kde.org/frameworks/kio/-/merge_requests/1678

However, from a git bisect, the problem starts with this commit:
https://invent.kde.org/system/dolphin/-/commit/80d2ea0bcc37737348b1df1691e21763272d0157

Reverting the commit fixes the issue and also restores the desired "Search for [...]" text in the window title.
Comment 2 TraceyC 2025-02-21 02:27:53 UTC
Curiously, I'm not able to reproduce this with Dolphin 24.12.2 or built from git-master

24.12.2 is on
Operating System: Solus 4.7
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.12.12-313.current (64-bit)
Graphics Platform: Wayland

I'll leave it for the Dolphin developers to chime in
Comment 3 Luke Horwell 2025-02-21 13:02:17 UTC
(In reply to TraceyC from comment #2)
> Curiously, I'm not able to reproduce this with Dolphin 24.12.2 or built from git-master

It depends where the search takes place. In my testing, the title was correct when searching the home folder, but the window title goes bad when searching from the root filesystem folder (/).

It looks like it has something to do with file indexing. In my VM, the window title was OK when searching the home folder, but disabling the file index and starting a new search, '%27' is seen in the window title thereafter.
Comment 4 TraceyC 2025-02-21 17:34:50 UTC
(In reply to Luke Horwell from comment #3)
> It depends where the search takes place. In my testing, the title was
> correct when searching the home folder, but the window title goes bad when
> searching from the root filesystem folder (/).

Aha. This I can reproduce on git-master. Thanks!
Comment 5 Felix Ernst 2025-04-07 21:09:56 UTC
Git commit 4102ccb80457eea44ea280f0ace2a419602bc34b by Felix Ernst.
Committed on 07/04/2025 at 21:09.
Pushed by felixernst into branch 'master'.

Rewrite search integration

This huge commit is a nearly complete rewrite of the Dolphin search
code. It implements most of the improved Dolphin search UI/UX as
designed and discussed in a collaborative effort by Kristen McWilliam,
Jin Liu, Andy Betts, Tagwerk, a few others and me.
See https://invent.kde.org/system/dolphin/-/issues/46.

# Notable changes

- A toggle to change the search tool is provided as most contributors
deemed that useful in
https://invent.kde.org/system/dolphin/-/merge_requests/642#note_985112.
- The default search is changed to filenamesearch for maximum
reliability.
- Removing all search parameters will take users back to the view state
prior to starting a search instead of keeping the search results open.
- The UI for choosing file types or modification dates has been made
more powerful with more granularity and more options.
- Most search parameters can be configured from a popup menu which
gives us extra space for extra clarity.
- Labels and help buttons as well as hyperlinks to settings makes sure
the user always knows why some search parameters are unavailable in
some contexts.
- Chips show important search parameters while the popup is closed.
They allow quickly removing filters.
- The titles of the search and the input field placeholder message
change to make clear whether file names or file contents are searched.
- When the user actively switches the search tool, whether content
should be searched, or whether to search everywhere, this is preserved
for the initial state of the search bar when the user opens it the next
time after restarting Dolphin.

# Architecture

- The new DolphinQuery class is independent of the UI and contains all
search parameters modifiable in Dolphin as easy setters and getters.
- DolphinQuery objects are also used to update the states of every
component in the search UI. There is now a clear separation of UI and
search configuration/DolphinQuery.
- DolphinQuery is responsible for exporting to and importing from
search URLs.
- The search UI always reflects the currently configured DolphinQuery
no matter if the user changed the UI to change the DolphinQuery or
loaded a DolphinQuery/older search URL which then is reflected in the
UI.
- I tried to simplify all classes and their interaction between each
other as much as possible.
- I added some tests
Related: bug 386754, bug 446387, bug 470136, bug 480001, bug 483578, bug 488047, bug 488845, bug 435119, bug 458761, bug 471556, bug 475439, bug 477969
FIXED-IN: 25.08

M  +19   -4    src/CMakeLists.txt
M  +5    -0    src/config-dolphin.h.cmake
M  +22   -17   src/dolphinmainwindow.cpp
M  +2    -6    src/dolphinrecenttabsmenu.cpp
M  +103  -130  src/dolphinviewcontainer.cpp
M  +41   -30   src/dolphinviewcontainer.h
M  +2    -2    src/global.h
A  +356  -0    src/search/bar.cpp     [License: GPL(v2.0+)]
A  +206  -0    src/search/bar.h     [License: GPL(v2.0+)]
A  +150  -0    src/search/barsecondrowflowlayout.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +48   -0    src/search/barsecondrowflowlayout.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +52   -0    src/search/chip.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +101  -0    src/search/chip.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +0    -0    src/search/configurationpopup.h     [License: Trivial file]
M  +5    -1    src/search/dolphin_searchsettings.kcfg
D  +0    -312  src/search/dolphinfacetswidget.cpp
D  +0    -84   src/search/dolphinfacetswidget.h
M  +339  -70   src/search/dolphinquery.cpp
M  +278  -37   src/search/dolphinquery.h
D  +0    -575  src/search/dolphinsearchbox.cpp
D  +0    -189  src/search/dolphinsearchbox.h
A  +378  -0    src/search/popup.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +99   -0    src/search/popup.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +61   -0    src/search/selectors/dateselector.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +42   -0    src/search/selectors/dateselector.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +81   -0    src/search/selectors/filetypeselector.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +36   -0    src/search/selectors/filetypeselector.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +51   -0    src/search/selectors/minimumratingselector.cpp     [License: GPL(v2.0+)]
A  +42   -0    src/search/selectors/minimumratingselector.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +189  -0    src/search/selectors/tagsselector.cpp     [License: GPL(v2.0+)]
A  +45   -0    src/search/selectors/tagsselector.h     [License: GPL(v2.0+)]
A  +56   -0    src/search/updatablestateinterface.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +67   -0    src/search/widgetmenu.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
A  +63   -0    src/search/widgetmenu.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]
M  +3    -3    src/tests/CMakeLists.txt
M  +1    -1    src/tests/dolphinmainwindowtest.cpp
M  +214  -64   src/tests/dolphinquerytest.cpp
A  +124  -0    src/tests/dolphinsearchbartest.cpp     [License: GPL(v2.0+)]
D  +0    -63   src/tests/dolphinsearchboxtest.cpp

https://invent.kde.org/system/dolphin/-/commit/4102ccb80457eea44ea280f0ace2a419602bc34b