]> cloud.milkyroute.net Git - dolphin.git/log
dolphin.git
7 years agoMerge remote-tracking branch 'origin/Applications/18.08'
Jaime Torres Amate [Sat, 6 Oct 2018 08:32:29 +0000 (10:32 +0200)]
Merge remote-tracking branch 'origin/Applications/18.08'

merge https://phabricator.kde.org/D15371

7 years agoDon't assign twice the same key to the action New Tab
Jaime Torres Amate [Sat, 6 Oct 2018 07:59:10 +0000 (09:59 +0200)]
Don't assign twice the same key to the action New Tab

Second try:
added Qt::CTRL + Qt::Key_T and Qt::CTRL + Qt::SHIFT + Qt::Key_N
as QKeySequence::AddTab is only Qt::CTRL + Qt::SHIFT + Qt::Key_N
under plasma.

7 years ago[PlacesItemModel] Update apidox
Elvis Angelaccio [Thu, 4 Oct 2018 21:03:23 +0000 (23:03 +0200)]
[PlacesItemModel] Update apidox

Should have been part of da6f8fe0862585287153 (the grouping feature has
been moved upstream to KIO).

7 years ago[PlacesItemModel] Drop unused forward declaration
Elvis Angelaccio [Thu, 4 Oct 2018 20:57:43 +0000 (22:57 +0200)]
[PlacesItemModel] Drop unused forward declaration

No longer needed since da6f8fe0862585287153f0d90e.

GIT_SILENT

7 years ago[PlacesItemModel] Drop dead code
Elvis Angelaccio [Thu, 4 Oct 2018 20:52:51 +0000 (22:52 +0200)]
[PlacesItemModel] Drop dead code

m_bookmarkedItems is long gone (since commit da6f8fe0862585287153).
Porting `showModelState()` to the new KFilePlacesModel source model is
not worth it, since this was just a debugging function and most of the
logic has been moved upstream anyway (see T7040).

7 years agoChange icon for the 'Edit...' context menu entry in Places panel
Thomas Surrel [Thu, 4 Oct 2018 17:45:23 +0000 (11:45 -0600)]
Change icon for the 'Edit...' context menu entry in Places panel

Summary:
The current icon is used for displaying the Properties context menu
in other places in dolphin. Change to edit-entry.

Test Plan: Right-click on a place in the Places panel.

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15938

7 years agoMerge branch 'Applications/18.08'
Andreas Krutzler [Wed, 3 Oct 2018 18:10:04 +0000 (20:10 +0200)]
Merge branch 'Applications/18.08'

7 years agoFix that dragging a file can trigger inline rename.
Andreas Krutzler [Tue, 2 Oct 2018 18:25:57 +0000 (20:25 +0200)]
Fix that dragging a file can trigger inline rename.

Summary:
Inline renaming is aborted as soon as an item is dragged. Previously, ’m_dragging' was used to determine if an item was being dragged. However, inline renaming is triggered after a certain amount of
time, during which time the user may have stopped dragging items.

BUG: 398375
FIXED-IN: 18.08.2

Test Plan: When dragging an selected item, inline renaming should never be started, regardless of where you drag it (Places panel, other split-view window, out of the Dolphin window, ...).

Reviewers: wbauer, elvisangelaccio, #dolphin, ngraham

Reviewed By: wbauer, elvisangelaccio, #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15904

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.08.2.
Christoph Feck [Wed, 3 Oct 2018 17:00:48 +0000 (19:00 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.08.2.

7 years agoTrack search mode in variable
Kai Uwe Broulik [Thu, 27 Sep 2018 10:57:18 +0000 (12:57 +0200)]
Track search mode in variable

Rather than relying on a widget being visible which might not be the case for e.g. non-active tabs

Differential Revision: https://phabricator.kde.org/D15774

7 years agoFix window / tab caption in search mode
Kai Uwe Broulik [Thu, 27 Sep 2018 10:56:09 +0000 (12:56 +0200)]
Fix window / tab caption in search mode

A search URL is never local, so this part of the code was never reached, resulting in raw baloosearch or filenamesearch URLs
showing up as window and tab title

Differential Revision: https://phabricator.kde.org/D15772

7 years ago[Places Panel] Cleanup includes
Kai Uwe Broulik [Mon, 24 Sep 2018 06:38:03 +0000 (08:38 +0200)]
[Places Panel] Cleanup includes

Some leftovers from when Dolphin managed the places entirely on its own

Differential Revision: https://phabricator.kde.org/D15636

7 years agoUpdate disk space info on refresh
Kai Uwe Broulik [Wed, 19 Sep 2018 08:20:14 +0000 (10:20 +0200)]
Update disk space info on refresh

When explicitly refreshing the view (e.g. F5) also refresh disk space info.
This would also allow us to raise the refresh interval somewhat.

CCBUG: 398612

Differential Revision: https://phabricator.kde.org/D15508

7 years ago[ViewProperties] Check part of home first before doing file system stuff
Kai Uwe Broulik [Mon, 17 Sep 2018 14:02:50 +0000 (16:02 +0200)]
[ViewProperties] Check part of home first before doing file system stuff

There's no point in creating a QFileInfo instance and checking for file properties if we're not going to do anything with it
when not inside home.

Differential Revision: https://phabricator.kde.org/D15237

7 years agoKeep org.freedesktop.FileManager1 registered across processes
David Edmundson [Mon, 17 Sep 2018 10:02:51 +0000 (12:02 +0200)]
Keep org.freedesktop.FileManager1 registered across processes

Summary:
Currently if someone starts 2 dolphins, the second cannot register
org.freedesktop.FileManager1 meaning and when the first dolphin quits,
no-one has it registered.

It doesn't cause a huge problem right now as we just dbus-activate a new one if
needed, but it means the behaviour is a bit inconsistent and
non-optimal.

DBus has a system to queue names, meaning that as long as any dolphin is
running this name is owned by one of the processes.

Also this patch registers the service after the object which is
technically safer.

Test Plan:
Ran d-feet
Opened 2 dolphins, closed the first
Service was still registered and the PID of the owning process changed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15539

7 years agoRevert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"
Kai Uwe Broulik [Tue, 11 Sep 2018 09:53:56 +0000 (11:53 +0200)]
Revert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"

Sometimes causes the first thumbnail to not be loaded :/

This reverts commit 033eb6b3a35ca60ce78ce7ccfeeec26d70205aa8.

7 years ago[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve
Kai Uwe Broulik [Tue, 11 Sep 2018 07:55:30 +0000 (09:55 +0200)]
[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve

This avoids requesting a thumbnail twice for certain files, typically the first or last one in a folder.

Differential Revision: https://phabricator.kde.org/D15404

7 years agoDon't assign twice the same key to the action New Tab
Jaime Torres Amate [Mon, 10 Sep 2018 14:45:45 +0000 (16:45 +0200)]
Don't assign twice the same key to the action New Tab

Summary:
QKeySequence::AddTab = Qt::CTRL + Qt::Key_T.
Leaving only the first avoids the warning window "There are two actions (New Tab, New Tab) that want to use the same shortcut (Ctrl+T)"

BUG: 398324

Test Plan:
su - test
unset KDE_FULL_SESSION
dolphin
After: No more the warning window.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15371

7 years agoMerge branch 'Applications/18.08'
Kai Uwe Broulik [Mon, 10 Sep 2018 08:23:25 +0000 (10:23 +0200)]
Merge branch 'Applications/18.08'

7 years agoDo use QIcon::Selected for non-icon view
Kai Uwe Broulik [Mon, 10 Sep 2018 08:22:58 +0000 (10:22 +0200)]
Do use QIcon::Selected for non-icon view

Fixes a regression introduced by not using the selected state.
The views other than icon view actually do have a proper highlighted background.

Differential Revision: https://phabricator.kde.org/D15387

7 years agoMake thumbnail frame-and-shadow drawing criteria match those of the file dialog
Nathaniel Graham [Thu, 6 Sep 2018 20:46:17 +0000 (22:46 +0200)]
Make thumbnail frame-and-shadow drawing criteria match those of the file dialog

Summary:
KIO's file dialog already has logic to avoid drawing frames around images detected as likely to be icons, which is improved with D15071. Since Dolphin doesn't use KIO for any of this (boo) we have to pull it over here too; this patch brings the same feature to Dolphin, as well as the feature to disable frames and shadows for all thumbnails at very small sizes, which improves clarity.

With this patch, Dolphin's frame drawing behavior becomes consistent with that of the file dialog (as of D15071).

BUG: 295526
FIXED-IN: 18.12.0

Test Plan:
Icons no longer have frames:
{F6214279}

Images without transparency still have frames:
{F6214280}

Nicer presentation for folders with mixed image types (images without transparency get frames; images without it don't):
{F6214278}

At small sizes, thumbnail clarity is improved by omitting the frame and shadow. Before:
{F6214296}

After:
{F6214294}

Reviewers: #dolphin, broulik, elvisangelaccio

Reviewed By: #dolphin, broulik, elvisangelaccio

Subscribers: markg, anthonyfieroni, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15069

7 years ago[DolphinContextMenu] Use the view's already existing root KFileItem
Kai Uwe Broulik [Wed, 5 Sep 2018 10:25:39 +0000 (12:25 +0200)]
[DolphinContextMenu] Use the view's already existing root KFileItem

Saves creating a new KFileItem from scratch which stats the file.
Only when the root item isn't available (as can happen when you're currently looking at an non-existing directory)
will it create a new KFileItem

Differential Revision: https://phabricator.kde.org/D15266

7 years agoMerge branch 'Applications/18.08'
Kai Uwe Broulik [Wed, 5 Sep 2018 10:24:47 +0000 (12:24 +0200)]
Merge branch 'Applications/18.08'

7 years ago[KStandardItemListWidget] Round to icon size before applying scaling
Kai Uwe Broulik [Wed, 5 Sep 2018 10:24:10 +0000 (12:24 +0200)]
[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

7 years agoMerge branch 'Applications/18.08'
David Edmundson [Tue, 4 Sep 2018 12:21:00 +0000 (14:21 +0200)]
Merge branch 'Applications/18.08'

7 years agoCorrectly save behaviourOnLaunch
David Edmundson [Tue, 4 Sep 2018 12:20:33 +0000 (14:20 +0200)]
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

7 years agoMerge branch 'Applications/18.08'
Kai Uwe Broulik [Tue, 4 Sep 2018 07:02:07 +0000 (09:02 +0200)]
Merge branch 'Applications/18.08'

7 years agoDon't use QIcon::Selected state for selected icon
Kai Uwe Broulik [Tue, 4 Sep 2018 06:59:54 +0000 (08:59 +0200)]
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

7 years agoRenames DolphinViewContainer::getCaption to caption
David Hallas [Tue, 28 Aug 2018 07:50:41 +0000 (09:50 +0200)]
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

7 years agoChanges the tabName function to return the name of a specific tab
David Hallas [Tue, 28 Aug 2018 07:00:13 +0000 (09:00 +0200)]
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

7 years agoAdd test case for open-in-new-tab title regression
Elvis Angelaccio [Sun, 2 Sep 2018 08:53:32 +0000 (10:53 +0200)]
Add test case for open-in-new-tab title regression

Fix will be in D15112.

CCBUG: 397910

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.08.1.
Christoph Feck [Fri, 31 Aug 2018 16:38:35 +0000 (18:38 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.08.1.

7 years agoFix minor EBN issues
Yuri Chornoivan [Thu, 30 Aug 2018 18:29:01 +0000 (21:29 +0300)]
Fix minor EBN issues

7 years agoConsider all thumbnailers for the information panel and tooltips
Fabian Vogt [Wed, 29 Aug 2018 08:00:24 +0000 (10:00 +0200)]
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

7 years agoUnify window and tab title
David Hallas [Sat, 28 Jul 2018 15:29:00 +0000 (17:29 +0200)]
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

7 years agoRestore settings label and prevent warning when Baloo is unavailable
Henrik Fehlauer [Wed, 22 Aug 2018 21:48:53 +0000 (23:48 +0200)]
Restore settings label and prevent warning when Baloo is unavailable

Summary:
As discussed in D14814, 6674c9c387d0 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 6674c9c387d0 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

7 years agoPort away from kdelibs4support
Elvis Angelaccio [Mon, 13 Aug 2018 21:36:35 +0000 (23:36 +0200)]
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

7 years agoRead UDS entry times directly and pretty-print on-demand
Kai Uwe Broulik [Mon, 20 Aug 2018 09:49:25 +0000 (11:49 +0200)]
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

7 years agoMerge branch 'Applications/18.08'
Kai Uwe Broulik [Thu, 16 Aug 2018 14:28:58 +0000 (16:28 +0200)]
Merge branch 'Applications/18.08'

7 years agoPretty-print "creationtime" role
Kai Uwe Broulik [Thu, 16 Aug 2018 14:27:55 +0000 (16:27 +0200)]
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

7 years agoMake this test work again with new uds implementation
Jaime Torres Amate [Thu, 16 Aug 2018 11:50:04 +0000 (13:50 +0200)]
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

7 years agowrong name and email address
Jaime Torres Amate [Thu, 16 Aug 2018 11:48:03 +0000 (13:48 +0200)]
wrong name and email address

Summary: This reverts commit 2104d18a6760d28d24665a3281ef090c198c44e7.

Test Plan: revert-hammer

Reviewers:

Subscribers:

7 years agoMake this test work again with new uds implementation
Travis CI Bot [Thu, 16 Aug 2018 11:05:29 +0000 (13:05 +0200)]
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

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.08.0.
Christoph Feck [Mon, 6 Aug 2018 20:41:40 +0000 (22:41 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.08.0.

7 years agoMerge branch 'Applications/18.08'
Nathaniel Graham [Sat, 4 Aug 2018 23:05:22 +0000 (17:05 -0600)]
Merge branch 'Applications/18.08'

7 years agoRemove custom icon selection for trash
Shubham Jangra [Sat, 4 Aug 2018 22:55:43 +0000 (16:55 -0600)]
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

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.07.90.
Christoph Feck [Mon, 30 Jul 2018 21:44:36 +0000 (23:44 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.07.90.

7 years agoGIT_SILENT made messages (after extraction)
l10n daemon script [Mon, 30 Jul 2018 04:00:47 +0000 (06:00 +0200)]
GIT_SILENT made messages (after extraction)

7 years agoGIT_SILENT made messages (after extraction)
l10n daemon script [Mon, 30 Jul 2018 01:21:28 +0000 (03:21 +0200)]
GIT_SILENT made messages (after extraction)

7 years agoDrop redundant setAttribute for WA_DeleteOnClose
Elvis Angelaccio [Sun, 29 Jul 2018 21:37:34 +0000 (23:37 +0200)]
Drop redundant setAttribute for WA_DeleteOnClose

Every KMainWindow (which DolphinMainWindow inherits) already has this
attribute set.

7 years agoMerge branch 'Applications/18.08'
Kai Uwe Broulik [Thu, 26 Jul 2018 08:18:34 +0000 (10:18 +0200)]
Merge branch 'Applications/18.08'

7 years agoCompare UDS entry times directly instead of going through KFileItem
Kai Uwe Broulik [Thu, 26 Jul 2018 08:17:36 +0000 (10:17 +0200)]
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

7 years agoFixes small memory leak in DolphinContextMenu
David Hallas [Wed, 18 Jul 2018 22:43:25 +0000 (16:43 -0600)]
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

7 years ago[KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Kai Uwe Broulik [Thu, 19 Jul 2018 08:17:16 +0000 (10:17 +0200)]
[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

7 years ago[KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Kai Uwe Broulik [Thu, 19 Jul 2018 08:17:16 +0000 (10:17 +0200)]
[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

7 years agoFixes small memory leak in DolphinContextMenu
David Hallas [Wed, 18 Jul 2018 22:43:25 +0000 (16:43 -0600)]
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

7 years agoMerge branch 'Applications/18.08'
Elvis Angelaccio [Wed, 18 Jul 2018 21:23:06 +0000 (23:23 +0200)]
Merge branch 'Applications/18.08'

7 years agoFixes memory leak in KItemListViewAccessible
David Hallas [Wed, 18 Jul 2018 21:20:18 +0000 (23:20 +0200)]
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

7 years agoRemoves unused member variables
David Hallas [Wed, 18 Jul 2018 21:20:04 +0000 (23:20 +0200)]
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

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.11.70.
Albert Astals Cid [Mon, 16 Jul 2018 17:59:42 +0000 (19:59 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.11.70.

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.07.80.
Albert Astals Cid [Mon, 16 Jul 2018 17:26:57 +0000 (19:26 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.07.80.

7 years agoModernize View Properties window
Nathaniel Graham [Sat, 14 Jul 2018 19:55:04 +0000 (13:55 -0600)]
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

7 years agoSpeedup sort
Jaime Torres [Sat, 14 Jul 2018 17:37:09 +0000 (19:37 +0200)]
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

7 years agoRevert to change the commit message.
Jaime Torres [Sat, 14 Jul 2018 17:35:47 +0000 (19:35 +0200)]
Revert to change the commit message.

Summary: This reverts commit 765cc968c9dfbd4350226b775377506135c0442d.

Test Plan: revert-hammer

Reviewers:

Subscribers:

7 years agoSpeedup sort
Jaime Torres [Fri, 13 Jul 2018 16:54:49 +0000 (18:54 +0200)]
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

7 years ago[KFileItemModelRolesUpdater] Fix preview scaling for frameless previews
Kai Uwe Broulik [Wed, 11 Jul 2018 13:43:16 +0000 (15:43 +0200)]
[KFileItemModelRolesUpdater] Fix preview scaling for frameless previews

Follow-up to D11319 for e.g. folder previews

Differential Revision: https://phabricator.kde.org/D14047

7 years ago[KStandardItemListWidget] Avoid needless image resizing
Kai Uwe Broulik [Wed, 11 Jul 2018 13:41:58 +0000 (15:41 +0200)]
[KStandardItemListWidget] Avoid needless image resizing

There be rounding errors when scaling pixmaps when keeping aspect ratio

Differential Revision: https://phabricator.kde.org/D11319

7 years agoMark PHONON_INCLUDES dirs as SYSTEM, so compiler omits them for warnings
Friedrich W. H. Kossebau [Sun, 8 Jul 2018 12:13:52 +0000 (14:13 +0200)]
Mark PHONON_INCLUDES dirs as SYSTEM, so compiler omits them for warnings

7 years agoA complete build does not fix the crashes I'm having.
Jaime Torres [Sat, 7 Jul 2018 13:16:22 +0000 (15:16 +0200)]
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 63825de82f3adc9376b0f0f27e24e21bccf62e2a.

Test Plan: revert-hammer

Reviewers:

Subscribers:

7 years agoSpeedup sort
Jaime Torres [Fri, 6 Jul 2018 15:11:43 +0000 (17:11 +0200)]
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

7 years agoModernize Settings window
Nathaniel Graham [Fri, 6 Jul 2018 03:24:27 +0000 (21:24 -0600)]
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

7 years agoUse more nullptr
Friedrich W. H. Kossebau [Wed, 4 Jul 2018 21:43:22 +0000 (23:43 +0200)]
Use more nullptr

7 years agoRemove QT definitions duplicated from KDEFrameworkCompilerSettings or dead
Friedrich W. H. Kossebau [Fri, 29 Jun 2018 16:42:00 +0000 (18:42 +0200)]
Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead

7 years agoPort from KComboBox to QComboBox
Nathaniel Graham [Tue, 26 Jun 2018 22:46:50 +0000 (16:46 -0600)]
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

7 years agoUse collapsible box to configure visible roles
Elvis Angelaccio [Tue, 26 Jun 2018 20:13:51 +0000 (22:13 +0200)]
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

7 years agodon't use temporaries when uneeded
Tomaz Canabrava [Fri, 22 Jun 2018 14:03:48 +0000 (16:03 +0200)]
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

7 years agodon't use temporaries when uneeded
Tomaz Canabrava [Fri, 22 Jun 2018 14:03:48 +0000 (16:03 +0200)]
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

7 years agoUse copy ellision
Tomaz Canabrava [Fri, 22 Jun 2018 13:30:11 +0000 (15:30 +0200)]
Use copy ellision

7 years agoRemove unused variable
Tomaz Canabrava [Fri, 22 Jun 2018 13:21:00 +0000 (15:21 +0200)]
Remove unused variable

Compiled, Run. Trash still there.

7 years agodon't use temporaries when uneeded
Tomaz Canabrava [Fri, 22 Jun 2018 13:20:38 +0000 (15:20 +0200)]
don't use temporaries when uneeded

7 years agoGIT_SILENT made messages (after extraction)
l10n daemon script [Fri, 22 Jun 2018 01:17:51 +0000 (03:17 +0200)]
GIT_SILENT made messages (after extraction)

7 years agoMove General settings to the top
Nathaniel Graham [Mon, 18 Jun 2018 23:09:21 +0000 (17:09 -0600)]
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

7 years agoDo not duplicate work of KAboutData::setupCommandLine()
Laurent Montel [Tue, 19 Jun 2018 06:57:39 +0000 (08:57 +0200)]
Do not duplicate work of KAboutData::setupCommandLine()

7 years agoViewPropertiesDialog: disable Apply button on startup
Elvis Angelaccio [Wed, 13 Jun 2018 21:16:33 +0000 (23:16 +0200)]
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).

7 years agoMerge branch 'Applications/18.04'
Elvis Angelaccio [Wed, 13 Jun 2018 19:42:41 +0000 (21:42 +0200)]
Merge branch 'Applications/18.04'

7 years agoFix loop of FocusIn events
Elvis Angelaccio [Sun, 3 Jun 2018 12:53:55 +0000 (14:53 +0200)]
Fix loop of FocusIn events

Summary:
Commit 43da84eefc7d 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

7 years agoMerge branch 'Applications/18.04'
Kai Uwe Broulik [Wed, 6 Jun 2018 07:18:17 +0000 (09:18 +0200)]
Merge branch 'Applications/18.04'

7 years ago[KBalooRolesProvider] Support properties of type QStringList
Kai Uwe Broulik [Wed, 6 Jun 2018 07:17:07 +0000 (09:17 +0200)]
[KBalooRolesProvider] Support properties of type QStringList

QVariant::toString() unwraps a QStringList with a single string to a QString, however a list with multiple entries returns a null string.
Explicitly check for KFileMetaData property type and convert accordingly.

BUG: 395033
FIXED-IN: 18.04.3

Differential Revision: https://phabricator.kde.org/D13349

7 years agoFix scrolling to renamed file when using the rename dialog
Elvis Angelaccio [Sun, 3 Jun 2018 16:28:23 +0000 (18:28 +0200)]
Fix scrolling to renamed file when using the rename dialog

Summary:
The `RenameDialog::slotResult()` slot is currently never called because
the dialog is deleted first, due to the usage of the `WA_DeleteOnClose`
attribute. This breaks the scroll-to-renamed-file feature when the
inline renaming is disabled.

Instead of deleting the dialog on close, we can use `deleteLater()` when
we are sure the dialog has actually finished its job, which is when the
KIO move job emits the `result` signal.

Test Plan:
- Disable inline renaming
- Rename a file so that it goes out of the view
- Check whether the view scrolls to the renamed file.

Reviewers: #dolphin, emateli

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13304

7 years agoSVN_SILENT made messages (.desktop file) - always resolve ours
l10n daemon script [Tue, 5 Jun 2018 03:34:15 +0000 (05:34 +0200)]
SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

7 years agoMerge branch 'Applications/18.04'
Elvis Angelaccio [Sun, 3 Jun 2018 11:21:31 +0000 (13:21 +0200)]
Merge branch 'Applications/18.04'

7 years agoFix crash in PlacesItem::setUrl()
Elvis Angelaccio [Sun, 3 Jun 2018 11:08:51 +0000 (13:08 +0200)]
Fix crash in PlacesItem::setUrl()

Connections to lambda slots without context/receiver argument can lead
to crashes, because if the receiver is deleted Qt won't delete the connection
as it normally would when the receiver is specified.

This patch moves the slot from the lambda in PlacesItem (which is not a QObject)
to PlacesItemSignalHandler. This fixes the `dolphinmainwindowtest` crash
we currently have on master, and should also fix bug #394507 which has
the very same stacktrace.

BUG: 394507
FIXED-IN: 18.04.2

7 years agoDrop obsolete version checks
Elvis Angelaccio [Sun, 3 Jun 2018 09:32:19 +0000 (11:32 +0200)]
Drop obsolete version checks

We already depend on KF5 >= 5.43

7 years agoEnable test mode in dolphinmainwindowtest
Elvis Angelaccio [Sun, 3 Jun 2018 09:24:20 +0000 (11:24 +0200)]
Enable test mode in dolphinmainwindowtest

We don't want to use the user configuration files when creating a test
instance of DolphinMainWindow.

7 years agoAdd 'Sort By' and 'View Mode' into Dolphin file context menus
Nerdopolis Turfwalker [Sat, 2 Jun 2018 14:38:01 +0000 (16:38 +0200)]
Add 'Sort By' and 'View Mode' into Dolphin file context menus

Summary: This adds the 'Sort By' and 'View Mode'  options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu

Test Plan: Made sure that the options appeared when right clicking on an empty space.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12911

7 years agoShow a warning when running as the root user
Nathaniel Graham [Sun, 6 May 2018 23:48:54 +0000 (17:48 -0600)]
Show a warning when running as the root user

Summary: Now that Dolphin can be run as the root user again, let's show a warning.

Test Plan:
When run with the root user account:
{F5882057}

Reviewers: #dolphin, markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12732

7 years agoGIT_SILENT Upgrade KDE Applications version to 18.04.2.
Christoph Feck [Fri, 1 Jun 2018 22:50:34 +0000 (00:50 +0200)]
GIT_SILENT Upgrade KDE Applications version to 18.04.2.

7 years agoFix the test that broke after recent changes to the default Places items
Nathaniel Graham [Mon, 23 Apr 2018 04:58:24 +0000 (22:58 -0600)]
Fix the test that broke after recent changes to the default Places items

Test Plan: `ctest`; all tests pass.

Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: renatoo, kfm-devel, elvisangelaccio, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12464

7 years agoRe-allow running Dolphin as the root user (but still not using sudo)
Nathaniel Graham [Wed, 9 May 2018 23:18:08 +0000 (17:18 -0600)]
Re-allow running Dolphin as the root user (but still not using sudo)

Summary:
Prohibiting the use of Dolphin as the actual root user (not using `sudo` or `kdesu`) breaks legitimate use cases for using the root user. An example is Kali, a distro that logs in as the root user by default as a deliberate design choice.

In such an environment, there is no additional security vulnerability beyond what you're already potentially exposing yourself to. So, let's re-enable it.

BUG: 387974
FIXED-IN: 18.08.0

Test Plan:
- Log in as normal user and run `sudo dolphin`: you get an error message.
- Log in as normal user and run `kdesu dolphin`: you get an error message.
- Log in as the root user and run dolphin normally: it works.

Reviewers: markg, elvisangelaccio, #dolphin

Reviewed By: markg

Subscribers: chinmoyr, cfeck, elvisangelaccio, mmustac, Fuchs, markg, graesslin, nicolasfella, zzag, kfm-devel, emmanuelp

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12795

7 years agoProperly sort int roles
Kai Uwe Broulik [Tue, 22 May 2018 11:34:14 +0000 (13:34 +0200)]
Properly sort int roles

Use integer comparison for word count, line count, track, and release year.

BUG: 394355

Differential Revision: https://phabricator.kde.org/D12948