┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
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-17Prevent repeated re-layouting of all items while previews are generatedFrank Reininghaus
There was some code in KStandardItemListView::itemSizeHintUpdateRequired already that was supposed to prevent an expensive re-layouting of all items when a preview is received. However, it didn't quite work as intended because also the "iconOverlays" role changed. The new approach is to only re-layout if text of a visible role changes, because this is the only way how the space needed by an item might change (see KStandardItemListWidgetInformant::itemSizeHint()). BUG: 315315 FIXED-IN: 4.10.1 REVIEW: 108984
2013-02-11Merge remote-tracking branch 'origin/KDE/4.10'Aurélien Gâteau
2013-02-11Fix blinking when moving the mouse over an hidden itemAurélien Gâteau
The opacity of the unhovered pixmap must be gradually reduced while animating otherwise the alpha channel saturates. REVIEW: 108858 BUG: 299371 FIXED-IN: 4.10.1
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-10Include parent-child relationships in KFileItemModel's consistency checkFrank Reininghaus
2013-02-06KFileItemModel::insertItems(): reserve sufficient space for m_itemsFrank Reininghaus
This prevents expensive and unnecessary repeated rehashing when many items are inserted into the model.
2013-02-05Apply changes of the KGlobalSettings::singleClick() setting immediatelyAniket Anvit
Fixes a regression introduced by commit 7a364cbf489af25e123d18713523151a3a53f814. Patch reviewed and pushed by Frank Reininghaus. BUG: 313342 FIXED-IN: 4.10.1
2013-02-03Two small optimizations in KFileItemModel::removeItems()Frank Reininghaus
1. It seems that it really can happen that KFileItems that we get from the dir lister's itemsDeleted signal are not in the model any more, e.g., if a folder where hidden files are shown is left and a folder where hidden files are not shown is entered. There is no need to output warnings then. 2. Remove the emptiness-check for the KFileItemList at the beginning. Even in the unlikely event that we do get an empty list, we return just a few lines later in the code.
2013-02-03const QList<int> -> const QList<int>&Frank Reininghaus
2013-01-29Fix crashes in KFileItemModel::removeItems()Frank Reininghaus
These crashes were caused by the recent commit ff3267c6dcd0f6d0621b3a96b5462a9581a03883. It introduced two problems: a) A logic error in the code that removes the ItemData pointers from m_itemData that could cause crashes if multiple item ranges are removed, and there were un-removed items behind the last one. b) The implicit assumption that any call of removeItems() will actually result in items being removed in the model. This is incorrect if the model is first cleared and then the hidden-files setting is modified, which happens if "Save view properties for each folder" is enabled, and a folder where hidden files are shown is left. In that case, the dir lister emits itemsDeleted for the hidden items after they have been removed from the model due to the folder change. I'll add a unit test covering these issues soon. Many thanks to Romário Rios and Hrvoje Senjan for testing! BUG: 314046
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-27Performance improvements in KFileItemModel::removeItems()Frank Reininghaus
The performance of this method is improved by: a) Not removing items one by one, but doing it in a way that minimizes the number of moves to prevent O(N^2) worst-case complexity. b) Not sorting the removed items using the potentially extremely slow KFileItemModel::lessThan. We can get the indexes of the removed items very easily from the hash m_items, and sorting ints is a lot faster. c) Preventing repeated rehashing of m_items when removing the deleted URLs by replacing remove() by erase(). REVIEW: 108540
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-24Merge remote-tracking branch 'origin/KDE/4.10'Luca Beltrame
2013-01-24KFileItemModelRolesUpdater: Avoid multiple updates for Nepomuk dataVishesh Handa
The Nepomuk ResourceWatcher emits 3 signals - propertyChanged, propertyAdded and propertyRemoved. We should only listen to either the propertyChanged signal or the propertyAdded + Removed signals. There is no point in listening to all 3 signals. That will just result in unnecessary updates. Additionally, we do not need to listen to the resourceCreated signal. That is only emitted when we are watching for a specific types, which we are not. REVIEW: 108543
2013-01-15Remove incorrect comments about the sorting functionsFrank Reininghaus
In fact, we could use the sorting functions provided by Qt or the STL. The reason why we have our own is that we want to support parallel sorting because sorting many items naturally by name can be expensive.
2013-01-15Re-organise the sorting codeFrank Reininghaus
The KFileItemModel-specific parts are now separated from the generic ones, like the parallel sorting implementation. REVIEW: 108386
2013-01-15Change the sort and merge functions to a more generic form.Frank Reininghaus
This might make it easier to reuse the parallel sorting code. Moreover, some the upperBound/lowerBound functions have been removed because equivalents are provided by the STL.
2013-01-15Use std::rotate, rather than reversing three timesFrank Reininghaus
We need less code now, and moreover, the STL implementation of rotate should be more efficient than three reverse() calls.
2013-01-15Merge branch 'KDE/4.10'Simeon Bird
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
2013-01-11Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-01-11Slightly reduce the tinting for selected icons and previewsFrank Reininghaus
The intention of the tinting was to make it more obvious in icons view which icons are selected. However, some icons and previews look quite ugly with the current tinting value of 1.0 (i.e., the value passed to KIconEffect::colorize). A slight reduction of this value to 0.8 makes this a little less ugly. However, the real fix is to remove the tinting altogether and find something better to indicate which items are selected. CCBUG: 309722
2013-01-11Only use parallel sorting when sorting by nameFrank Reininghaus
The reentrant natural comparison of strings is the only really expensive operation. Other comparison functions are much cheaper and might not be reentrant at all. Therefore, we disable parallel sorting when not sorting by name to prevent crashes and other unpleasant behaviour. BUG: 312679 FIXED-IN: 4.10 REVIEW: 108309
2013-01-09Show the real audio file duration in additional informationsEmmanuel Pescosta
Big Thanks to Frank Reininghaus and Vishesh Handa! BUG: 311794 REVIEW: 108281 FIXED-IN: 4.10
2013-01-04autoupdate is on by default, remove unnecessary callsDavid Faure
2013-01-03Fix crash when browsing bluetooth device.Michael Jansen
When trying to browse a N900 it crashed here because pathA was empty. Which lead to index = maxIndex beeing -1 and pathA.at(index) crashing. Reorder the while condition to prevent that courtesy of tsdgeos. (cherry picked from commit f0c90a47de3f59e4a98932ae6f0499921d9aa899)
2012-12-30Fix crash when browsing bluetooth device.Michael Jansen
When trying to browse a N900 it crashed here because pathA was empty. Which lead to index = maxIndex beeing -1 and pathA.at(index) crashing. Reorder the while condition to prevent that courtesy of tsdgeos.
2012-12-13Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-12-12Fix Bug 240820 - [Usability Bug] Handling Bad Filenames, dolphin gives ↵Emmanuel Pescosta
unclear error message Fix Bug 308597 - Regression: Renaming a file/folder to something that contains a "/" will result in several message boxes Uses the same solution as Dolphin-Rename-Dialog does. (KIO::encodeFileName) BUG: 240820 BUG: 308597 REVIEW: 107681 FIXED-IN: 4.9.5
2012-12-07Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-12-07Fix keyboard focus handling after renaming items inlineFrank Reininghaus
This reverts 951cb9c35d7a9ef814b3de5b359915968da9b881 and 3143acc084d54d43df469b54762bfa10a7050a9f, and fixes the crash caused by nested event loops by delaying the deletion of the KItemListRoleEditor until the next item is renamed inline. BUG: 311206 FIXED-IN: 4.9.5 REVIEW: 107606
2012-11-25Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-11-25Fix regression caused by 4120805872c2e9fac909a403b83221c09c9110a2Frank Reininghaus
Copied items should not be shown in gray. Thanks to Christoph Feck for testing and reporting this regression! CCBUG: 304615 CCMAIL: [email protected]
2012-11-24Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-11-24Update the 'isCut' state of items when cutting non-files, e.g., textFrank Reininghaus
BUG: 304615 FIXED-IN: 4.9.4 REVIEW: 107390
2012-11-10Merge remote-tracking branch 'origin/KDE/4.9'Dawit Alemayehu
2012-11-09Fix Bug 309760 - Crash while inline-renaming a file and apply change with ↵Emmanuel Pescosta
return-key BUG: 309760 FIXED-IN: 4.9.4
2012-11-05Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-11-05Prevent crashes caused by nested event loops run when renaming inlineFrank Reininghaus
When renaming inline and starting a drag or invoking the context menu, a nested event loop will be run. If the role editor loses focus and emits roleEditingFinished(), we must prevent that deleteLater() is called because this would delete the role editor inside a nested event loop which is run from one of its own functions. We would get a crash when returning from that event loop otherwise. BUG: 308018 BUG: 309421 FIXED-IN: 4.9.4
2012-10-31Fix Bug 309338 - flood of error boxes while renaming a folder in the folder ↵Emmanuel Pescosta
panel BUG: 309338 FIXED-IN: 4.9.3 REVIEW: 107070
2012-10-30Fix some indentation issuesFrank Reininghaus
2012-10-30Remove workaround for bug 304986 which is not needed in masterFrank Reininghaus
Commit ea6a7c09a0067aaf62ef2de69b5a2c4967676768 added a workaround for bug 304986 (high CPU usage because KFileItemModelRolesUpdater requests previews for the same files over and over again after, e.g., a rename operation). The KDE/4.10 branch of kdelibs contains the real fix for this issue (b8f64ca3f4b6311519c21046031d66d9d0a570c6), so the workaround can be removed.
2012-10-30Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-10-29Fix Bug 153984 - Clicking cancel on the authentication dialog for ↵Emmanuel Pescosta
fish/sftp/ftp kioslave gets dolphin stuck on "Loading folder" BUG: 153984 REVIEW: 107116