Commit 79ea3ab0 authored by Laurent Montel's avatar Laurent Montel 😁

Use QCoreapplication::applicationpid

parent 3b3111de
...@@ -21,18 +21,13 @@ ...@@ -21,18 +21,13 @@
#include <kauthhelpersupport.h> #include <kauthhelpersupport.h>
#include <QCoreApplication>
#include <QDebug> #include <QDebug>
#include <unistd.h> ActionReply SaveHelper::save(const QVariantMap &args)
#if defined(Q_CC_MSVC)
// TODO: or rather use uid_t in the getuid() call below?
#define __uid_t uid_t
#endif
ActionReply SaveHelper::save(QVariantMap args)
{ {
__uid_t uid = getuid(); Q_UNUSED(args);
const quint64 uid = QCoreApplication::applicationPid();
qDebug() << "executing uid=" << uid; qDebug() << "executing uid=" << uid;
return ActionReply::SuccessReply(); return ActionReply::SuccessReply();
......
...@@ -26,9 +26,9 @@ using namespace KAuth; ...@@ -26,9 +26,9 @@ using namespace KAuth;
class SaveHelper : public QObject class SaveHelper : public QObject
{ {
Q_OBJECT; Q_OBJECT
public slots: public slots:
ActionReply save(QVariantMap args); ActionReply save(const QVariantMap &args);
}; };
#endif // _SAVEHELPER_H_ #endif // _SAVEHELPER_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment