Bug 393710

Summary: Missing "Send via Bluetooth" entry in context menu when I try to send files with different extensions
Product: [Frameworks and Libraries] frameworks-kio Reporter: AndrĂ© Marcelo Alvarenga <alvarenga>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: elvis.angelaccio, kdelibs-bugs, mail, nate
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.47

Description André Marcelo Alvarenga 2018-05-01 03:12:27 UTC
Select a PNG and a JPG file and right-click.
Comment 1 Julian Steinmann 2018-05-05 17:39:05 UTC
I can confirm this issue, we'll need to investigate this further.
Comment 2 Elvis Angelaccio 2018-05-06 10:48:43 UTC
The issue is in KIO. Working on a fix, thanks for reporting!
Comment 3 Elvis Angelaccio 2018-05-26 16:46:35 UTC
Git commit 233a00b7e162916bbe672fd9fac81e61dc1e14c5 by Elvis Angelaccio.
Committed on 26/05/2018 at 16:36.
Pushed by elvisangelaccio into branch 'master'.

KFileItemActions: fallback to default mimetype when selecting only files

Summary:
KFileItemListProperties::mimeType() returns an empty string if the
selected files have different types, but KMimeTypeTrader does not
support empty mimetypes as query argument.

This causes the following warning

    KMimeTypeTrader: mimeType "" not found

and breaks the bluedevil's 'Send via Bluetooth' plugin.

If we know the user selected only files, we can use the default mimetype
as fallback.
FIXED-IN: 5.47

Test Plan: Select two files with different extension and check 'Send via Bluetooth' is in the Dolphin context menu.

Reviewers: #frameworks, dfaure

Tags: #frameworks

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

M  +7    -3    src/widgets/kfileitemactions.cpp

https://commits.kde.org/kio/233a00b7e162916bbe672fd9fac81e61dc1e14c5