┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodelrolesupdater.cpp
AgeCommit message (Collapse)Author
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-12-13Fix compilation when baloo is not presentValentin Rusu
2015-11-28Fix wrong path->URL conversion.David Faure
2015-11-04Use the new KOverlayIconPlugin interface from KIO::WidgetsOlivier Goffart
REVIEW: 125675
2015-10-10Only perform operations with Baloo if it is enabledVishesh Handa
REVIEW: 125584
2015-03-27review commentsDavid Edmundson
2015-03-26Make KPixmapModifier::applyFrame handle high DPI imagesDavid Edmundson
2015-03-25Provide scaled pixmaps in the main file modelDavid Edmundson
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2015-02-06Fix includesMontel Laurent
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-18Fix includesMontel Laurent
2014-10-14Port Dolphin to the new Baloo APIsVishesh Handa
REVIEW: 120582
2014-10-07kdelibs4support--Montel Laurent
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-06-27Fix build.Christophe Giboudeaux
2014-06-20kde-baseapps frameworks dolphin with snapshot frameworks branch ↵Scarlett Clark
baloo/baloo-widgets path fixes.
2014-05-05Allow compiling with the frameworks branches of BalooAlex Richardson
2014-05-05dolphin: convert kitemviews/ to qt5 signal slot syntaxAlex Richardson
This conversion was performed automatically using convert2qt5signalslot. The only manual changes required were changing the overloaded signal KDirLister::redirection and KDirLister::completed from KUrl to QUrl. All other cases were no problem since these signals are not overloaded and a static_cast for disambiguation is not necessary. Code inside HAVE_BALOO is not converted yet, will do that once I can build a version with Baloo.
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395
2014-02-06Port Dolphin to BalooVishesh Handa
Nepomuk is being replaced with Baloo
2014-01-06Avoid calling KFileItemModel::index() in KFileItemModelRolesUpdaterFrank Reininghaus
KFileItemModel allows to find out the index of a KFileItem with its index(const KFileItem&) method. Calling this method is not extremely expensive, but it's also not free (it looks up the URL of the KFileItem in a QHash, i.e., it has to call qHash(QString) for the full URL). In KFileItemModelRolesUpdater, we sometimes converted the known index to a KFileItem and then back to an index in applyResolvedRoles(KFileItem). This patch fixes this by modifying applyResolvedRoles such that it takes the index directly as its argument. REVIEW: 114847
2013-09-04Count the items inside directories in another threadFrank Reininghaus
This prevents that the GUI freezes if there are many files inside the directory, or if the access to the directory is slow for some other reason. BUG: 318518 REVIEW: 111920 FIXED-IN: 4.12.0
2013-08-14Fix slow scrolling when hidden files or symbolic links are shownFrank Reininghaus
The problem was that we drawed the overlays using KIconLoader, which can be very slow, every time an item appeared on the screen. This commit makes sure that not only the icon, but the icon including overlays is cached in QPixmapCache. Therefore, the overlay drawing is done just once for each icon+overlays combination. For previews, the overlay drawing is done in KFileItemModelRolesUpdater just after the preview is received. BUG: 310662 BUG: 314339 FIXED-IN: 4.11.1 REVIEW: 111956
2013-07-18Overwrite the changed role value with an empty QVariant,Emmanuel Pescosta
because the nepomuk roles provider doesn't overwrite it when the property value list is empty. BUG: 322348 REVIEW: 111505 FIXED-IN: 4.11.0
2013-07-12Load unknown icons for items just before showing items in the viewFrank Reininghaus
Rather than loading many icons (without full mime type determination) in advance, we make sure that an item has an icon just before it is shown in the view. This makes sure that no "unknown" icons are shown unnecessarily, and saves some resources. REVIEW: 111396
2013-06-22Dolphin: Do not try to connect to Nepomuk if it is not runningVishesh Handa
Each time one uses any of the Nepomuk classes, an attempt is made to connect to the database. This slows down the application since connecting to Nepomuk is not so cheap. BUG: 321299
2013-06-20Some simplifications in KFileItemModelRolesUpdaterFrank Reininghaus
This removes some things that are obsolete after the recent commits: (a) resolveNextPendingRoles() is not called any more when the preview job is running. (b) In applyResolvedRoles(), we always load the icon if it isn't known yet. This ensures that every item has an icon. REVIEW: 111012
2013-06-20Try to do at least a "fast" icon loading for all itemsFrank Reininghaus
If all icons for the visible items could be loaded in 200 ms, we continue loading icons without mime type determination for all items until the 200 ms are over. This reduces the risk that the user ever sees "unknown" icons. REVIEW: 111011
2013-06-20Make sure that all visible items have an iconFrank Reininghaus
We try to determine "final" icons, i.e., icons with known mime type, for 200 ms. If this does not succeed, we at least load "fast" icons, i.e., load the icons without determining the mime type. REVIEW: 111009
2013-06-20Simplify handling of preview jobsFrank Reininghaus
This patch changes two things about the way we handle the preview jobs: (a) Rather than passing a KFileItemList to startPreviewJob(), remembering the leftovers in the member variable m_pendingPreviewItems and then starting a new preview job for these, we append items that need a preview to this member, and let startPreviewJob() take its input from there. This simplifies the code greatly. (b) To prevent that we start preview jobs with just one item and also that the GUI is frozen too long by startPreviewJob(), we take the following approach: * If the mime type of the first pending item is known, the function has probably been called by startUpdating(), which has determined mime types for the visible items already. startUpdating() has also blocked the GUI, so we just take all items at the beginning of the list with known mime type, and do not do any expensive mime type determination in startPreviewJob(). * If the mime type of the first pending item is unknown, the function has probably been called by slotPreviewJobFinished(). In that case, we can afford to block the GUI for a short while, so we determine mime types for 200 ms. REVIEW: 111008
2013-06-07Remove unused argumentFrank Reininghaus
I saw a runtime warning from QMetaObject::invokeMethod() that KJob* is not a registered type. Since we don't use that argument in slotPreviewJobFinished(KJob*) anyway, it's best to remove it.
2013-06-06Ignore a changed item if it cannot be found in the modelFrank Reininghaus
This prevents repeated attempts to reload the data for the non-existing item. This was the root cause of bug 320791. Thanks to Hrvoje Senjan and Jekyll Wu for testing the new code and finding this bug! BUG: 320791
2013-06-06Make calls to resolveNextPendingRoles and resolveNextSortRole delayedFrank Reininghaus
This prevents that functions that call these indirectly call themselves recursively and cause trouble. BUG: 320791
2013-06-06startPreviewJob: if items is empty, delay call to slotPreviewJobFinshedFrank Reininghaus
This should prevent that other functions, which start preview jobs, eventually call themselves and thus cause trouble. CCBUG: 320791
2013-06-05KFileItemModelRolesUpdater: waste less ressources and fix some bugsFrank Reininghaus
The main change in this commit is that we do not determine expensive roles (like previews, mime types, etc) for all items, but only for the visible ones and those close to the visible area or on the first and the last page of the view. This prevents that the CPU and hard drive are kept busy for quite some time after entering a folder while all items are handled asynchronously. There is one known problem at the moment: when sorting by "Type" or another role that can be resolved by KFileItemModelRolesUpdater, the icons of the visible items are sometimes not loaded while the sorting is still in progress. I will try to fix this issue during the next few days. REVIEW: 110839
2013-05-22KFileItemModelRolesUpdater: only update the size for changed foldersFrank Reininghaus
When using inotify, we also receive signals for modified files, even if we only ask KDirWatch to watch the directory containing them. In that case, we must not set the size to -1 (which means "unknown number of items" for folders) temporarily, or we end up with an apparent file size of 2^64 - 1 bytes. BUG: 309740 FIXED-IN: 4.10.4 REVIEW: 110428
2013-04-22Always determine icons for the visible items firstFrank Reininghaus
When entering a folder, KFileItemModelRolesUpdater has not yet been informed about the visible index range by the view when it tries to determine icons synchronously. This resulted in the problem that it tried to determine icons for all items in random order, and some visible icons were somtimes still unknown after the "synchronous icon loading" timeout of 200 ms. This commit tries to improve the situation by loading icons starting with the first item in increasing order. This should make it less likely that some visible items still have unknown icons after 200 ms. BUG: 316129 FIXED-IN: 4.10.3 REVIEW: 109843
2013-03-27Update icon if it couldn't be determined upfront (.desktop file on slow mount)David Faure
This requires an up-to-date kdelibs >= 4.10. CCBUG: 290666
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
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-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-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-09-27Merge branch '4.9'Dawit Alemayehu
2012-09-27Some speed improvements in KFileItemModelRolesUpdater:Emmanuel Pescosta
- Use QSet.erase() instead of QSet.remove() => no expensive Rehashing - Get rid of += in sortAndResolvePendingRoles() - Some other small changes REVIEW: 106577
2012-09-26Fix a Bug in KFileItemModelRolesUpdate::setEnabledPlugins.Emmanuel Pescosta
Changes were never overtaken because of a wrong comparison. FIXED-IN: 4.9.2
2012-09-24Fix crash when receiving Nepomuk info for a recently deleted file.Frank Reininghaus
BUG: 306036 FIXED-IN: 4.9.2
2012-08-06Stop preview jobs when closing DolphinFrank Reininghaus
Patch by Benni Hill. Thanks for the patch! CCBUG: 304467 (cherry picked from commit 4d39dbc9620cd30826bfab4a42cf31702aeac6d8)