┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinfacetswidget.cpp
AgeCommit message (Collapse)Author
2023-09-10Replace qAsConst with std::as_constMé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-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
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
2020-10-23Compile with QT_NO_KEYWORDSAlexander 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-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-01-19(search) Fix searching tags with spacesIsmael Asensio
Summary: Tags containing blank spaces were not handled properly in the search widget. Now we enclose them in quotes and strip the quotes before setting them to the widget. {F7854247} Test Plan: No artifacts when searching tags containing spaces Added test cases to `bin/dolphinquerytest` Reviewers: #dolphin, elvisangelaccio, ngraham, meven Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26369
2020-01-06(search) Keep menu open when selecting tagsIsmael Asensio
Summary: Keeps the `Tags` menu open while selecting and deselecting tags in the search panel, saving many mouse clicks for multiple tags. It cannot be done natively on `QMenu` (https://bugreports.qt.io/browse/QTBUG-6635) but it is a one-liner and I haven't seen any bad behavior so far. Test Plan: {F7853717} - `Tags` menu does not close when selecting/deselecting tags - Tag search is consistent - Clicking anywhere else will close the menu Reviewers: #dolphin, elvisangelaccio, ngraham, #vdg Reviewed By: #dolphin, elvisangelaccio, #vdg Subscribers: #vdg, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26343
2019-12-29Clean-up DolphinFacetsWidgetIsmael Asensio
Summary: Small refactor patch to clean-up some logic on setter and getter: - Search terms are previously splitted and set separately, so no need for extra splitting and `foreach` loop - Return search terms on a `QStringList` rather than join first Depends on: D26029 Test Plan: No behavior changes Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26150
2019-12-26Rename methods on DolphinFacetsWidgetIsmael Asensio
Summary: Small refactor patch to rename method names, from `ratingTerm` to `searchTerm`, since its scope has grown bigger. Test Plan: No behavior changes Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26029
2019-12-15[dolphin/search] Search by (multiple) tagsIsmael Asensio
Summary: Adds a tag selector in the extended filters of the search box. Selected tag or tags are added to the search query along with the other filters (type, date, rating). FEATURE: 412564 CCBUG: 356062 Test Plan: - Menu shows the user tags - Picking any tag/s filters the search to that specific tag/s {F7727909} Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg Subscribers: kfm-devel Tags: #dolphin Maniphest Tasks: T9094 Differential Revision: https://phabricator.kde.org/D25130
2019-11-13fix(search): Allow to set empty typeIsmael Asensio
Summary: This small patch allows to set and empty `type` to the extended options, which will set the `Any Type` option (index 0). It doesn't make any change in current code, since this case is not called, but it helps simplifying follow-up patches. Test Plan: No behavior changes with current code. Calling `setFacetsType(QString())` actually sets the first option (`Any Type`) Reviewers: elvisangelaccio, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25255
2019-11-07Make the search box more compactIsmael Asensio
Summary: Reduce the spacing between widgets and remove the content margins on the extended search options to have a more compact and space-saving layout. Currently, some widgets are not even aligned. This will be even more important if we remove the toggle button for 'More Options'. CCBUG: 386754 Test Plan: BEFORE: {F7681182} AFTER: {F7681184} Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25028
2019-10-27New design for extended search optionsIsmael Asensio
Summary: Replace the arrays of radiobuttons in dolphin search box to more simple dropdown boxes. This provides a leaner look, saving a lot user space on the main view and it is more consistent with the 'Search tools' in the most known sites (Google, DuckDuckGo, etc.) There is room for improvement, as `QComboBox` doesn't match perfectly with the tool buttons used avobe, but I think it is an improvement over the current situation. BEFORE: {F7581883} AFTER: {F7580952} Test Plan: Same behavior with different aesthetics Reviewers: elvisangelaccio, #dolphin, #vdg Subscribers: ndavis, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24602
2019-10-20[dolphin/search] Reset search options when neededIsmael Asensio
Summary: Adds a method to reset the options in `facetsWidget` in two cases: when disabled and before parsing a new search URL. Otherwise, controls for a parameter (ex. `rating`) which are not found in the new URL would stay on the old positions, instead of the default "any". See D24422 Test Plan: Controls on `facetsWidget` go back to the default in such two cases. Reviewers: #dolphin, elvisangelaccio, meven, ngraham Reviewed By: ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24450
2019-10-07[dolphin/search] Add missing parsing for type 'Folder'Ismael Asensio
Summary: Add missing parsing for type 'Folder' See D24422 Test Plan: dolphin --new-window 'baloosearch:?json=%7B%22type%22:[%22Folder%22]%7D' - `Folders` is selected in search options Reviewers: #dolphin, elvisangelaccio, meven, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24448
2019-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-11-03Use nullptr + add explicit keywordMontel Laurent
Test Plan: compile Reviewers: #dolphin, broulik Reviewed By: broulik Subscribers: #dolphin Differential Revision: https://phabricator.kde.org/D8637
2017-10-04Move Folders item closer to the topNathaniel Graham
Summary: Move Folders item closer to the top in Dolphin's find panel. This seems like a more natural placment than after the document types. Also re-order variable placement to maintain consistency Test Plan: Tested in KDE Neon; works. Before: {F4631565} After: {F4631532} Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: #dolphin Differential Revision: https://phabricator.kde.org/D8132
2017-10-03Add option to only search for foldersXY Quadrat
This commit adds an option under "More options" at the search widget. It allows to only search for folders and filter out everything else, just like the other options (e.g. "Videos") above. FEATURE: 269334 REVIEW: 130159
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-05-11Move away from Baloo::TermVishesh Handa
Baloo is set to become a framework and wants to only export the bare minimum number of classes as it will need to provide ABI + API guarentees forever. The Term class is now no longer exported. It can be added back again. REVIEW: 123643
2014-10-18Fix includesMontel Laurent
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-05-13Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
Since the master branch had never been merged into frameworks since the creation of the frameworks branch, I had to fix a couple of merge conflicts and make another change in order to make it build - I hope I did not get anything wrong. We should probably merge master into frameworks on a regular basis from now on. CCMAIL:[email protected] Conflicts: dolphin/src/dolphinmainwindow.cpp dolphin/src/search/dolphinfacetswidget.cpp dolphin/src/statusbar/dolphinstatusbar.cpp dolphin/src/views/dolphinview.cpp
2014-05-05dolphin: convert statusbar, settings and search to qt5 signals/slot syntaxAlex Richardson
2014-03-28When you open a new tab while the search mode is enabled, theEmmanuel Pescosta
newly opened tab also starts the same search (Because new tab is opened with the current view url), but the search box is in read-only mode. So you cannot close the search bar nor edit the search text. This patch fixes this by parsing the search url. The value of the "search" parameter is used as search text and the value of the "url" parameter is used for the search path ("root" folder for the search when "Search from here" mode is enabled). In case of Baloo search urls, we use Baloo::Query::fromSearchUrl. Removed everything related to read only mode in DolphinSearchBox, not needed anymore. REVIEW: 111968 BUG: 311950 FIXED-IN: 4.13.0
2014-03-25Set m_anyType as checked by default.Emmanuel Pescosta
CCMAIL: [email protected]
2014-03-24Dolphin Facet Widget: Convert type selection into radio buttonsVishesh Handa
They were previously checkboxes. Most files cannot have more than 1 type considering that the exposed types were "Document", "Image", "Video" and "Audio". Also, it is not very simple in baloo to search through ORs for types. Not through the exposed API anyway. REVIEW: 117015
2014-03-19Dolphin Facet Widgets: Implement date based filteringVishesh Handa
This required changes in Baloo which require reindexing. Since the storage location has changed for Beta 3 everyone should be re-indexing everything, so it won't be a problem.
2014-02-06Port Dolphin to BalooVishesh Handa
Nepomuk is being replaced with Baloo
2013-06-26Dolphin Search Date: Set the proper dateVishesh Handa
QDate's api is not that intuitive and the addDays functions return a QDate with those amount of days. They do not modify the original QDate. BUG: 321198
2012-10-15Port Dolphin from Nepomuk to Nepomuk2 according to the Nepomuk2Port mini ↵Emmanuel Pescosta
guide on techbase - http://techbase.kde.org/Projects/Nepomuk/Nepomuk2Port REVIEW: 106825
2012-05-14Translation improvementsPeter Penz
Thanks to Frederik Schwarzer for the suggestions!
2012-05-10Reimplement search-filtersPeter Penz
BUG: 270721 BUG: 280377 FIXED-IN: 4.9.0
2012-04-25Fix search-UI issues in combination with the new places entriesPeter Penz
The places-entries for searching revealed some serious issues in combination with the search-panel. Move the filtering away from QDockWidget and bring it back below the search-bar.