|
branches/work/kdelibs-libkauth/kdeui: msg#13016kde-commits
SVN commit 1005303 by gigabytes: Added some trivial methods to kcmodule M +0 -1 actions/kauthorizedaction.cpp M +23 -0 widgets/kcmodule.cpp M +8 -0 widgets/kcmodule.h --- branches/work/kdelibs-libkauth/kdeui/actions/kauthorizedaction.cpp #1005302:1005303 @@ -79,7 +79,6 @@ setEnabled(false); break; case KAuth::Action::Authorized: - d->action.executeAsync(); emit authorized(d->action); break; default: --- branches/work/kdelibs-libkauth/kdeui/widgets/kcmodule.cpp #1005302:1005303 @@ -56,6 +56,9 @@ bool _useRootOnlyMessage : 1; bool _firstshow : 1; + bool _needAuthorization : 1; + KAuth::Action _authAction; + // this member is used to record the state on non-automatically // managed widgets, allowing for mixed KConfigXT-drive and manual // widgets to coexist peacefully and do the correct thing with @@ -123,6 +126,26 @@ return manager; } +void KCModule::setNeedAuthorization(bool needAuth) +{ + d->_needAuthorization = needAuth; +} + +bool KCModule::needAuthorization() +{ + return d->_needAuthorization; +} + +void KCModule::setAuthAction(const KAuth::Action &action) +{ + d->_authAction = action; +} + +KAuth::Action KCModule::authAction() +{ + return d->_authAction; +} + KCModule::~KCModule() { qDeleteAll(d->managers); --- branches/work/kdelibs-libkauth/kdeui/widgets/kcmodule.h #1005302:1005303 @@ -28,6 +28,8 @@ #include <QtCore/QVariant> #include <QtGui/QWidget> +#include <kauth.h> + class QStringList; class KAboutData; class KConfigDialogManager; @@ -197,6 +199,12 @@ * @return a list of @ref KConfigDialogManager's in use, if any. */ QList<KConfigDialogManager*> configs() const; + + void setNeedAuthorization(bool needAuth); + bool needAuthorization(); + + void setAuthAction(const KAuth::Action &action); + KAuth::Action authAction(); public Q_SLOTS: /**
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |