mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kwalletmanager: remove stub authorization helper
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f961d3f668
commit
8d57392904
4 changed files with 0 additions and 101 deletions
|
@ -13,16 +13,6 @@ target_link_libraries(kcm_kwallet ${KDE4_KDEUI_LIBS})
|
|||
|
||||
install(TARGETS kcm_kwallet DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
|
||||
|
||||
########### kauth helper ################
|
||||
set(kcm_kwallet_helper_SRCS savehelper.cpp)
|
||||
|
||||
add_executable(kcm_kwallet_helper ${kcm_kwallet_helper_SRCS})
|
||||
target_link_libraries(kcm_kwallet_helper ${KDE4_KDECORE_LIBS})
|
||||
|
||||
install(TARGETS kcm_kwallet_helper DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
|
||||
|
||||
kde4_install_auth_helper_files(kcm_kwallet_helper org.kde.kcontrol.kcmkwallet root)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install( FILES kwalletconfig.desktop kwalletmanager_show.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR})
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <kinputdialog.h>
|
||||
#include <kmenu.h>
|
||||
#include <kwallet.h>
|
||||
#include <kauthaction.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
|
@ -56,8 +55,6 @@ KWalletConfig::KWalletConfig(QWidget *parent, const QVariantList& args)
|
|||
about->addAuthor(ki18n("George Staikos"), KLocalizedString(), "staikos@kde.org");
|
||||
setAboutData( about );
|
||||
|
||||
setNeedsAuthorization(true);
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout(this);
|
||||
vbox->setSpacing(KDialog::spacingHint());
|
||||
vbox->setMargin(0);
|
||||
|
@ -259,28 +256,6 @@ void KWalletConfig::load() {
|
|||
|
||||
|
||||
void KWalletConfig::save() {
|
||||
QVariantMap args;
|
||||
KAuth::Action *action = authAction();
|
||||
if (0 == action) {
|
||||
kDebug() << "There's no authAction, not saving settings";
|
||||
return;
|
||||
}
|
||||
action->setArguments(args);
|
||||
|
||||
KAuth::ActionReply reply = action->execute();
|
||||
|
||||
if (reply.failed()) {
|
||||
if (reply.type() == KAuth::ActionReply::KAuthError){
|
||||
kDebug() << "Save action was not authorized!";
|
||||
KMessageBox::error(this, i18n("Sorry, the system security policy didn't allow you to save the changes."), i18n("KDE Wallet Control Module"));
|
||||
} else {
|
||||
KMessageBox::error(this, reply.errorDescription(), i18n("KDE Wallet Control Module"));
|
||||
kDebug() << "Save action failed. Not saving the settings.";
|
||||
}
|
||||
load();
|
||||
return;
|
||||
}
|
||||
|
||||
KConfigGroup config(_cfg, "Wallet");
|
||||
config.writeEntry("Enabled", _wcw->_enabled->isChecked());
|
||||
config.writeEntry("Launch Manager", _wcw->_launchManager->isChecked());
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "savehelper.h"
|
||||
|
||||
#include <kdebug.h>
|
||||
#include <kauthhelpersupport.h>
|
||||
#include <unistd.h>
|
||||
|
||||
ActionReply SaveHelper::save(QVariantMap args)
|
||||
{
|
||||
kDebug() << "executing uid=" << getuid();
|
||||
|
||||
return ActionReply::SuccessReply;
|
||||
}
|
||||
|
||||
KDE4_AUTH_HELPER_MAIN("org.kde.kcontrol.kcmkwallet", SaveHelper)
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _SAVEHELPER_H_
|
||||
#define _SAVEHELPER_H_
|
||||
|
||||
#include <kauthactionreply.h>
|
||||
|
||||
using namespace KAuth;
|
||||
|
||||
class SaveHelper : public QObject {
|
||||
Q_OBJECT;
|
||||
public slots:
|
||||
ActionReply save(QVariantMap args);
|
||||
};
|
||||
|
||||
#endif // _SAVEHELPER_H_
|
Loading…
Add table
Reference in a new issue