┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
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
2012-10-28Fix wrong function call in KFileItemModelSortAlgorithm::sequentialSort (Bug ↵Emmanuel Pescosta
introduced in commit 429218eaf22c1bde24ba6875895c33facfa6ae12)
2012-10-28Implemented multithreading in KFileItemModelSortAlgorithm. Use as many ↵Emmanuel Pescosta
threads as possible. Thanks to Frank Reininghaus for all his suggestions. REVIEW: 107025
2012-10-27Workaround for failed comparison of items in KFileItemModelRolesUpdaterFrank Reininghaus
The real fix is in the KDE/4.10 branch of kdelibs (commit b8f64ca3f4b6311519c21046031d66d9d0a570c6). We work around the problem that the KFileItem that a preview has been requested for is different from the KFileItems in the sets m_pendingVisibleItems and m_pendingInvisibleItems by refreshing those sets when we detect that the bug has been triggered. BUG: 304986 FIXED-IN: 4.9.3
2012-10-26Merge remote-tracking branch 'origin/KDE/4.9'Christoph Feck
2012-10-26Fix color role of tree view arrowsChristoph Feck
BUG: 307734 FIXED-IN: 4.9.3 REVIEW: 107031
2012-10-25Use QPixmapCache for KStandardItemListWidget::pixmapForIcon(const QString& ↵Emmanuel Pescosta
name, int size) -> Avoid KIcon loading and rescaleing REVIEW: 107039
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-10-03Merge branch '4.9'Dawit Alemayehu
2012-09-29Find out the main window by calling the parent widget's window() memberFrank Reininghaus
KFileItemModel calls the dir lister's setMainWindow() method to make sure that the dir lister caches authentication data. However, the method used to determine the main window (qApp->activeWindow()) is not guaranteed to yield the DolphinMainWindow or the KonqMainWindow. In particular, if "Split View" is enabled in Dolphin's settings dialog, the active window is the dialog, and when it is closed, any later access to the stored pointer leads to a crash. A better method is to verify that the model's parent is a QWidget and then use this widget's window(). I had to make a small modification in DolphinMainWindow to make sure that it also works correctly when the view is split (the new view container had been created with a 0 parent previously). I tested it in Dolphin and Konqueror and verified that the "main window" passed to the dir lister is really the application's main window. BUG: 306459 FIXED-IN: 4.9.3
2012-09-28Redo the fix for CTRL+Tab not working when using Dolphin's filemanagement partDawit Alemayehu
in Konqueror. The original fix, commit 4f7ed2b, prevents drag and drop from working correctly. CCBUG: 302329 REVIEW: 106569
2012-09-27Merge branch '4.9'Dawit Alemayehu