Added openService() method to KRunProxy
ClosedPublic

Authored by maxrd2 on Sep 3 2017, 1:55 PM.

Details

Summary

Added openService() method to KRunProxy so plasmoids can start applications without needing to use openUrl() and "apps" data source.

Diff Detail

Repository
R296 KDeclarative
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
maxrd2 created this revision.Sep 3 2017, 1:55 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 3 2017, 1:55 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
broulik added a subscriber: broulik.Sep 3 2017, 2:03 PM

Use runApplication for running applications which doesn't block until the app has registered a DBus service

maxrd2 updated this revision to Diff 19138.Sep 3 2017, 2:07 PM

Replaced runService() call with runApplication()

maxrd2 added a comment.Sep 3 2017, 2:09 PM
This comment was removed by maxrd2.
maxrd2 added inline comments.Sep 3 2017, 2:15 PM
src/qmlcontrols/kioplugin/krunproxy.cpp
48

While I'm at it should i also change to runApplication() here?

57

Am not sure if service->isApplication() check here is needed... can someone confirm please?

maxrd2 updated this revision to Diff 19173.Sep 4 2017, 4:23 PM
maxrd2 marked an inline comment as done.

Removed service->isApplication() check, improved method description.

davidedmundson accepted this revision.Sep 4 2017, 4:38 PM
This revision is now accepted and ready to land.Sep 4 2017, 4:38 PM
This revision was automatically updated to reflect the committed changes.

Well it is now "openService" calling "runApplication", that's inconsistent isn't it

maxrd2 added a comment.Sep 5 2017, 9:00 AM

Well it is now "openService" calling "runApplication", that's inconsistent isn't it

Yes, but it will start services that have Exec line though.
Should i just rename the method to "openApplication" or "runApplication" ?

Adding something like this wont change much it seems.

if(!service->isApplication())
    KRun::runService(*service, QList<QUrl>(), nullptr) != 0;