1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-07 10:51:45 +00:00
Commit Graph

5494 Commits

Author SHA1 Message Date
Elvis Angelaccio
6674c9c387 Port away from kdelibs4support
Summary:
It was only used as fallback when baloo was not found, but
`KFileMetaDataWidget` is useless without nepomuk.

The result of this patch is that the information panel and the tooltips
won't be available from platforms without baloo (instead of being
available but broken). The baloo dependency remains optional.

Closes T8720

Test Plan:
Build dolphin with `cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON ..` and
make sure it doesn't show tooltips or the information panel.

Reviewers: #dolphin, broulik, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Maniphest Tasks: T8720

Differential Revision: https://phabricator.kde.org/D14814
2018-08-21 01:03:33 +02:00
Kai Uwe Broulik
9134951cb0 Read UDS entry times directly and pretty-print on-demand
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only
interested in the actual pretty date once we show the role to the user.

Differential Revision: https://phabricator.kde.org/D14880
2018-08-20 11:49:25 +02:00
Kai Uwe Broulik
523c95bed0 Merge branch 'Applications/18.08' 2018-08-16 16:28:58 +02:00
Kai Uwe Broulik
f75b8a4287 Pretty-print "creationtime" role
It was forgotten and would show up as ISO date string instead of human-readable string.

Differential Revision: https://phabricator.kde.org/D14878
2018-08-16 16:27:55 +02:00
Jaime Torres Amate
e03cbe2584 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, bshah, nalvarez, cfeck, dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:50:52 +02:00
Jaime Torres Amate
adc5f6d3ac wrong name and email address
Summary: This reverts commit 2104d18a67.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-08-16 13:48:03 +02:00
Travis CI Bot
2104d18a67 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:06:06 +02:00
Christoph Feck
d58fb69408 GIT_SILENT Upgrade KDE Applications version to 18.08.0. 2018-08-06 22:41:40 +02:00
Nathaniel Graham
496ba56f42 Merge branch 'Applications/18.08' 2018-08-04 17:05:22 -06:00
Shubham Jangra
6e04f50081 Remove custom icon selection for trash
Summary: CCBUG:  391200

Test Plan:
1. Open Dolphin
2. Edit trash in places item
Result: No custom icon option available

Reviewers: ngraham, #dolphin, broulik, pino, elvisangelaccio, cfeck

Reviewed By: ngraham, #dolphin, elvisangelaccio, cfeck

Subscribers: rkflx, cfeck, elvisangelaccio, pino, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14378
2018-08-04 17:02:51 -06:00
Christoph Feck
aed8626f86 GIT_SILENT Upgrade KDE Applications version to 18.07.90. 2018-07-30 23:44:36 +02:00
l10n daemon script
2ef67bf094 GIT_SILENT made messages (after extraction) 2018-07-30 06:00:47 +02:00
l10n daemon script
cdb715eb42 GIT_SILENT made messages (after extraction) 2018-07-30 03:21:28 +02:00
Elvis Angelaccio
9be80423dc Drop redundant setAttribute for WA_DeleteOnClose
Every KMainWindow (which DolphinMainWindow inherits) already has this
attribute set.
2018-07-29 23:37:34 +02:00
Kai Uwe Broulik
438f599304 Merge branch 'Applications/18.08' 2018-07-26 10:18:34 +02:00
Kai Uwe Broulik
6d011e9730 Compare UDS entry times directly instead of going through KFileItem
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only interested in the
relative order, not absolute precise date time values.

CHANGELOG: Sorting files by date is significantly faster now

Differential Revision: https://phabricator.kde.org/D14394
2018-07-26 10:17:36 +02:00
David Hallas
2cbf3cb11e Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.

Test Plan: This leak was found using Address Sanitizer

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14178
2018-07-19 08:25:12 -06:00
Kai Uwe Broulik
80bc133da9 [KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.

Differential Revision: https://phabricator.kde.org/D14222
2018-07-19 08:24:53 -06:00
Kai Uwe Broulik
445b7cdade [KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.

Differential Revision: https://phabricator.kde.org/D14222
2018-07-19 10:17:38 +02:00
David Hallas
f186124f0e Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.

Test Plan: This leak was found using Address Sanitizer

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14178
2018-07-18 16:48:07 -06:00
Elvis Angelaccio
e6bf758406 Merge branch 'Applications/18.08' 2018-07-18 23:23:06 +02:00
David Hallas
4536e25ac9 Fixes memory leak in KItemListViewAccessible
Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory.

Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak.

Reviewers: #dolphin, jtamate, elvisangelaccio

Reviewed By: #dolphin, jtamate, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14168
2018-07-18 23:20:19 +02:00
David Hallas
43ab5bdc5f Removes unused member variables
Summary: The InformationPanel::m_pendingPreview and ApplyViewPropsJob::m_currentItem member variables are not used and can therefore be removed.

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14180
2018-07-18 23:20:08 +02:00
Albert Astals Cid
6072f3a683 GIT_SILENT Upgrade KDE Applications version to 18.11.70. 2018-07-16 19:59:42 +02:00
Albert Astals Cid
e76dce3906 GIT_SILENT Upgrade KDE Applications version to 18.07.80. 2018-07-16 19:26:57 +02:00
Nathaniel Graham
9d1a3abd35 Modernize View Properties window
Summary:
Like D12571, but for the {nav View Properties} Window. Also did a little bit of re-organization. This allows us to use a `QFormLayout` as the top-level layout and simplify the code a lot, including no longer using the now-unnecessary paradigm of putting a layout inside a `QWidget`, and ending the use of `QGridLayout` to make a fake and more complicated form-style layout.

Depends on D13749

Test Plan:
Window still resizes properly when the Additional Information content is shown or hidden.

Global view properties, additional information hidden:
{F6035943}

Global view properties, additional information shown:
{F6035945}

Per-folder view properties, additional information hidden:
{F6035869}

Per-folder view properties, additional information shown:
{F6035870}

Reviewers: #dolphin, elvisangelaccio, broulik, #vdg

Reviewed By: #dolphin, elvisangelaccio

Subscribers: abetts, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13768
2018-07-14 13:55:40 -06:00
Jaime Torres
23c5fce77f Speedup sort
Summary:
Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup.

Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-14 19:37:48 +02:00
Jaime Torres
ec89af6778 Revert to change the commit message.
Summary: This reverts commit 765cc968c9.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-07-14 19:35:47 +02:00
Jaime Torres
765cc968c9 Speedup sort
Summary:
Use a lambda function to use only one QCollator initialized only once.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-13 18:55:42 +02:00
Kai Uwe Broulik
1ba972adf5 [KFileItemModelRolesUpdater] Fix preview scaling for frameless previews
Follow-up to D11319 for e.g. folder previews

Differential Revision: https://phabricator.kde.org/D14047
2018-07-11 15:43:16 +02:00
Kai Uwe Broulik
ae3438eb08 [KStandardItemListWidget] Avoid needless image resizing
There be rounding errors when scaling pixmaps when keeping aspect ratio

Differential Revision: https://phabricator.kde.org/D11319
2018-07-11 15:41:58 +02:00
Friedrich W. H. Kossebau
64f7108d83 Mark PHONON_INCLUDES dirs as SYSTEM, so compiler omits them for warnings 2018-07-08 14:13:52 +02:00
Jaime Torres
bd08aa09b2 A complete build does not fix the crashes I'm having.
I prefer to wait until QQCollator is thread safe or
someone discovers why this is happening now and not before.

Summary: This reverts commit 63825de82f.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-07-07 15:16:22 +02:00
Jaime Torres
63825de82f Speedup sort
Summary:
Use a lambda function instead of a class.
This way the member QCollator is not copied and initialized several times.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-06 17:12:35 +02:00
Nathaniel Graham
02c94b228a Modernize Settings window
Summary: This patch modernizes the appearance of Dolphin's configuration window by following the KDE HIG as much as possible and following design cues from Plasma and System Settings.

Test Plan:
Tested all settings to make sure they still work; they do.

Startup page, before:
{F5825313}

Startup page, after:
{F5918574}

View page (Icons), before:
{F5825319}

View page (Icons) after:
{F5918575}

View page (Compact), before:
{F5825321}

View page (Compact) after:
{F5918700}

View page (Detailed), before:
{F5825323}

View page: (Detailed), after:
{F5918701}

Navigation page: no change

Trash page, before:
{F5858748}

Trash page, after:
{F5866656}
(Provided by {D12986})

General page (behavior), before:
{F5825316}

General page (behavior) after:
{F5918572}

General page (confirmations), before:
{F5866885}

General page (confirmations), after:
{F5918702}

General page (status bar): no change

Reviewers: #dolphin, #vdg, broulik, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: fabianr, cfeck, medhefgo, zzag, rkflx, kfm-devel, elvisangelaccio, abetts

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12571
2018-07-05 21:24:49 -06:00
Friedrich W. H. Kossebau
85d7a8a2f6 Use more nullptr 2018-07-04 23:43:22 +02:00
Friedrich W. H. Kossebau
cd4f42b33a Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead 2018-06-29 18:42:00 +02:00
Nathaniel Graham
b488dc0126 Port from KComboBox to QComboBox
Summary: None of Dolphin's current usages of `KComboBox` use any of its additional features beyond `QComboBox`, so let's use `QComboBox` instead.

Test Plan: Tested all features that use comboboxes in Dolphin. No visual or functional changes or regressions.

Reviewers: #dolphin, elvisangelaccio, broulik

Reviewed By: #dolphin, elvisangelaccio

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13749
2018-06-27 14:29:48 -06:00
Elvis Angelaccio
280c974481 Use collapsible box to configure visible roles
Summary:
A modal dialog that opens another modal dialog is bad UX and should be
avoided whenever possible. These days we have `KCollapsibleGroupBox`
that can be used to show advanced settings without cluttering the
default layout.

This change removes the `AdditionalInfoDialog` and uses a collapsible
groupbox instead. The `Apply` buttons gets enabled whenever a role gets
checked or unchecked, consistently with the existing checkboxes.

Test Plan: Change visible roles in the view properties dialog.

Reviewers: #dolphin, #vdg

Reviewed By: #vdg

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13569
2018-06-26 22:13:51 +02:00
Tomaz Canabrava
9b7ceaa74d don't use temporaries when uneeded
Summary:
Remove unused variable

Compiled, Run. Trash still there.

Use copy ellision

Remove uneeded code

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13680
2018-06-26 11:06:36 +02:00
Tomaz Canabrava
088e692007 don't use temporaries when uneeded
Summary:
Remove unused variable

Compiled, Run. Trash still there.

Use copy ellision

Remove uneeded code

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13680
2018-06-22 16:17:47 +02:00
Tomaz Canabrava
6b72c67b09 Use copy ellision 2018-06-22 15:30:11 +02:00
Tomaz Canabrava
f5ce8d865b Remove unused variable
Compiled, Run. Trash still there.
2018-06-22 15:21:00 +02:00
Tomaz Canabrava
e1ba299b29 don't use temporaries when uneeded 2018-06-22 15:20:38 +02:00
l10n daemon script
9b2a9704ee GIT_SILENT made messages (after extraction) 2018-06-22 03:17:51 +02:00
Nathaniel Graham
d7d403379d Move General settings to the top
Summary: KDE apps generally (ha ha) have their {nav General} page at the top of the list, so it's the first thing the user sees when they open the {nav Settings} window, but Dolphin is an exception. It puts the {nav General} page //last!// This patch makes Dolphin consistent with other KDE apps by moving the {nav General} page up to the top.

Test Plan: {F5918590}

Reviewers: #dolphin, #kde_applications, elvisangelaccio, ltoscano

Reviewed By: elvisangelaccio, ltoscano

Subscribers: kde-doc-english, ltoscano, elvisangelaccio, kfm-devel

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D13595
2018-06-19 16:55:23 -06:00
Laurent Montel
26e629a78e Do not duplicate work of KAboutData::setupCommandLine() 2018-06-19 08:57:39 +02:00
Elvis Angelaccio
32b8b19ba5 ViewPropertiesDialog: disable Apply button on startup
We call `markAsDirty(false)` at the end of `loadSettings()` but that's
not enough, because `m_isDirty` is initialized to false (as it should be).
This means `isDirtyChanged` is not emitted and the button is not disabled.

By disabling it explicitly, we make it consistent with the Apply button
in the settings dialog (which is also initially disabled).
2018-06-13 23:16:33 +02:00
Elvis Angelaccio
615838083d Merge branch 'Applications/18.04' 2018-06-13 21:42:41 +02:00
Elvis Angelaccio
9616edbb66 Fix loop of FocusIn events
Summary:
Commit 43da84eefc introduced the risk of entering an endless loop of
`FocusIn`/`FocusOut` events sent to two DolphinSearchBox instances when
opening a second tab (see D11871).

This happens because we deactivate the first tab when we open a new one, but
since the `setActive(true)` is delayed with a QTimer, both the old tab
and the new one become active and receive their own `FocusIn` event
(which starts the loop of focus in/out events).

To prevent this issue, we schedule the searchbox activation only if the
searchbox is not already active.

Test Plan:
- Search something in dolphin
- Open a new tab after the search ends
- Check that dolphin does not eat the CPU

Reviewers: #dolphin, anthonyfieroni

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13152
2018-06-13 21:39:22 +02:00