Add open on phone action to Itinerary reservations

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



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

R81 KDE PIM Addons
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
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.

coding style "const QString &"


coding style const QString &


f.close(); after that no ?


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

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

vkrause added inline comments.Sep 13 2018, 4:10 PM

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.