Add open on phone action to Itinerary reservations
ClosedPublic

Authored by nicolasfella on Sep 12 2018, 9:47 PM.

Details

Summary

Enable sending reservations to the phone via KDE Connect. First, KDE Connect is queried for available devices (paired, connected, share plugin enabled). Then an action for each device is added. When triggering the action the transfer is initiated via DBus.
Possible improvements:

  • Check if KDE Connect is recent enough/open functionality is available

Needs D15294 and D15293 to be functional

Test Plan

Open Lufthansa mail, click send to $device, check for Itinerary opening on device.

Diff Detail

Repository
R81 KDE PIM Addons
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2811
Build 2829: arc lint + arc unit
nicolasfella created this revision.Sep 12 2018, 9:47 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptSep 12 2018, 9:47 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
nicolasfella requested review of this revision.Sep 12 2018, 9:47 PM
nicolasfella edited the summary of this revision. (Show Details)Sep 12 2018, 9:49 PM
mlaurent requested changes to this revision.Sep 13 2018, 6:51 AM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp
286

coding style "const QString &"

460

coding style const QString &

501

f.close(); after that no ?

plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.h
47

coding style: const QString &dev..

This revision now requires changes to proceed.Sep 13 2018, 6:51 AM

Awesome, thank you! Looks good to me, can go in IMHO, with Laurent's comments addressed.

  • Fix coding style
nicolasfella added inline comments.Sep 13 2018, 2:41 PM
plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp
501

openInApp doesn't close either. @vkrause is this intended?

vkrause added inline comments.Sep 13 2018, 4:10 PM
plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp
501

The explicit close looks correct to me, f auto-closes (and thus flushes to disk) when leaving the scope, but technically we use it before that already. Very unlikely, but in theory it seems possible that the other app gets scheduled in before we flushed the content.

Would need to be fixed in the other place too then.

  • Close files
mlaurent accepted this revision.Sep 13 2018, 7:30 PM

For me seems good now.
I didn't test it but I trust you :)

This revision is now accepted and ready to land.Sep 13 2018, 7:30 PM
This revision was automatically updated to reflect the committed changes.