Find my phone runner
ClosedPublic

Authored by nicolasfella on Aug 4 2018, 4:36 PM.

Details

Summary

Allows ringing devices from KRunner

Test Plan

Enter find, ring, or device name, activate entry

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Aug 4 2018, 4:36 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptAug 4 2018, 4:36 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
nicolasfella requested review of this revision.Aug 4 2018, 4:36 PM
apol added a subscriber: apol.Nov 7 2018, 2:33 PM

I think it's a good idea, sorry it took so long to review.

runners/findmyphone/findmyphonerunner.cpp
39

Highest really?

52

const &

62

These could be filtered already outside of the loop?

  • Merge branch 'master' into arcpatch-D14607_1
  • Use normal Priority
  • Use const ref
  • Correct diff
nicolasfella added inline comments.Nov 7 2018, 11:20 PM
runners/findmyphone/findmyphonerunner.cpp
62

That would only work if these were ANDs instead of ORs.

If we find "Ring" in the query we still needs the device names to build the results

apol added inline comments.Nov 7 2018, 11:33 PM
runners/findmyphone/findmyphonerunner.cpp
47 ↗(On Diff #45073)

Can we make this non-blocking? it's not fun when krunner blocks, especially at search.

sredman added a subscriber: sredman.EditedNov 8 2018, 11:50 PM

It looks like this patch has a dependency on another one. In my version of the repository, I don't have runners/CMakeLists.txt so this patch doesn't apply, and there is no reference to add_subdirectory(runners) in the top-level CMakeLists

Probably a problem fixed by the same solution: When I try to build, I get the error:
"CMake Error at runners/findmyphone/CMakeLists.txt:3 (add_library):

Target "krunner_kdeconnect_findmyphone" links to target "KF5::Runner" but                        
the target was not found.  Perhaps a find_package() call is missing for an                       
IMPORTED target, or an ALIAS target is missing?"
runners/findmyphone/findmyphonerunner.cpp
47 ↗(On Diff #45073)

@nicolasfella In case you don't know where to look, here is an example of how to use QDbusPendingReply: https://cgit.kde.org/kdeconnect-kde.git/tree/smsapp/conversationlistmodel.cpp#n82
It looks like it should be easy to change the code you have to use that style

apol accepted this revision.Feb 8 2019, 10:44 PM
This revision is now accepted and ready to land.Feb 8 2019, 10:44 PM
This revision was automatically updated to reflect the committed changes.