Commit graph

5758 commits

Author SHA1 Message Date
Kai Uwe Broulik 289ef9fa49 Merge branch 'Applications/18.08' 2018-09-05 12:24:47 +02:00
Kai Uwe Broulik 1e7e4fad49 [KStandardItemListWidget] Round to icon size before applying scaling
Otherwise for 22px icons on high dpi we will request either the wrong icons or scale them needlessly.
Dolphin requests a pixmap of 22px, this is then multiplied by dpr resulting in 44 which isn't a valid icon size (only 32 or 48 are).
Moreover, we will also hit the path where it will scale the pixmap to a proper icon size resulting in blurry icons
(and a performance penalty).

Differential Revision: https://phabricator.kde.org/D15260
2018-09-05 12:24:10 +02:00
David Edmundson f3c92120aa Merge branch 'Applications/18.08' 2018-09-04 14:21:00 +02:00
David Edmundson 5f252da8b5 Correctly save behaviourOnLaunch
Summary:
We only wrote out a checkbox value if the checkbox was checked.
Unchecking it would not do anything.

BUG: 398022

Test Plan:
Read KRun's exepcted values
Unchecked config option
Reloaded dolphin
Checkbox remained off

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15147
2018-09-04 14:20:33 +02:00
Kai Uwe Broulik cc3eb7d757 Merge branch 'Applications/18.08' 2018-09-04 09:02:07 +02:00
Kai Uwe Broulik b734386cbc Don't use QIcon::Selected state for selected icon
This causes selected monochrome Breeze icons to turn white as this state is meant for when the icon is actually painted ontop of
e.g. a blue highlighted area in a menu
Since the advanced icon configuration (where you could choose a custom hint color and other effects) has been removed in Plasma 5.13
and more importantly the fact that Dolphin always tints the icon in the highlight color disregarding any custom icon effects settings
this is an acceptable change.

CHANGELOG: Fixed monochrome icons turning invisible when selected

BUG: 398014
FIXED-IN: 18.08.2

Differential Revision: https://phabricator.kde.org/D15255
2018-09-04 09:01:04 +02:00
David Hallas aaaaea8e28 Renames DolphinViewContainer::getCaption to caption
Summary:
This commit renames the DolphinViewContainer::getCaption to simply
caption, this was a review comment that I failed to fix in a previous
commit.

Test Plan: None

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15114
2018-09-02 11:11:41 +02:00
David Hallas 5a9567730d Changes the tabName function to return the name of a specific tab
Summary:
Changes the tabName function to return the name of the passed in
DolphinTabPage. Previously it would return the name of the active tab,
which causes in-active tabs to get the wrong name.

Test Plan:
Open Dolphin
Right click a folder and select 'Open in new tab'
Notice that the new tab has the wrong title

BUG: 397910

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15112
2018-09-02 11:08:15 +02:00
Elvis Angelaccio a23acffd5e Add test case for open-in-new-tab title regression
Fix will be in D15112.

CCBUG: 397910
2018-09-02 10:55:51 +02:00
Christoph Feck ec3b63c8dc GIT_SILENT Upgrade KDE Applications version to 18.08.1. 2018-08-31 18:38:35 +02:00
Yuri Chornoivan 50702506fa Fix minor EBN issues 2018-08-30 21:29:01 +03:00
Fabian Vogt 1d943518ad Consider all thumbnailers for the information panel and tooltips
Summary:
The text thumbnail is really useful in tooltips, but disabled by default in
KIO. Having just a larger version of the placeholder icon from the theme
doesn't make a lot of sense, so try the best to get a proper preview.
Same applies to the information panel, which would otherwise just
show the same icon.

Test Plan:
Got textfile previews in tooltips and in the information panel even if
disabled.

Reviewers: #dolphin, elvisangelaccio, broulik, markg, ngraham

Reviewed By: #dolphin, broulik, ngraham

Subscribers: abetts, markg, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15138
2018-08-29 17:19:42 +02:00
David Hallas 44a21ea51a Unify window and tab title
Summary:
Previously the title of tabs was a prettyfied version of the URL.
This is inconsistent with the title of the Window and in some cases
for specials URLs kind of misleading. This commit generalizes the
code from DolphinMainWindow so that both the DolphinMainWindow title
and the tab title uses the same function for the title. This also
means that the 'Show Full Path in Title Bar' also applies to the
tab title, and also that searches changes the tab title.

FEATURE: 387851

Test Plan: Open a new tab from the places panel and navigate around.

Reviewers: #dolphin, ngraham, elvisangelaccio, markg

Reviewed By: #dolphin, ngraham, markg

Subscribers: markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14442
2018-08-24 12:09:26 +02:00
Henrik Fehlauer 79c485a66d Restore settings label and prevent warning when Baloo is unavailable
Summary:
As discussed in D14814, 6674c9c387 removed the {nav Show tooltips}
checkbox in Dolphin's preferences when Baloo is unavailabe at compile
time and thus the tooltip would not be functional. The {nav Miscellaneous}
label in front of the checkbox was also removed, even though it relates
to all options in that group.

In addition, after 6674c9c387 running Dolphin without Baloo support
would print
  QWidget::insertAction: Attempt to insert null action
on startup.

Both issues can be fixed with more `#ifdefs`.

Test Plan:
After building with `-DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON`, the
{nav Show tooltips} checkbox is removed, the {nav Miscellaneous} label
is still there, and there is no warning printed.

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14980
2018-08-22 23:49:17 +02:00
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