This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KAuth asynchronous actions execution

Tags: None
(comma "," separated)
shainer
Registered Member
Posts
1
Karma
0
OS
Hi,

I'm trying to set up and execute a KAuth asynchronous action. Following the tutorial on techbase, my code is:

Code: Select all
Action formatAction("org.chakraproject.quf.format.doformat");
formatAction.setHelperID("org.chakraproject.quf.format");
formatAction.addArgument("label", label);
formatAction.addArgument("filesystem", filesystem);
formatAction.addArgument("device", dirDev);
   
connect(formatAction.watcher(), SIGNAL(actionPerformed(ActionReply)), this, SLOT(formatPerformed(ActionReply)));
   
formatAction.setExecutesAsync(true);
ActionReply earlyReply = formatAction.execute();

if (earlyReply.failed())
{
  qDebug() << earlyReply.errorDescription();
}


Please notice that this action wasn't asynchronous before, and worked perfectly, asking for permission and then calling the helper as expected. I now added the call to setExecutesAsync() and the handling of actionPerformed().

The problem is, the KAuth helper isn't called. No authorization is asked to the user and earlyReply fails with an empty description.
I tried removing the call to setHelperID: this time earlyReply doesn't fail but the behaviour is the same (no call neither to the helper nor to my slot).

I suppose this is the right section to ask for some help with this problem, but I'm new so maybe I'm wrong :) Thanks in advance to anyone,
Lisa

[EDIT]: I tried the kde examples suggested in this board. I compiled and executed the "authentication" part. The voice "Long action" on the menu (which reading the code I understand it's trying to do the same thing I'm doing) fails in the same way.
yyc1992
Registered Member
Posts
3
Karma
0
OS
In case you are still wondering, this is a bug in kdelibs (kdecore).

See [1] (mailing list answer), [2] (bug report), [3] (review board). Hopefully it can be fixed in 4.10.x or at least 4.11.

[1] http://lists.kde.org/?l=kde-devel&m=135274807824550&w=2
[2] https://bugs.kde.org/show_bug.cgi?id=310149
[3] https://git.reviewboard.kde.org/r/109133/


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]