KAuth
executejob.cpp
54 connect(helper, &KAuth::HelperProxy::actionPerformed, this, [this](const QString &action, const ActionReply &reply) {
60 connect(helper, &KAuth::HelperProxy::progressStepData, this, [this](const QString &action, const QVariantMap &data) {
64 connect(BackendsManager::authBackend(), &KAuth::AuthBackend::actionStatusChanged, this, [this](const QString &action, Action::AuthStatus status) {
121 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
122 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
130 BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.detailsV2(), action.arguments(), action.timeout());
155 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
156 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
161 r.setErrorDescription(tr("The current backend only allows helper authorization, but this action does not have a helper."));
165 BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.detailsV2(), action.arguments(), action.timeout());
180 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
182 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
187 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
@ AuthorizedStatus
The authorization has been granted by the authorization backend.
Definition: action.h:86
singleShot
QVariantMap data() const
Use this to get the data set in the action by HelperSupport::progressStep(QVariant) or returned at th...
Definition: executejob.cpp:76
Class that encapsulates a reply coming from the helper after executing an action.
Definition: actionreply.h:334
bool kill(KillVerbosity verbosity=Quietly)
static const ActionReply UserCancelledReply()
errorCode() == UserCancelled
Definition: actionreply.cpp:72
Definition: policy-gen.h:15
void setErrorDescription(const QString &error)
Sets a human-readble description of the error.
Definition: actionreply.cpp:183
Q_SCRIPTABLE CaptureState status()
bool kill(KillVerbosity verbosity=Quietly)
Attempts to halt the execution of the action associated with this job.
Definition: executejob.cpp:111
static const ActionReply AuthorizationDeniedReply()
errorCode() == AuthorizationDenied
Definition: actionreply.cpp:68
QVariantMap data() const
Returns the custom data coming from the helper.
Definition: actionreply.cpp:130
static const ActionReply InvalidActionReply()
errorCode() == InvalidAction
Definition: actionreply.cpp:64
Definition: action.cpp:18
@ UserCancelledStatus
The user pressed Cancel the authentication dialog. Currently used only on the mac.
Definition: action.h:88
Capabilities capabilities()
static const ActionReply SuccessReply()
An empty successful reply. Same as using the default constructor.
Definition: actionreply.cpp:40
@ DeniedStatus
The authorization has been denied by the authorization backend.
Definition: action.h:83
@ AuthRequiredStatus
The user could obtain the authorization after authentication.
Definition: action.h:87
QString tr(const char *sourceText, const char *disambiguation, int n)
ActionReply()
Default constructor. Sets type() to Success and errorCode() to zero.
Definition: actionreply.cpp:95
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.