┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search
AgeCommit message (Collapse)Author
2026-01-22clang-format: readability-avoid-return-with-void-valueMéven Car
2026-01-22clang-tidy: fix unecessary-value-paramMéven Car
2026-01-22clang-tidy: avoid copy, use const referencesMéven Car
2026-01-22clang-tidy: remove unnecessary std::moveMéven Car
2025-09-23GIT_SILENT: Don't duplicate headers between .h/.cppLaurent Montel
2025-09-03Search::Bar: Preserve cursor positionweinan li
Prior to this commit editing the search term would sometimes change the cursor position. This commit makes sure the cursor position does not move by itself. BUG: 507272
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
2025-07-28search/bar: Use correct parent method in keyPressEventWang Yu
Changed QWidget::keyReleaseEvent to QWidget::keyPressEvent to match the actual event being handled.
2025-06-05DolphinQuery: Use prettier URL particularly for local pathsKai Uwe Broulik
Use toLocalFile() to avoid the 'file://' prefix and use KShell::tildeCollapse that collapses the home path into ~ as is done in many other places. Also strip trailing slash for the other URLs.
2025-04-29Clazy fixMéven Car
2025-04-07Rewrite search integrationFelix Ernst
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 BUG: 386754 CCBUG: 435119 CCBUG: 458761 BUG: 446387 BUG: 470136 CCBUG: 471556 CCBUG: 475439 CCBUG: 477969 BUG: 480001 BUG: 483578 BUG: 488047 BUG: 488845 BUG: 500103 FIXED-IN: 25.08
2024-12-16DolphinViewContainer: make sure searchbox is initialized before setSearchPathAkseli Lahtinen
If searchBox is not initialized, it can't be updated properly with setSearchPath due to some buttons not existing. There is also just no need to update it if it's not initialized. Make sure we check for it's initialized during setting the search path. BUG:497021
2024-07-19search: url encode parameters to filenamesearch:/Méven Car
To allow to pass caracters outside of latin1 encoding.
2024-03-13Animate most of the barsFelix Ernst
When a bar is toggled visible this usually happens because the user might want to use its functionality now. However, if bars appear without animation or at a location the user is not currently looking at, they might not notice that they have appeared at all. An animation makes it more likely that the user notices the change and can then use the newly made visible component. Another reason for animations for showing or hiding of components is that it can be disorienting for users when panels or bars suddenly appear or disappear without animation. There is no visible movement then, so the user might not know what happened if they didn't concentrate or blink at that moment. The newly appearing or disappearing component might also displace other components which can make it difficult to find what one was just looking at. These bars animate now after this change: - Search panel - Filter bar - Status bar This is implemented by extracting the animation code from SelectionMode::TopBar into a new abstract base class AnimatedHeightWidget. This class is now also used in SelectionMode::BottomBar and the animating code there was removed. These bars are left in Dolphin that stay without animation: - Menu bar (Would probably need to be implemented in KXmlGui) - Tool bar (Would probably need to be implemented in KXmlGui) - Tab bar (Needs a different appraoch because it already inherits QTabBar and therefore can not inherit AnimatedHeightWidget)
2024-02-21Fix a crash in DolphinSearchBox::hideEvent()Vlad Zahorodnii
BUG: 481553
2023-11-08Port away from KMoreToolsNicolas Fella
The idea behind KMoreTools was to point the user at external tools for a given job. It provides a rather complex framework for that, including suggesting not-yet-installed tools. The UX behind that isn't great though, which somewhat deep menu hierarchies and a somewhat arbitrary list of tools. Most KDE apps have moved away from it, with only Dolphin remaining. Instead provide direct integration with relevant KDE tools (Filelight, KDiskFree, KFind)
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-12DolphinView: get rid of writeStateChanged signal in setActive()Amol Godbole
The signal writeStateChanged() was not working because it is not connected to slotWriteStateChanged() slots when the active view changes. Replace the signal with direct calls to the slots. Also, do not delay openRequest signal in DolphinSearchBox::slotSearchTextChanged. It's no longer required. BUG: 440366
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Méven Car
2023-09-10Replace qAsConst with std::as_constMéven Car
2023-09-04Restore the URL when DolphinSearchBox is clearedAmol Godbole
Currently, the URL navigator is not updated when the search box is cleared. This MR restores the URL, by closing and reopening the box. The call for emitting closeRequest() on pressing Esc has been replaced with emitCloseRequest(). The wait duration before starting a search has been reduced to 500ms to increase responsiveness. Also, the bugfix for BUG: 423328 is slightly incorrect and causes the search term to not be displayed when opening a saved search for the first time. As a better solution for this bug, DolphinSearchBox::setText() now updates the text only if the text has changed. BUG: 473775
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-06-29Use ellipsis everywhere instead of three dotsTem PQD
Better for screen readers etc.
2023-03-04search: Prevent the search box from enlarging the viewIsmael Asensio
By default, the search filters widget calculates its `minimumSizeHint` as the sum of its components' minimum widths. This minimum width hint will scale up the widgets hierarchy, finally imposing a minimum width to the contents view, which in certain conditions can take the space from the side panels. Let's set a minimum width hint of 0, so it is the filters widget which always adapts to the available view size instead. BUG: 466796 FIXED-IN: 23.04
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-09-26Remove unused includesLaurent Montel
2022-06-15Cleanup config-dolphin.h includesAhmad Samir
2022-06-15Use cmakedefine01Ahmad Samir
This way we get a build time warning if the var isn't defined at all, e.g. a missing check_include_files() CMake call.
2022-06-15Use one config-dolphin.h.cmake configuration fileAhmad Samir
2022-05-13Drop KNS3 prefix for KMoreTools includesAlexander Lohnau
In KF6 KMoreTools should become it's own library and thus the KNS3 prefix should get removed. Considering that the classes are not in any namespace, having a namespaced include is not needed and only causes noise.
2022-05-06SearchBox: Add topMargin to balance the spacingIsmael Asensio
2022-01-09Port back to KFilePlacesViewKai Uwe Broulik
This removes the custom-view engine version of the places panel and replaces it with the upstream `KFilePlacesView` from KIO.
2021-12-13Drop now unneeded QOverload statementsAlexander Lohnau
By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT and QT_DISABLE_DEPRECATED_BEFOREvalues, the deprecated overloads are hidden. This way we only have the un-deprecated one visible.
2021-05-13Merge branch 'release/21.04'Ismael Asensio
2021-05-10search/facetswidget: Check for protocol before trying to fetch tagsIsmael Asensio
This was causing an error when trying to list items from the non-existent `tags:` protocol. BUG: 435586 FIXED-IN: 21.04.1
2021-05-03search: Add action to clear tag selectionIsmael Asensio
BUG: 432719
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-12-03DolphinView: set the parent of layout in the ctorAhmad Samir
This silences a runtime warning: QLayout: Attempting to add QLayout "" to DolphinView "", which already has a layout Remove redudant setLayout() calls, passing a parent widget to the Q*BoxLayout ctor sets that layout as the top-level layout for that widget.
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-08-04Merge branch 'release/20.08'Ismael Asensio
2020-08-04[search] Close tags menu after click when there is only one tagIsmael Asensio
It stays open otherwise to allow checking/unchecking several tags at a time BUG: 424873 FIXED-IN: 20.08
2020-07-11Add support to tags: scheme in DolphinQueryIsmael Asensio
It allows to start a search from a `tags:/mytag/` view. The use case is to refine a search on additional terms (another tags, ratings, etc)
2020-07-05[search] Fix corner cases when using quotes in filenamesIsmael Asensio
The `filename` term in a search query is enclosed into quotes. As the user can have additional quotes in the search term, there were several corner cases where the parsing would fail to correctly split the terms New test cases have been added to cover this possibility Previous tests still passes to avoid regressions BEFORE: ``` (filename/quoted) Compared values are not the same Actual (query.text()): "xyz\"\"" Expected (expectedText): "\"abc xyz\"" (filename/mixed) Compared values are not the same Actual (query.text()): "xyz\" tuv\"" Expected (expectedText): "\"abc xyz\" tuv" (content+filename/quoted) Compared values are not the same Actual (query.text()): "abc xyz xyz\"\"" Expected (expectedText): "abc xyz filename:\"\"abc xyz\"\"" ```
2020-07-05[search] Do not update text input when it has focusIsmael Asensio
When the user is entering a search term, a delayed search will be emmited after a few seconds. This means updating the search URL, which in turn gets parsed and reflected back on the search input. To avoid interrupting the user input flow and unexpectedly move the cursor to the end, let's update the input search box only when it doesn't have the focus. It's still updated on other interactions such as changing the search options or clicking a saved search on the places panel. BUG: 423328 FIXED-IN: 20.08
2020-06-22Expand DolphinQuery to support different Url schemesIsmael Asensio
2020-05-18Move search and filter bar close buttons to the rightNate Graham
Summary: Close buttons for windows, tabs, and pretty much everything else in KDE are on the right, not the left. This patch makes Dolphin's search and filter bars follow that. BUG: 421372 FIXED-IN: 20.08.0 Test Plan: {F8314176} Reviewers: abetts, #dolphin, #vdg, elvisangelaccio, GB_2 Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2 Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29693
2020-05-03filenamesearch:/ define a title for the queryMéven Car
Summary: CCBUG: 420354 Reviewers: ngraham, elvisangelaccio, #dolphin, #frameworks, iasensio Reviewed By: elvisangelaccio, #dolphin, iasensio Subscribers: iasensio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29198