┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2013-08-04Add some unit tests for grouping in KFileItemModelFrank Reininghaus
Hopefully, this will prevent regressions in the future. REVIEW: 111807
2013-08-04Make KFileItemModelTest fasterFrank Reininghaus
The 500 ms timeout before items are resorted does not make much sense in the unit test. Removing this delay makes the test run much faster.
2013-06-20Make it possible to select files like "a_b" using keyboard searchFrank Reininghaus
The problem was that pressing the Shift key would reset the keyboard search. BUG: 321286 FIXED-IN: 4.11.0 REVIEW: 111102
2013-06-20Merge remote-tracking branch 'origin/KDE/4.10'Dawit Alemayehu
2013-06-18Ensure that the "Sort by Type" setting is respectedFrank Reininghaus
Before this commit, switching from, e.g., "Sort by Name" to "Sort by Type" sometimes had no effect until the view was refreshed. The problem was that the re-sorting was triggered before the type information was actually added to the model. BUG: 310705 BUG: 312014 FIXED-IN: 4.10.5 REVIEW: 111004
2013-06-13Remove trailing white spaceFrank Reininghaus
2013-05-22Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-05-22Do not reset the 'isExpanded' state when an expanded folder is refreshedFrank Reininghaus
If an item is moved out of an expanded folder, the model receives the dir lister's refreshItems signal for the folder. The method retrieveData() then updates the folder's properties. This commit makes sure that the 'isExpanded' state is not touched by retrieveData(). A side-effect is that the 'isExpanded' role is not initialized to 'false', but this does not matter because trying to read a non-existing role from the QHash<QByteArray, QVariant> yields a default-constructed QVariant, which evaluates to 'false'. BUG: 299675 FIXED-IN: 4.10.4 REVIEW: 110401
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-03-15Improve handling of filtered items when folders are deleted/collapsedFrank Reininghaus
If an expanded folder with filtered children is collapsed or removed, and the parent-child relationship cannot be determined by parsing the URLs, this patch makes sure that the filtered children do not reappear when the filter bar is cleared. REVIEW: 109455
2013-03-10Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: dolphin/src/kitemviews/kfileitemmodel.cpp
2013-03-10Remove filtered children if the parent folder is collapsedFrank Reininghaus
This is analogous to commit e053ecdcd57cc39fdcbc314fc8dd22c8b9dbdd4f, which fixes the same problem for the case that the parent folder is deleted. BUG: 316335 FIXED-IN: 4.10.2 REVIEW: 109343
2013-02-27Big Thanks to Frank Reininghaus, who helped me a lot with theseEmmanuel Pescosta
changes! :) * Fixed the "Network browser" and "timeline" issues, by using the KDirLister's itemsAdded(KUrl,KFileItemList) signal -> Use the given Url to define the parent-child relationship. * Changed the name of the slot "slotNewItems" to "slotItemsAdded" for consistency with the signal. * Use a QHash<KFileItem, ItemData*> instead of a QSet<KFileItem> to store the filtered data (needed to keep the O(1) lookup for filtered KFileItems in slotItemsDeleted + needed to fix bug 311912 "After erasing a filter, some thumbnails randomly disappear") * Made the determination of the "expandedParentsCount" slightly simpler - just adding 1 to the parent's level (Also needed to fix the "Network browser" and "timeline" issues) FIXED-IN: 4.11.0 REVIEW: 109180 BUG: 304565 BUG: 311912 BUG: 312890 BUG: 315593
2013-02-19Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: dolphin/src/tests/kfileitemmodeltest.cpp lib/konq/konq_operations.cpp
2013-02-18Remove items from m_filteredItems if their parent is deletedFrank Reininghaus
Fixes the problem that filtered children of expanded deleted folders reappear if the filter is cleared. BUG: 315210 FIXED-IN: 4.10.1 REVIEW: 108976
2013-02-17Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-02-17Another fix for KItemListControllerTest::testMouseClickActivation()Frank Reininghaus
One one machine, I see that changing the global "single click" setting fails. I don't know why that is the case, but I think we should better just skip the test in that case and not hang forever.
2013-02-13Improve the recently added test testMouseClickActivationFrank Reininghaus
The method to make sure that the first item is visible turned out to be less reliable than I thought. This could make the test hang forever. Moreover, this commit removes some trailing whitespace that had been added accidentally.
2013-02-10Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-02-10Re-organize the code that compares expanded itemsFrank Reininghaus
The previous approach, which was based on comparing the URLs as strings, was not only very complex, but also could lead to inconsistencies in the model, namely, that not all children were removed from the model when the dir lister reported the parent as deleted. Later on, this could even lead to a crash. BUG: 311947 FIXED-IN: 4.11 REVIEW: 108766
2013-02-10Add benchmark for adding many child items in a tree structureFrank Reininghaus
2013-02-10Include parent-child relationships in KFileItemModel's consistency checkFrank Reininghaus
2013-02-05Add unit test for bug 313342Frank Reininghaus
2013-02-03Remove unneeded #includeFrank Reininghaus
2013-01-30Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: dolphin/src/tests/kfileitemmodeltest.cpp
2013-01-30Add unit test for bug 314046Frank Reininghaus
The regression happened in the master branch only, but I think it doesn't hurt to add the test to the stable branch. CCBUG: 314046
2013-01-27Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: dolphin/src/tests/kfileitemmodeltest.cpp
2013-01-27Move the consistency check for KFileItemModel from the test to the classFrank Reininghaus
This makes it possible to check the model's consistency also in other places, e.g., in KFileItemModel's benchmark.
2013-01-27Add a unit test for a recently fixed crashFrank Reininghaus
Before commit 90c7fd400c34e6d4d583c54c04631856c387d359, adding a KFileItem with an empty path caused a crash in KFileItemModel::expandedParentsCountCompare().
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.
2013-01-14Select right item as current item (first item after the deletion) after ↵Emmanuel Pescosta
deleting files BUG: 290736 REVIEW: 108356 FIXED-IN: 4.10
2012-10-30Fix some indentation issuesFrank Reininghaus
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-08-14Adding the Accessibility classesAmandeep Singh
2012-06-08Krazy fixesPeter Penz
2012-05-26Use an italic font for symbolic linksFrank Reininghaus
BUG: 298218 FIXED-IN: 4.9.0
2012-05-18Don't create a .directory-file for each directoryPeter Penz
This regression has been introduced on master and has not been released yet: Due to the changed properties-format an update has been done which resulted in writing a .directory file into each newly entered directory. The patch updates the view-properties and version only in the constructor so that it is assured that reading properties never accidently will change the internal version. A unit-test has been added to catch regressions like this in future. BUG: 300240 FIXED-IN: 4.9.0
2012-05-17Create unit-test for KStandardItemModelPeter Penz
2012-05-17Add unit-test to test a possible crash when updating group-headersPeter Penz
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.
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
2012-04-11KFileItemModel: interface cleanupsPeter Penz
Fix some naming inconsistencies regarding the usage of 'dir' vs. 'directory' vs. 'folder'.
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-03-29KItemListKeyboardSearchManager: make it possible to choose the timeoutFrank Reininghaus
It's now possible to change the timeout, after which any call of KItemListKeyboardSearchManager::addKeys(const QString&) starts a new search, from the default value of 5000 milliseconds. This is not used in Dolphin at the moment, but it permits to reduce the timeout to a small value in the unit test. Before this change, the unit test took more than 5 seconds to complete. (cherry picked from commit 82fc1b54bd01768f50aba7d328cdcde7de1483d7)
2012-03-28Increase the timeout in KItemListKeyboardSearchManager to 5 secondsFrank Reininghaus
The previous timeout [QApplication::keyboardInputInterval()] was too short to do a multi-letter search for users who do not type extremely fast. (cherry picked from commit 02eab49b2de51c31fe46a0d9501327b579b3648e)
2012-03-20Fix sorting-issue when "Sort folders first" is disabledPeter Penz
The comparison of expanded trees may not assume that directories are always sorted first and must respect the "Sort folders first" setting. The sorting-unittest has been extended by a sub-tree and the usecase of bug 296437. The already deactivated test for KFileItemModel::expandedParentsCountCompare() has been completely removed as it has been replaced by testSorting(). BUG: 296437 FIXED-IN: 4.8.2
2012-03-20KFileItemModel: Remove minimum-update timerPeter Penz
The timer became unnecessary after introducing the behavior to collect all new items until KDirLister emits a completed()-signal.