Commit graph

983 commits

Author SHA1 Message Date
Felix Ernst 998d71e5a7 Remove item move animation on view resize
This commit removes an animation that happens when the view is
resized. Before this commit, whenever the geometry of the view
changed, the items in the view drifted towards their new position
in the layout after a 300 ms delay. It would look like the items
are slow to find their position.

This commit simply moves them to their new position in an instant
which will abort any ongoing move animations.
2021-02-10 15:16:42 +01:00
Nicolas Fella f65b0899c3 Build with QT_NO_KEYWORDS 2021-02-09 20:39:50 +00:00
Nicolas Fella 3184c2707f Port to QRecursiveMutex
QMutex::Recursive is deprecated
2021-02-09 00:54:45 +01:00
Ahmad Samir dd9405bf2f Port away from deprecated KIO signals
Use KDirLister::listingDirCompleted(const QUrl &) instead of
completed(const QUrl &).
2021-02-08 21:38:34 +00:00
Ilia Kats 3b4dae3556 fix folder size calculation on FUSE and network file systems
KFileItem::isSlow uses hardcoded logic that returns true if the
filesystem is Smb or Nfs. However,
KFileSystemType::determineFileSystemTypeImpl on Linux returns Nfs also
if the file system in question is a FUSE file system, which includes
NTFS, sshfs, and others.

BUG: 430778
BUG: 431106
2021-01-15 20:41:24 +00:00
Stefan Brüns cade3eb302 [BalooRolesProvider] Use Property IDs instead of string matching
Instantiating KFileMetaDataInfo for each file and property, even when
the role is not used, is somewhat expensive and unnecessary. Use the
numeric Property ID to map it to a role, and only instantiate the used
PropertyInfo's.

Remove the properties provided by KFM::UserMetaData from the map, as
these will newer match.
2021-01-11 12:28:38 +01:00
Stefan Brüns dcdf4b01c8 [BalooRolesProvider] Reduce number of XAttr reads
Typically most of the extended attributes are not set for a file. Instead
of trying to fetch each attribute individually check which attributes
exist first.
2021-01-11 12:28:38 +01:00
Stefan Brüns fa60438376 [BalooRolesProvider] Remove explicit default constructor calls 2021-01-11 12:28:38 +01:00
Stefan Brüns 7d716fd9bd [BalooRolesProvider] Remove unused roleForProperty method 2021-01-11 12:28:38 +01:00
Stefan Brüns 09b6c99325 [BalooRolesProvider] Simplify single tag case
When the list contains just one value, return it instead of trying to
sort the list with a QCollator.
2021-01-11 12:28:33 +01:00
Stefan Brüns 34f74e4226 [BalooRolesProvider] Move static tagsFromValues to anonymous namespace 2021-01-11 12:27:11 +01:00
Stefan Brüns 4c31ec3789 [BalooRolesProvider] Remove unused includes 2021-01-11 12:27:11 +01:00
Kai Uwe Broulik eb4b0fb480 Emit "itemMiddleClicked" when Ctrl-clicking a view in single selection mode
When Ctrl can't cause a change in selection, so instead emit `itemMiddleClicked`.
This way one can Ctrl-click a Place or folder in Folders panel to open it in
a new tab, similar to what web browsers.
2021-01-10 10:50:41 +01:00
Méven Car f0d03c7dd7 Details View: display dates as relative Short dates
CCBUG: 340982
2020-12-24 00:11:21 +00:00
Nate Graham 9abe299c77 Merge branch 'release/20.12' 2020-12-23 11:40:09 -07:00
Eduard Manta 303740c68a Fix vertical scroll with horizontal component not being recognized properly
BUG: 430532

a scroll that includes an horizontal component != 0 might still be a vertical scroll
2020-12-23 17:17:19 +01:00
Ilia Kats acc42f9189 fix display of folder sizes for empty folders
also fixes 1 byte error in size calculation for all folders
2020-12-17 13:04:01 +01:00
Carson Black ad9c955835 [kitemlistview]: Animate rubberband fading out 2020-11-28 21:11:44 +00:00
Méven Car b3c37507dc Re-allow icons that are not theme icon
Particularly concerned are .desktop files.

See also:
15baa93640

BUG: 429113
2020-11-19 21:48:15 +00:00
Alexander Lohnau 1208f86696 Fix qrc icon
Apparently the icon was not null, because the mimetype was known.
But there was no icon associated with it and we got an
icon which is not null, but has a null pixmap.
2020-11-12 17:16:50 +01:00
Elvis Angelaccio f6327ffec8 Add missing reference 2020-11-08 23:23:07 +01:00
Ismael Asensio ee4ab8ce69 Iterate over a const copy list of containers
This effectively reverts the mutable iterations approach on
2448f88c5f, and fix crashes
and ghost items when using the filter bar

BUG: 428374
2020-11-08 21:59:34 +00:00
Méven Car 1c2fbdef09 KDirectoryContentsCounter: fix support of symlinks dir
BUG: 428712
FIXED-IN: 20.12
2020-11-07 06:21:11 +00:00
Méven Car 61bf84c13d Details view: display empty text instead of unknown for sizeless dirs
BUG: 420037
BUG: 420040
FIXED-IN: 20.12
2020-11-05 08:50:55 +01:00
Chris Holland 6a196bf69d Move m_textInfo to fix ctor warning, and document why it's protected. 2020-11-04 23:16:13 +00:00
Chris Holland ac6de72048 Draw 2 Rectangles below mount points to represent a disk capacity bar
Draws overtop text that's goes below the baseline like a 'j'. It's
fairly difficult to add extra space below the text as the places view
is a "details" view, so the text is vertically centered in the
widget's "row" as you'd desire it to in the main file view.

We can make the widget 8px taller, adding 4px above and below so
there's adequate room for the capacitybar, but that wastes 4px for
each mount point.

Ideally we'd use the "compact" view, which displays the text/size in a
column beside the icon. However the compact view was not designed to
take up the entire width of the viewport. It's also designed to
overflow with a horizontal scrollbar.
2020-11-04 23:16:12 +00:00
Ezike Ebuka e9a39700fc Improve padding in the Places View 2020-11-04 21:54:10 +00:00
Méven Car ffe01ee840 FolderPanel: prevents scanning directory tree recursively
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater.
It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively.

Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater.

BUG: 426617
FIXED-IN: 20.08.3
2020-11-03 02:21:43 +00:00
Elvis Angelaccio 327c22bc3b Use QString::rightRef() as suggested by clazy 2020-11-01 23:31:58 +01:00
Martin T. H. Sandsmark 15baa93640 make sure we use valid icons 2020-11-01 22:17:17 +00:00
Martin T. H. Sandsmark 891ebf5758 Fix warnings about scaling pixmaps 2020-11-01 22:17:17 +00:00
Lothar Paltins 129570b131 Fix wrong parameter in function call
In KDirectoryContentsCounterWorker::CountResult, the first parameter in
the call of walkDir was wrong. It should be path without conversion,
because the conversion is done in the called function.

BUG: 428282
2020-10-27 15:54:03 +01:00
Alexander Lohnau 2448f88c5f Use mutable iterators where required 2020-10-24 16:46:34 +02:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Elvis Angelaccio be3ffecf0b KItemListSizeHintResolver: remove no longer used member 2020-10-23 19:02:32 +02:00
Laurent Montel 40cc911319 Remove not implmemented method 2020-10-17 18:05:17 +02:00
Elvis Angelaccio 1ded75ce44 Stop using QVariant < operator
It will be removed in Qt 6 without porting strategy:
f43cb31ba0

We know that that variants will be either ints (for `count`) or longs (for `size`),
so just convert them to longs (to avoid overflows) and compare those.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio d9956c620e Drop obsolete version check
We require Qt 5.14 now.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio a403df91b7 Port to non-deprecated QString::split() variant
This requires Qt 5.14, which we now depend on.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio 3bf2922e33 Port away from QList::toSet()
The QSet range constructor requires Qt 5.14.

In `DolphinView::slotHeaderContextMenuRequested()` the conversion from
QList to QSet was pointless, so we just use a QList now.
2020-10-15 01:22:00 +02:00
Ahmad Samir aa12f9ec1d Don't trigger rubberband with back/foward mouse buttons
Right now the back/foward mouse buttons work, but also if you hold either
of them and move the mouse the rubberband selection is triggered.

This is the correct fix (instead of commit d0c71a1435), to match the
original code before the touch events patches,  we need to check the
back/foward buttons after mouseButtonPressed is emitted and before
triggering the rubberbad selection.
2020-10-04 19:41:40 +00:00
Elvis Angelaccio 041d6a4bd8 Fix build failure after last commit 2020-09-26 17:12:39 +02:00
Steffen Hartleib 81cf9f0375 Allow interaction with folder/files with the stylus again
This Patch works for Wayland and X.

BUG: 426582
2020-09-26 14:53:57 +00:00
Ahmad Samir d0c71a1435 Fix mouse back/forward buttons
We need to emit mouseButtonPressed (now in the onPress method) before the
check needed to not select items on back/foward mouse button press events.
2020-09-20 18:38:29 +02:00
Steffen Hartleib d7b33b76a1 Improve Touch support
With this patch dolphin now supports the following touch gestures:

* Tap gesture to interact/open with directories, files and so on
* TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information)
* TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places)
* pinch gesture for zoom in main window
* kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service
* two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up
* two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click

FEATURE: 385066
FIXED-IN: 20.11.80

 You are currently rebasing branch 'touch' on '85241a924'.
2020-09-13 18:53:32 +00:00
Ayushmaan jangid d899c2b401 Fix wreorder warning 2020-09-13 17:52:09 +00:00
Elvis Angelaccio 576a97d8eb Merge branch 'release/20.08' into master 2020-09-05 22:55:59 +02:00
Elvis Angelaccio aee26d29f1 Revert "Set a better defaultDropAction for dragging"
This reverts commit 4440e961a0.

BUG: 425757
BUG: 426196
FIXED-IN: 20.08.2
2020-09-05 22:51:36 +02:00
Laurent Montel 7479fef799 Port away from deprecated Qt::MidButton 2020-08-31 21:24:03 +02:00