┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/kfileitemmodeltest.cpp
AgeCommit message (Collapse)Author
2026-01-20dolphinview: when creating a subfolder expand to it if in details modeMéven Car
So the new folder is in view.
2025-02-01Ignore diacritical marks for keyboard searchThomas Moerschell
When using keyboard search, normalize the item names and remove marks first. Now, items containing characters with marks can be found using keyboard search. BUG: 482394
2024-11-19natural sort: exclude extension when comparing filenamesEren Karakas
Currently natural sort compares the entire filenames (basename.extension) when sorting. This causes eg. "a 2.txt" to appear before "a.txt" when sorted by ascending. This is unintuitive since people prioritize basenames more than file extensions. Instead, change natural sort to compare by basename only and fallback to comparing extensions if basenames were equal. This change causes "a.txt" to appear before "a 2.txt" and matches how other platforms such as GNOME and Windows behave. BUG: 416025 BUG: 470538 BUG: 421869 BUG: 312027
2024-10-31refactor: replace QString() with QStringLiteral() for better performanceZhangzhi Hu
2023-12-27kfileitemmodeltest: Include KIO/SimpleJob header instead of relying on ↵Alexander Lohnau
compat code Amends 3f92ac800c5e52d0a5622367ff8ffe8cbbdfa184
2023-12-15Resort directory size count after refreshingAkseli Lahtinen
After refreshing the view when size count is selected as the sortRole, count is 0 at first. When the actual count is loaded, the sorting is done according to the count being 0. This can break the sort order and cause view and model to be out of sync. Making sure we always resort all items when the directory size/item count is changed fixes this BUG:473999
2023-05-12Remove deprecated, ifdef'd code for old KIO versionsJakob Petsovits
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-11-29Exit the deleted directory when it is removedMéven Car
If current directory is a local file, try to find nearest dir ancestor and open it. Display warning to the user.
2022-05-31Fix building kfileitemmodeltest with KF6Ahmad Samir
- Fix kio_version.h include - Explicitly create a QSet for QCOMPARE
2022-03-04Fix issue where newly inserted items end up in the wrong directoryDavid Edmundson
If we have directory "a" and "a/b" and expand both, then collapse "a" we tell KDirWatcher to stop watching both these directories. However, KDirWatcher keeps them in the listersCurrentlyHolding list as well as the listersCurrentlyListing list and will still notify of changes. If a new file appears in "a/b/" we will still get change notifications. When dolphin processes these changes we cannot find the relevant parent node. It then gets confused and inserts the item into the root directory from the POV of the model notifications. When we then open the relevant folder the model knows a node with that URL exists and fails to add it correctly. This can also be reproduced by continually downloading files into a subdirectory tree and rapidly expanding and collapsing folders a few levels deep.
2021-12-06Fix various typosluz paz
Found via `codespell -q 3 -S *.desktop,*.xml`
2021-11-28Properly display parent folders when filtering is active and items are added ↵Eduardo Cruz
or refreshed The methods slotRefreshItems(), slotItemsAdded() and slotItemsDeleted() are adapted so they are now compatible with the new behavior of filtering expanded folders achieved in ed83f37f06bd5c4b38c100503c3ad4dec2a87912. The new behavior is that expanded folders are hidden from view if neither the folder itself nor any of its contents passes the filter. Previously expanded folders would always stay visible no matter the filter. A bug where the parent expanded folder would disappear after adding or refreshing an item while filtering is also fixed. Tests are added to make sure these behavior changes won't regress. BUG: 442275 FIXED-IN: 22.04
2021-10-04Rewrite filter algorithm to properly support filtering with expanded folders ↵Eduardo Cruz
under Detail View mode. BUG: 411878 CCBUG: 442275 FIXED-IN: 21.12
2021-08-29Revert "Revert "Disable Hidden Files Last sort by default""Elvis Angelaccio
This reverts commit 272aa65bb55dd31f58e8a8e24ea7bc8bd2712daa.
2021-08-29Revert "Revert "Show hidden files and folders last""Elvis Angelaccio
This reverts commit 63e12c0cdf4e3437b95b9c50e5791dbf97183687.
2021-08-29Merge branch 'release/21.08'Elvis Angelaccio
2021-08-06Revert "Show hidden files and folders last"Nate Graham
This reverts commit 996e430b62075c5b69571f141456dbe5f2956679. The accompanying feature to make the behavior configurable and disable it by default was reverted in 21.08, so we need to revert the feature itself as well and only ship it in 21.12, to avoid changing people's setting back and forth, which is often not well-received.
2021-08-06Revert "Disable Hidden Files Last sort by default"Heiko Becker
This reverts commit fd2203bb3925edb5d657d49a706e26ea736362d2.
2021-08-05Merge branch 'release/21.08'Nate Graham
2021-08-05Disable Hidden Files Last sort by defaultChris Holland
2021-07-19Use KDirLister directly now that it emits a jobError() signalAhmad Samir
Since KIO 5.82, KCoreDirLister (the base class of KDirLister) emits a jobError() signal when the ListJob used internally emits an error. Drop KFileItemModelDirLister class, now redundant. This also bump the KF version to 5.82.
2021-05-10Show hidden files and folders lastGastón Haro
Hidden files and folders are always displayed after not hidden files. BUG: 241227 Revision: https://phabricator.kde.org/D29115
2021-03-13Enable test mode in all testElvis Angelaccio
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
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-05-28Port away from deprecated qrand()Elvis Angelaccio
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-09-14Use directly "isEmpty()"Laurent Montel
2019-04-07[KFileItemModelTest] Port to fastInsert()Elvis Angelaccio
We already depend on KF5 > 5.47, so we are ready to switch to the non-deprecated fastInsert() method.
2018-08-16Make this test work again with new uds implementationJaime Torres Amate
Summary: With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists. Use 3 different entries and only insert(). Test Plan: before: crash in the uds assert after: passes the test Reviewers: #dolphin, #frameworks, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: bcooksley, bshah, nalvarez, cfeck, dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13813
2018-08-16wrong name and email addressJaime Torres Amate
Summary: This reverts commit 2104d18a6760d28d24665a3281ef090c198c44e7. Test Plan: revert-hammer Reviewers: Subscribers:
2018-08-16Make this test work again with new uds implementationTravis CI Bot
Summary: With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists. Use 3 different entries and only insert(). Test Plan: before: crash in the uds assert after: passes the test Reviewers: #dolphin, #frameworks, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13813
2018-02-03Port QSignalSpy to new signal syntaxElvis Angelaccio
More compile-time safety. Tests still pass. This also fixes a krazy warning about "normalised signal/slot signatures".
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-05-11Fix kfileitemmodeltestElvis Angelaccio
Commit 6dcbb8127c introduced the isHidden role, update the test accordingly.
2017-01-21Change "Date" to "Modified" and allow access to new "Accessed" time fieldDon Nguyen
This is merge of #128964 and #128942. This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available. This also includes changes to update configuration files. REVIEW: 129077
2016-12-03Fix 5 clazy warningsSpencer Brown
This bumps the minimum Qt version to 5.5 (because of Q_ENUM usage). REVIEW: 129604
2016-08-06Fix some low-hanging warning fruitsMartin T. H. Sandsmark
2015-02-26Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't ↵Emmanuel Pescosta
present, because KFileMetaDataWidget is in KDELibs4Support) Reviewed-By: Vishesh Handa
2014-12-24Fix compilation with Qt 5.2 and 5.3; QSignalSpy can't take a function ↵David Faure
pointer yet
2014-12-18Ported tests away from KRandomSequence, QTest::kWaitForSignal and KTempDir.Emmanuel Pescosta
All tests passed!
2014-12-14port away from deprecated KFileItem(mode_t mode, mode_t permissions, const ↵Emmanuel Pescosta
QUrl &url, bool delayedMimeTypes = false);
2014-11-10make use of initializer listsEmmanuel Pescosta
2014-11-04Fix more unit test failuresFrank Reininghaus
This commit is analogous to 5cf8941ac789e47da70fe466033f45df9af1a3fa, but the problem existed since the frameworks port was started and was not obvious because the QString -> KUrl/QUrl port was done implicitly when calling KIO::rename(oldPath, newPath, KIO::HideProgressInfo). REVIEW: 120941
2014-11-04Fix unit test failuresFrank Reininghaus
These were caused by 86e31084ced8ba4875a6128f91ec2ca3d6df7a31 - note that the correct replacement for KUrl(fileName) is QUrl::fromLocalFile(fileName), and that calling the const function urlA.adjusted(QUrl::RemoveFilename) only has an effect if the return value is taken.
2014-10-21port Konqueror from KUrl to QUrlLukáš Tinkl
REVIEW: 120650
2014-10-18Fix includesMontel Laurent
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-13Ensure that all children of a collapsed folder are removedFrank Reininghaus
Before this patch, any (direct or indirect) children that might have been in m_pendingItemsToInsert, i.e., that were not inserted into the model yet because KDirLister had not finished listing the directory yet, would be added to the model later without a proper parent. This could cause a crash later on. CCBUG: 332102 FIXED-IN: 4.13.2