By separating the width and height info, we can save some unnecessary
overhead in terms of memory and CPU cycles, and make the calculation of
the height of a row (or the width of a column in Compact View) a bit
simpler.
To achieve this, this patch extends the concept of "logical rows"
(which are actually columns in Compact View) to "logical width" and
"logical height" (which is the actual height and width, respectively, in
Compact View). The distinction between rows/columns and "logical"
rows/columns may be a bit confusing, but the confusion is already in the
current code, and I hope that it will be mitigated a bit by prefixing
the corresponding variables with "logical".
REVIEW: 118454
The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break
the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions.
FIXED-IN: 4.13
REVIEW: 112979
Currently, KStandardItemListWidgetInformant::itemSizeHint() calls the
model's data(int) method for every single item, but the full data is
actually only needed for the size calculation in Compact View. In
Details View, no data is needed at all to determine the size required
for the item, and in Icons View, only the name is needed.
This patch makes it possible for subclasses of
KStandardItemListWidgetInformant to provide an alternative way to
obtain the "text", and implements this in the subclass
KFileItemListWidgetInformant.
The final goal is to achieve that the QHash which contains all data
for a file item is only created if it is really needed, e.g., because
the view needs access to the data for displaying the item on the
screen.
REVIEW: 112253
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
If the role editor loses focus, it considers the current renaming
operation finished, and tells DolphinView to rename the file. This is a
problem when changing the directory, because the URL change happens
before DolphinView receives the signal, which results in a file in the
new directory being renamed unexpectedly.
The solution is to establish the connection to the
slotRoleEditingFinished signal only when the "rename inline" editor is
opened, and disconnect it when renaming is finished or canceled or the
URL changes.
BUG: 319912
FIXED-IN: 4.10.5
REVIEW: 110908
This reverts 951cb9c35d and
3143acc084, 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
Fix issue that cancelling the inline-renaming by clicking
on the other split view applies the wrong focus.
Thanks to Frank Reininghaus for the initial patch and noticing
this issue.
CCBUG: 301252
The dropping has not been implemented yet, however in the context of
this step the creating of the drag-pixmap is now forwarded to
the item-widgets. This allows creating some optimized dragging-pixmaps
e.g. for the details-view, where only the name and icon should
be provided as drag-pixmap.
Related changes:
- Animate changed items for the details-view in case it is not expandable
- Remove the hardcoded "isHidden"-code in KStandardItemListWidget and
allow derived widgets to define themselves what means "hidden" within
their context.
The current code needs a lot of bugfixing, but lets make this in smaller
steps during the next days...
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.