Re: KRunProxy
El dissabte, 6 de juny de 2020, a les 19:00:59 CEST, David Faure va escriure: > In order to switch kdeclarative to > -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054700 > we need to port KRunProxy away from KRun, or to deprecate KRunProxy. > > AFAICS it exposes an object named KRun to QML files, but searching for > qml files with KRun in them leads to no results: > https://lxr.kde.org/search?_filestring=*.qml&_string=KRun > > Am I doing this wrong? Yes, this is the correct search https://lxr.kde.org/search?_filestring=.*%5C.qml&_advanced=1&_string=KRun&_casesensitive=1 >From what i can see it's only used in one place to launch ksysguard Cheers, Albert > Are there other file extensions to take into consideration? > > If not, can I deprecate KRunProxy? > >
KRunProxy
In order to switch kdeclarative to -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054700 we need to port KRunProxy away from KRun, or to deprecate KRunProxy. AFAICS it exposes an object named KRun to QML files, but searching for qml files with KRun in them leads to no results: https://lxr.kde.org/search?_filestring=*.qml&_string=KRun Am I doing this wrong? Are there other file extensions to take into consideration? If not, can I deprecate KRunProxy? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5
D7676: Added openService() method to KRunProxy
maxrd2 added a comment. In https://phabricator.kde.org/D7676#143033, @broulik wrote: > 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(), nullptr) != 0; REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
broulik added a comment. Well it is now "openService" calling "runApplication", that's inconsistent isn't it REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
This revision was automatically updated to reflect the committed changes. Closed by commit R296:a6d341f817c8: Added openService() method to KRunProxy (authored by maxrd2, committed by davidedmundson). REPOSITORY R296 KDeclarative CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7676?vs=19173&id=19180 REVISION DETAIL https://phabricator.kde.org/D7676 AFFECTED FILES src/qmlcontrols/kioplugin/krunproxy.cpp src/qmlcontrols/kioplugin/krunproxy.h To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
davidedmundson accepted this revision. This revision is now accepted and ready to land. REPOSITORY R296 KDeclarative BRANCH runproxy_openservice REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 updated this revision to Diff 19173. maxrd2 marked an inline comment as done. maxrd2 added a comment. Removed service->isApplication() check, improved method description. REPOSITORY R296 KDeclarative CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7676?vs=19138&id=19173 BRANCH runproxy_openservice REVISION DETAIL https://phabricator.kde.org/D7676 AFFECTED FILES src/qmlcontrols/kioplugin/krunproxy.cpp src/qmlcontrols/kioplugin/krunproxy.h To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 added inline comments. INLINE COMMENTS > krunproxy.cpp:48 > KService::Ptr service = KService::serviceByDesktopPath(filePath); > return KRun::runService(*service, QList(), nullptr) != 0; > } else { While I'm at it should i also change to runApplication() here? > krunproxy.cpp:57 > +KService::Ptr service = KService::serviceByDesktopName(serviceName); > +if(service && service->isApplication()) > +return KRun::runApplication(*service, QList(), nullptr) != 0; Am not sure if service->isApplication() check here is needed... can someone confirm please? REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 added a dependent revision: D7648: Fix ksysguard not starting on plasmoid click. REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 added a comment. Am not sure whether if( && service->isApplication()) is needed. While I'm at it should i replace runService() with runApplication() inside inside openUrl() method? REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 updated this revision to Diff 19138. maxrd2 added a comment. Replaced runService() call with runApplication() REPOSITORY R296 KDeclarative CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7676?vs=19137&id=19138 BRANCH runproxy_openservice REVISION DETAIL https://phabricator.kde.org/D7676 AFFECTED FILES src/qmlcontrols/kioplugin/krunproxy.cpp src/qmlcontrols/kioplugin/krunproxy.h To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
broulik added a comment. Use `runApplication` for running applications which doesn't block until the app has registered a DBus service REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: broulik, #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 added a reviewer: davidedmundson. REPOSITORY R296 KDeclarative REVISION DETAIL https://phabricator.kde.org/D7676 To: maxrd2, davidedmundson Cc: #frameworks
D7676: Added openService() method to KRunProxy
maxrd2 created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. REVISION SUMMARY Added openService() method to KRunProxy so plasmoids can start applications without needing to use openUrl() and "apps" data source. REPOSITORY R296 KDeclarative BRANCH runproxy_openservice REVISION DETAIL https://phabricator.kde.org/D7676 AFFECTED FILES src/qmlcontrols/kioplugin/krunproxy.cpp src/qmlcontrols/kioplugin/krunproxy.h To: maxrd2 Cc: #frameworks