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
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
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
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
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
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
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.
Differential Revision: https://phabricator.kde.org/D14222
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.
Differential Revision: https://phabricator.kde.org/D14222
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
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
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
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
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
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
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:
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
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
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
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
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
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).
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