┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/CMakeLists.txt
AgeCommit message (Collapse)Author
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-10-27ViewProperties: Store view properties in extended file attributesMéven Car
Existing settings are converted. Works on most FS except FAT/exFAT which fallback to .directory files. If the extended file attributes (in ADS in Windows) can't be saved, they are saved to file as before. BUG: 322922 You can see file xattr using for instance for Unix filesystems: getfattr -d /home/meven
2023-12-27Fix build with cmake >= 3.28Albert Astals Cid
Proposed by krop on #kde-devel Unless my bisect skills failed broken by https://gitlab.kitware.com/cmake/cmake/-/commit/ebc9e448b38378cc21a6b77df03a77d9732c24ac
2023-11-08Master is qt6 only. Not necessary to use ${QT_MAJOR_VERSION} now.Laurent Montel
Remove qt5 specific cmake code too
2023-06-28Merge branch 'master' into kf6Méven Car
2023-05-26Expand or collapse all selected folders on Key Right/LeftMéven Car
CCBUG: 196772
2023-03-04Rename KF5 to KF6Dāvis Mosāns
2022-07-07Add two autotestsFelix Ernst
- The first test makes sure that the width of the places panel doesn't change no matter what other panels are shown or hidden. There used to be bugs about this. - The second test is kind of an integration test. It makes sure that the go actions work correctly. On two occasions we had the regression here that after going "Up" in the file system hierarchy the folder one emerged from didn't have keyboard focus which makes peeking into multiple folders tiresome. The test also makes sure that going back and forward works as expected and there are some sanity checks about which go actions are enabled, which items are selected and that using tabs doesn't interfere with any of that.
2022-01-14Adapt build system for building against qt6Laurent Montel
2022-01-11Remove KStandardItem and KStandardItemModelKai Uwe Broulik
They were used by the custom places panel and are now unused.
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-05-31Use more target-centric cmake codeFriedrich W. H. Kossebau
GIT_SILENT
2021-05-19Use directly autorccLaurent Montel
2021-02-18Do not run benchmark test automaticallyAlexander Lohnau
Same reasoning as https://invent.kde.org/frameworks/kio/-/merge_requests/301 and the commit series.
2020-12-28Add options to hide some context menu entriesDuong Do Minh Chau
This commit add options to hide the following context menu entries: - Add to Places - Copy Location - Duplicate Here - Open in New Tab and Open in New Tabs - Open in New Window - Sort By - View Mode The Services settings page is renamed to Context Menu ShowCopyMoveMenu option is moved from GeneralSettings to ContextMenuSettings BUG: 314594
2020-12-05Drop obsolete KF5 version checkElvis Angelaccio
We depend on 5.77 now.
2020-05-28Non-functional change: consistent indentationAdriaan de Groot
Use 4-space indents consistently, rather than a mix of 2- and 4-.
2020-05-28Make ruby, and Gem:test-unit, optionalAdriaan de Groot
While this reduces test-coverage in cases where the user doesn't have Ruby or the testing gem installed, it at least allows us to get through configure and build without disabling **all** testing.
2019-11-14test(search): Add test case for baloo parsing modelIsmael Asensio
Summary: Adds a new test unit for the model which parses baloo search URLs 14/19 tests are set to `XFAIL` on current implementation, as they will be fixed in a final revision. Supersedes D25135. Depends on: D25257 Test Plan: `bin/dolphinquerytest` Reviewers: elvisangelaccio, bruns, #dolphin Reviewed By: elvisangelaccio, bruns, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25258
2019-10-05Update dolphin tests following place changes D7446Méven Car
Summary: Adapt tests corresponding to changes in D7446 The placesitemmodeltest were not run due to KIO_VERSION not existing Test Plan: LANG="en" ctest Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23557
2019-09-15Bring back placesitemmodeltestMéven Car
KIO_VERSION is not defined, KF5_VERSION is.
2019-07-15Rewrite servicemenu helper utility in C++Alexander Potashev
Summary: - Also support MIME type "application/x-compressed-tar". - Update tests in Ruby, remove SimpleCov. BUG: 399229 Test Plan: Ruby tests passed Reviewers: sitter, elvisangelaccio, ngraham Reviewed By: elvisangelaccio Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21878
2019-06-23Fix tests relating to the removal of the Root Place in D15739Méven Car
Summary: See D15739 Test Plan: ctest Reviewers: elvisangelaccio, ngraham Reviewed By: elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21789
2019-03-21find ruby gems & make coverage conditional on BUILD_COVERAGEHarald Sitter
Summary: new finding tech: - find_gem function configures gem-specific FindFoo files and wraps around find_package - FindFoo files look for ruby and then attempt to require the gem name i.e. it checks if the gem can be successfully loaded by the interpreter - since this is based on find_package it may be influenced in all the regular ways (e.g. forced found or disabled from finding altogether via CMAKE_DISABLE_FIND_PACKAGE_$PKGNAME) various notes for the future: - technically this isn't 100% correct because the require name of a gem and the gem name may not be the same. e.g. the gem `docker-api` has the require name `docker`. for all currently used gems the names are however the same and so simply requiring the gem name is expected to work - the implementation doesn't care about versions, again because we don't need it to - test-unit is a bundled gem, some distributions (e.g. Arch) do split it out without making suitable dependency arrangements on a package level though the tech is heavily inspired by Aleix Pol's tech for finding QML modules as seen in extra-cmake-modules Test Plan: - ruby not found: none of the modules found - test-unit not present: error - simplecov not prseent: never errors - having a module installed or not is reported in the cmake output Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19856
2019-03-18redo service menu ruby helpers from ground up more or lessHarald Sitter
Summary: - apply ruby community style guidelines - full rewrite fixing, among other things: - inefficient/unreadable String#end_with reimplementation - inefficient use of Kernel.system (forked shell to fork a shell) - inefficient/unreadable Dir.glob reimplementation - inefficient File initialization for single chmod - invocation conditions are now actually readable - invocation conditions now also force +x on argless scripts, not just scripts that need arguments - repetitive conditions are now expressed as loops on argument arrays - mime detection now uses xdg-mime instead of file (xdg-mime internally may fall back to mime but will prefer higher level tools such as kmimetypefinder5; giving better results overall) - return values of "backtick forks" are now checked and will produce suitable errors on stderr - fail now takes a log_msg argument which is printed to stderr. this is in addition to the error raised as notification for the user, as that is unfortunately not so useful for diagnostics - overall error handling and logging of problem causes is much improved - add license headers. the original code was actually fairly exhaustive, so this really should have had a header to begin with. the code was originally introduced in svn r1045663 on Nov 6 14:56:35 2009 UTC - add blackbox tests. in the interest of keeping the scripts actually simple scripts (as opposed to a bunch of classes used by even simpler scirpts) they are now also covered by test rigging which runs them as scripts (again, as opposed to individual unit testing of distinct units) - the tests optionally can use simplecov to gather coverage metrics - also wired up to ctest so it actually gets run structurally there is actually a fair amount of overlap between the two scripts, but again, in the interest of keeping things simple I think it's better to live with that instead of refactoring a shared library out of it and then use heavy-duty meta-programming Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19334
2018-04-29Bundle dolphinui.rc also in dolphinmainwindowtestElvis Angelaccio
Otherwise the test executable will not be able to find the .rc file while creating a DolphinMainWindow instance. We also need to force the component name to `dolphin`, otherwise kxmlgui will default to the name of the binary (which in this case would be dolphinmainwindowtest rather than dolphin).
2017-11-27Created unit test for PlacesItemModelRenato Araujo Oliveira Filho
Summary: Make sure that PlacesItemModel is covered by unit test Reviewers: ervin, elvisangelaccio, mwolff Reviewed By: ervin, elvisangelaccio, mwolff Subscribers: mwolff, elvisangelaccio, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D8630
2017-11-11Prevent folders from drag and dropping onto themselves in dolphin main viewEmirald Mateli
Summary: This patch aims to improve user experience by not allowing the user to drag and drop a folder into itself. The current behavior shows a red message at the top which can then be closed by the user, instead of relying on that, this patch disables the option of dropping onto self and uses the "Invalid drop target cursor" to highlight the behavior. BUG: 307747 Since spectacle is unable to screenshot the cursor overlay, find attached a photo of the screen. {F3787651} Test Plan: 1. Drag a folder. 2. Drop it onto itself. Reviewers: #dolphin, elvisangelaccio, ngraham, rkflx, dfaure Reviewed By: #dolphin, elvisangelaccio, rkflx, dfaure Subscribers: rkflx, ngraham, elvisangelaccio, dfaure, anthonyfieroni, #konqueror Tags: #dolphin Differential Revision: https://phabricator.kde.org/D6281
2017-05-27Introduce DolphinMainWindowTestElvis Angelaccio
For now it contains a test case for the crash in bug #379135 CCBUG: 379135 Reviewers: emmanuelp, dfaure Differential Revision: https://phabricator.kde.org/D5936
2017-05-27Move non-exported code to a static libraryElvis Angelaccio
This allows us to speed up the compilation because we don't need to build twice the source files we use in the unit tests. Test Plan: Builds, dolphin works and tests pass. Reviewers: emmanuelp, dfaure Differential Revision: https://phabricator.kde.org/D5935
2017-05-11Port tests from ecm_mark_as_test to ecm_add_testHannah von Reth
Summary: This enables us to run the tests on Windows. Reviewers: elvisangelaccio, kfunk, dfaure Reviewed By: elvisangelaccio Subscribers: #konqueror, #dolphin Differential Revision: https://phabricator.kde.org/D5810
2017-05-11Remove define to disable exportsHannah von Reth
As the tests are now correctly linked to dolphinprivate we need the actual export macro.
2016-04-22Fix exports and linkage, remove sources from tests which are already being ↵Andrius da Costa Ribas
linked. REVIEW: 127709
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2015-02-24Fix build on Jenkins (or with BUILD_TESTING=ON)Hrvoje Senjan
2015-01-31Port away from KGlobalSettings::naturalSorting() by moving it to Dolphin's ↵Emmanuel Pescosta
GeneralSettings REVIEW: 122310
2014-12-18Ported tests away from KRandomSequence, QTest::kWaitForSignal and KTempDir.Emmanuel Pescosta
All tests passed!
2014-06-29KFileItemModelBenchmark is a manual testChristophe Giboudeaux
2014-06-29Reenable tests.Christophe Giboudeaux
2014-06-05Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
2014-06-04Fix possible crash if a kioslave adds multiple items with the same URLFrank Reininghaus
When opening the URL "man:", there are multiple items with the same name (for example, _exit is shown twice here). When opening a new tab, the kioslave reports some items as deleted (I have not quite understood why). The problem is that it reports some of the duplicate items twice in the list of deleted items. This confused KFileItemModel and corrupted the internal data structures, and finally, caused a crash. The fix is to remove all duplicates from KItemRangeList::fromSortedContainer(const Container& container). New unit tests included. BUG: 335672 REVIEW: 118507 FIXED-IN: 4.13.2
2014-05-05Fix build of testsAlex Richardson
This is the last commit for review 117395 REVIEW: 117395
2014-02-06Port Dolphin to BalooVishesh Handa
Nepomuk is being replaced with Baloo
2013-12-22Add unit test for KFileItemModel::createMimeData().Frank Reininghaus
The test verifies that creating the mime data for a child of an expanced folder does not cause a crash. The regression happenened in the master branch, but it doesn't hurt to have the test also in KDE/4.12. CCBUG: 329119
2013-10-30Store the selected items in a more efficient wayFrank Reininghaus
Since Dolphin 2.0, we have stored the selected items in a QSet<int>, which is neither space-efficient nor particularly fast when inserting many items which are in a consecutive range. This commit replaces the QSet<int> by a new class "KItemSet", which stores the items in a sorted list of ranges. For each range, we only store the first index and the length of the range, so we need a lot less memory for most common selection patterns, and we also save quite a few CPU cycles in many situations, because adding an item to the KItemSet will in many cases not need a memory allocation at all, and it's particularly easy when inserting sorted items into the KItemSet in a row. KItemSet contains a minimal subset of QSet's API which makes it suitable as a drop-in replacement for our needs. It also has iterators, such that the items can be iterated through easily, also with foreach. One advantage of KItemSet compared to QSet<int> is that the items are always iterated through in ascending order. REVIEW: 113488
2013-05-12Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-05-12Fix unit test failureFrank Reininghaus
The recent commit 022b564831e2295ee3bb6e53ece53191b40d894a, which added a few source files to kitemlistcontrollertest, caused a crash in that test - an assert was hit because now a different virtual method was called in one place (KStandardItemListView::initializeItemListWidget()), and qobject_cast could not cast the 'item', which is of type KFileItemListWidget, to its base class KStandardItemListWidget. Adding the source file kfileitemlistwidget.cpp fixes this. CCMAIL: [email protected]
2013-05-11Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: CMakeLists.txt
2013-05-10fix building tests under windowsPatrick Spendrin
2013-01-27Add some benchmarks for KFileItemModelFrank Reininghaus
The benchmark executable must be run manually. It is not run automatically with the other unit tests to prevent waste of CPU cycles in the not-so-uncommon situation that only test failures attract attention.