OSDN Git Service

generic: drop kwallet and kpasswdserver
authorIvailo Monev <xakepa10@gmail.com>
Mon, 4 Apr 2022 20:14:42 +0000 (23:14 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 4 Apr 2022 20:37:23 +0000 (23:37 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
142 files changed:
CMakeLists.txt
kpasswdserver/CMakeLists.txt [deleted file]
kpasswdserver/DESIGN [deleted file]
kpasswdserver/Messages.sh [deleted file]
kpasswdserver/kpasswdserver.cpp [deleted file]
kpasswdserver/kpasswdserver.desktop [deleted file]
kpasswdserver/kpasswdserver.h [deleted file]
kpasswdserver/org.kde.KPasswdServer.xml [deleted file]
kpasswdserver/tests/CMakeLists.txt [deleted file]
kpasswdserver/tests/kpasswdservertest.cpp [deleted file]
kwalletd/CMakeLists.txt [deleted file]
kwalletd/Messages.sh [deleted file]
kwalletd/README [deleted file]
kwalletd/autotests/CMakeLists.txt [deleted file]
kwalletd/autotests/kdewallet.kwl [deleted file]
kwalletd/autotests/kwalletexecuter.cpp [deleted file]
kwalletd/autotests/kwalletexecuter.h [deleted file]
kwalletd/autotests/qtest_kwallet.h [deleted file]
kwalletd/autotests/testpamopen.cpp [deleted file]
kwalletd/autotests/testpamopennofile.cpp [deleted file]
kwalletd/backend/CMakeLists.txt [deleted file]
kwalletd/backend/backendpersisthandler.cpp [deleted file]
kwalletd/backend/backendpersisthandler.h [deleted file]
kwalletd/backend/blockcipher.cc [deleted file]
kwalletd/backend/blockcipher.h [deleted file]
kwalletd/backend/blowfish.cc [deleted file]
kwalletd/backend/blowfish.h [deleted file]
kwalletd/backend/blowfishtables.h [deleted file]
kwalletd/backend/cbc.cc [deleted file]
kwalletd/backend/cbc.h [deleted file]
kwalletd/backend/config-kwalletbackend.h.cmake [deleted file]
kwalletd/backend/kwalletbackend.cc [deleted file]
kwalletd/backend/kwalletbackend.h [deleted file]
kwalletd/backend/kwalletentry.cc [deleted file]
kwalletd/backend/kwalletentry.h [deleted file]
kwalletd/backend/tests/CMakeLists.txt [deleted file]
kwalletd/backend/tests/backendtest.cpp [deleted file]
kwalletd/backend/tests/testbf.cpp [deleted file]
kwalletd/kbetterthankdialog.cpp [deleted file]
kwalletd/kbetterthankdialog.h [deleted file]
kwalletd/kbetterthankdialogbase.ui [deleted file]
kwalletd/ktimeout.cpp [deleted file]
kwalletd/ktimeout.h [deleted file]
kwalletd/kwalletd.cpp [deleted file]
kwalletd/kwalletd.desktop [deleted file]
kwalletd/kwalletd.h [deleted file]
kwalletd/kwalletd.notifyrc [deleted file]
kwalletd/kwalletsessionstore.cpp [deleted file]
kwalletd/kwalletsessionstore.h [deleted file]
kwalletd/kwalletwizard.cpp [deleted file]
kwalletd/kwalletwizard.h [deleted file]
kwalletd/kwalletwizardpageexplanation.ui [deleted file]
kwalletd/kwalletwizardpageintro.ui [deleted file]
kwalletd/kwalletwizardpageoptions.ui [deleted file]
kwalletd/kwalletwizardpagepassword.ui [deleted file]
kwalletd/main.cpp [deleted file]
kwalletd/org.kde.kwalletd.service.in [deleted file]
kwalletd/tests/CMakeLists.txt [deleted file]
kwalletd/tests/README [deleted file]
kwalletd/tests/kwalletasync.cpp [deleted file]
kwalletd/tests/kwalletautoclose.cpp [deleted file]
kwalletd/tests/kwalletautoclose.h [deleted file]
kwalletd/tests/kwalletboth.cpp [deleted file]
kwalletd/tests/kwalletmany.cpp [deleted file]
kwalletd/tests/kwalletmany.h [deleted file]
kwalletd/tests/kwalletnoautoclose.cpp [deleted file]
kwalletd/tests/kwalletpath.cpp [deleted file]
kwalletd/tests/kwalletsync.cpp [deleted file]
kwalletd/tests/kwallettest.cpp [deleted file]
kwalletd/tests/kwallettest.h [deleted file]
kwalletd/tests/kwalletwizardtest.cpp [deleted file]
kwalletmanager/CMakeLists.txt [deleted file]
kwalletmanager/COPYING [deleted file]
kwalletmanager/COPYING.LIB [deleted file]
kwalletmanager/TODO [deleted file]
kwalletmanager/icons/CMakeLists.txt [deleted file]
kwalletmanager/icons/hi22-action-folder_closed.png [deleted file]
kwalletmanager/icons/hi22-action-folder_open.png [deleted file]
kwalletmanager/kwalletmanager-kwalletd.desktop [deleted file]
kwalletmanager/kwalletmanager.desktop [deleted file]
kwalletmanager/src/CMakeLists.txt [deleted file]
kwalletmanager/src/konfigurator/CMakeLists.txt [deleted file]
kwalletmanager/src/konfigurator/Messages.sh [deleted file]
kwalletmanager/src/konfigurator/konfigurator.cpp [deleted file]
kwalletmanager/src/konfigurator/konfigurator.h [deleted file]
kwalletmanager/src/konfigurator/kwalletconfig.desktop [deleted file]
kwalletmanager/src/konfigurator/kwalletmanager_show.desktop [deleted file]
kwalletmanager/src/konfigurator/walletconfigwidget.ui [deleted file]
kwalletmanager/src/manager/CMakeLists.txt [deleted file]
kwalletmanager/src/manager/Messages.sh [deleted file]
kwalletmanager/src/manager/allyourbase.cpp [deleted file]
kwalletmanager/src/manager/allyourbase.h [deleted file]
kwalletmanager/src/manager/applicationsmanager.cpp [deleted file]
kwalletmanager/src/manager/applicationsmanager.h [deleted file]
kwalletmanager/src/manager/applicationsmanager.ui [deleted file]
kwalletmanager/src/manager/authorizedapplicationstable.cpp [deleted file]
kwalletmanager/src/manager/authorizedapplicationstable.h [deleted file]
kwalletmanager/src/manager/authorizedappmodel.cpp [deleted file]
kwalletmanager/src/manager/authorizedappmodel.h [deleted file]
kwalletmanager/src/manager/connectedapplicationstable.cpp [deleted file]
kwalletmanager/src/manager/connectedapplicationstable.h [deleted file]
kwalletmanager/src/manager/connectedappmodel.cpp [deleted file]
kwalletmanager/src/manager/connectedappmodel.h [deleted file]
kwalletmanager/src/manager/disconnectappbutton.cpp [deleted file]
kwalletmanager/src/manager/disconnectappbutton.h [deleted file]
kwalletmanager/src/manager/hi128-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi128-app-kwalletmanager2.png [deleted file]
kwalletmanager/src/manager/hi16-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi16-app-kwalletmanager2.png [deleted file]
kwalletmanager/src/manager/hi22-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi32-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi32-app-kwalletmanager2.png [deleted file]
kwalletmanager/src/manager/hi48-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi48-app-kwalletmanager2.png [deleted file]
kwalletmanager/src/manager/hi64-app-kwalletmanager.png [deleted file]
kwalletmanager/src/manager/hi64-app-kwalletmanager2.png [deleted file]
kwalletmanager/src/manager/kbetterthankdialogbase.cpp [deleted file]
kwalletmanager/src/manager/kbetterthankdialogbase.h [deleted file]
kwalletmanager/src/manager/kbetterthankdialogbase.ui [deleted file]
kwalletmanager/src/manager/kwalleteditor.cpp [deleted file]
kwalletmanager/src/manager/kwalleteditor.h [deleted file]
kwalletmanager/src/manager/kwalletmanager.cpp [deleted file]
kwalletmanager/src/manager/kwalletmanager.h [deleted file]
kwalletmanager/src/manager/kwalletmanager.rc [deleted file]
kwalletmanager/src/manager/kwalletmanagerwidget.cpp [deleted file]
kwalletmanager/src/manager/kwalletmanagerwidget.h [deleted file]
kwalletmanager/src/manager/kwalletmanagerwidgetitem.cpp [deleted file]
kwalletmanager/src/manager/kwalletmanagerwidgetitem.h [deleted file]
kwalletmanager/src/manager/kwalletpopup.cpp [deleted file]
kwalletmanager/src/manager/kwalletpopup.h [deleted file]
kwalletmanager/src/manager/kwmapeditor.cpp [deleted file]
kwalletmanager/src/manager/kwmapeditor.h [deleted file]
kwalletmanager/src/manager/main.cpp [deleted file]
kwalletmanager/src/manager/registercreateactionmethod.cpp [deleted file]
kwalletmanager/src/manager/registercreateactionmethod.h [deleted file]
kwalletmanager/src/manager/revokeauthbutton.cpp [deleted file]
kwalletmanager/src/manager/revokeauthbutton.h [deleted file]
kwalletmanager/src/manager/walletcontrolwidget.cpp [deleted file]
kwalletmanager/src/manager/walletcontrolwidget.h [deleted file]
kwalletmanager/src/manager/walletcontrolwidget.ui [deleted file]
kwalletmanager/src/manager/walletwidget.ui [deleted file]
startkde.cmake

index c75def4..954d41a 100644 (file)
@@ -340,8 +340,6 @@ add_subdirectory(kstyles)
 
 # imported from kde-runtime and other sub-projects
 add_subdirectory(menu)
-add_subdirectory(kwalletd)
-add_subdirectory(kwalletmanager)
 add_subdirectory(knotify)
 add_subdirectory(kuiserver)
 add_subdirectory(soliduiserver)
@@ -358,7 +356,6 @@ if (Q_WS_X11)
     add_subdirectory(kstart)
 endif (Q_WS_X11)
 # Background processes
-add_subdirectory(kpasswdserver)
 add_subdirectory(kdontchangethehostname)
 add_subdirectory(kglobalaccel)
 add_subdirectory(ktimezoned)
diff --git a/kpasswdserver/CMakeLists.txt b/kpasswdserver/CMakeLists.txt
deleted file mode 100644 (file)
index 81e21ec..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-if(ENABLE_TESTING)
-    add_subdirectory(tests)
-endif()
-
-set(kded_kpasswdserver_SRCS kpasswdserver.cpp )
-
-qt4_add_dbus_adaptor(kded_kpasswdserver_SRCS org.kde.KPasswdServer.xml kpasswdserver.h KPasswdServer)
-
-kde4_add_plugin(kded_kpasswdserver ${kded_kpasswdserver_SRCS})
-
-target_link_libraries(kded_kpasswdserver ${KDE4_KIO_LIBS})
-
-install(TARGETS kded_kpasswdserver  DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} )
-
-install( FILES kpasswdserver.desktop  DESTINATION  ${KDE4_SERVICES_INSTALL_DIR}/kded )
diff --git a/kpasswdserver/DESIGN b/kpasswdserver/DESIGN
deleted file mode 100644 (file)
index 6985b3f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-Credentials storage duration
-============================
-How long credentials are stored depends on a couple of factors. The first is
-whether a window-id (see QWidget::WId) was provided when the password request
-was made. The other is the state of KIO::AuthInfo's keepPassword flag.
-
-If the window-id parameter is missing, the credentials are stored for the
-entire duration of the current KDE session. Otherwise, they are only kept
-until the application(s) associated with the window-id exit.
-
-The "keepPassword" flag on the other hand only matters for caching credetials
-in a persistent storage such as KWallet. If this flag is set to false, then
-credentials are only kept in memory based on the value of window-id as discussed
-above. See the documentation for the "keepPassword" property in KIO::AuthInfo
-for more details.
-
-Dawit A. <adawit@kde.org>
-
-Sequence numbers
-================
-The idea is that whenever the user is queried for a password this
-login/pw combination gets a seq-nr. When  a slave needs a  login/pw
-it asks kpasswdserver and sends along the last seqnr it received. If
-this seqnr is older (lower) than the seq nr of the login/pw
-combination stored in kpasswdserver then appearantly the user has
-already been prompted for a new login/pw combination since the last
-time this slave asked for a login/pw and therefor it is not necessary
-to prompt the user again but kpassword will send the io-slave this
-new login/pw combination. If this new combination fails as well the
-user is being prompted for a new login/pw combo since the one stored
-in kpasswdserver doesn't work.
-
-Let me try to draw the situation I had in mind when writing this:
-
-Slave1         Slave2                  kpasswdserver
-Asks for auth
-                                       asks user for login/pw (1)
-sends login/pw (1) to ftp site
-               Asks for auth
-                                       sends back login/pw (1)
-               sends login/pw (1) to ftp site
-gets login error,
-asks for new auth
-sends along seq.nr 1
-                                       seq.nr 1 == (1) -->
-                                       asks user for new login/pw (2)
-sends login/pw (2) to ftp site
-               gets login error,
-               asks for new auth
-               sends along seq.nr 1
-                                       seq.nr 1 < (2) -->
-                                       don't ask user for new login/pw
-                                       but send back login/pw (2) without asking
-               sends login/pw (2) to ftp site
-
-
-Actually, I had mostly http in mind, and not so much ftp. In http you 
-typically try without password first, and only when you get an 
-authentication error you ask for a password. The above scenario is 
-then suddenly a lot more common than with ftp because it can happen 
-that you have 4 requests /io-slaves who alll discover at about the 
-same time that they need to have authentication credentials. The 
-above scenario (and the seq. nrs) is to prevent that you get 4 login 
-dialogs in such case.
-
-Now the assumption in this all, looking back on it, seems to be that 
-when you ask for the same auth credentials twice in a row, it must be 
-that the credentials issued the first time where wrong, and you will 
-be prompted again. But if the user goes to ftp-site1, then 
-ftp-site2 and then back to ftp-site1 again, the credentials for ftp-site1
-are still valid. This is why we reset the seq.nr stored in the io-slave
-to 0 whenever the io-slave switches hosts (or logins).
-
-Waldo Bastian <bastian@kde.org>
diff --git a/kpasswdserver/Messages.sh b/kpasswdserver/Messages.sh
deleted file mode 100644 (file)
index abde4ed..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-$XGETTEXT *.cpp -o $podir/kpasswdserver.pot
diff --git a/kpasswdserver/kpasswdserver.cpp b/kpasswdserver/kpasswdserver.cpp
deleted file mode 100644 (file)
index 92cf599..0000000
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*
-    This file is part of the KDE Password Server
-
-    Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
-    Copyright (C) 2005 David Faure (faure@kde.org)
-    Copyright (C) 2012 Dawit Alemayehu (adawit@kde.org)
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    This software 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 library; see the file COPYING. If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-//----------------------------------------------------------------------------
-//
-// KDE Password Server
-
-#include "kpasswdserver.h"
-
-#include "kpasswdserveradaptor.h"
-
-#include <kapplication.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kdebug.h>
-#include <kpassworddialog.h>
-#include <kwallet.h>
-#include <kwindowsystem.h>
-
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-
-#include <QtCore/QScopedPointer>
-#include <QtCore/QTimer>
-
-#include <ctime>
-
-
-K_PLUGIN_FACTORY(KPasswdServerFactory,
-                 registerPlugin<KPasswdServer>();
-    )
-K_EXPORT_PLUGIN(KPasswdServerFactory("kpasswdserver"))
-
-#define AUTHINFO_EXTRAFIELD_DOMAIN QLatin1String("domain")
-#define AUTHINFO_EXTRAFIELD_ANONYMOUS QLatin1String("anonymous")
-#define AUTHINFO_EXTRAFIELD_BYPASS_CACHE_AND_KWALLET QLatin1String("bypass-cache-and-kwallet")
-#define AUTHINFO_EXTRAFIELD_SKIP_CACHING_ON_QUERY QLatin1String("skip-caching-on-query")
-#define AUTHINFO_EXTRAFIELD_HIDE_USERNAME_INPUT QLatin1String("hide-username-line")
-
-static int debugArea() { static int s_area = KDebug::registerArea("KPasswdServer"); return s_area; }
-
-static qlonglong getRequestId()
-{
-    static qlonglong nextRequestId = 0;
-    return nextRequestId++;
-}
-
-bool
-KPasswdServer::AuthInfoContainer::Sorter::operator ()(AuthInfoContainer* n1, AuthInfoContainer* n2) const
-{
-   if (!n1 || !n2)
-      return 0;
-
-   const int l1 = n1->directory.length();
-   const int l2 = n2->directory.length();
-   return l1 < l2;
-}
-
-
-KPasswdServer::KPasswdServer(QObject* parent, const QList<QVariant>&)
- : KDEDModule(parent)
-{
-    KIO::AuthInfo::registerMetaTypes();
-
-    m_seqNr = 0;
-    m_wallet = 0;
-    m_walletDisabled = false;
-
-    KPasswdServerAdaptor *adaptor = new KPasswdServerAdaptor(this);
-    // register separately from kded
-    QDBusConnection::sessionBus().registerService("org.kde.kpasswdserver");
-    // connect signals to the adaptor
-    connect(this,
-            SIGNAL(checkAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo)),
-            adaptor,
-            SIGNAL(checkAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo)));
-    connect(this,
-            SIGNAL(queryAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo)),
-            adaptor,
-            SIGNAL(queryAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo)));
-
-    connect(this, SIGNAL(windowUnregistered(qlonglong)),
-            this, SLOT(removeAuthForWindowId(qlonglong)));
-
-    connect(KWindowSystem::self(), SIGNAL(windowRemoved(WId)),
-            this, SLOT(windowRemoved(WId)));
-}
-
-KPasswdServer::~KPasswdServer()
-{
-    // TODO: what about clients waiting for requests? will they just
-    //       notice kpasswdserver is gone from the dbus?
-    qDeleteAll(m_authPending);
-    qDeleteAll(m_authWait);
-    qDeleteAll(m_authDict);
-    qDeleteAll(m_authInProgress);
-    qDeleteAll(m_authRetryInProgress);
-    delete m_wallet;
-}
-
-// Helper - returns the wallet key to use for read/store/checking for existence.
-static QString makeWalletKey( const QString& key, const QString& realm )
-{
-    return realm.isEmpty() ? key : key + '-' + realm;
-}
-
-// Helper for storeInWallet/readFromWallet
-static QString makeMapKey( const char* key, int entryNumber )
-{
-    QString str = QLatin1String( key );
-    if ( entryNumber > 1 )
-        str += '-' + QString::number( entryNumber );
-    return str;
-}
-
-static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KIO::AuthInfo &info )
-{
-    if ( !wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
-        if ( !wallet->createFolder( KWallet::Wallet::PasswordFolder() ) )
-            return false;
-    wallet->setFolder( KWallet::Wallet::PasswordFolder() );
-    // Before saving, check if there's already an entry with this login.
-    // If so, replace it (with the new password). Otherwise, add a new entry.
-    typedef QMap<QString,QString> Map;
-    int entryNumber = 1;
-    Map map;
-    QString walletKey = makeWalletKey( key, info.realmValue );
-    kDebug(debugArea()) << "walletKey =" << walletKey << "  reading existing map";
-    if ( wallet->readMap( walletKey, map ) == 0 ) {
-        Map::ConstIterator end = map.constEnd();
-        Map::ConstIterator it = map.constFind( "login" );
-        while ( it != end ) {
-            if ( it.value() == info.username ) {
-                break; // OK, overwrite this entry
-            }
-            it = map.constFind( QString( "login-" ) + QString::number( ++entryNumber ) );
-        }
-        // If no entry was found, create a new entry - entryNumber is set already.
-    }
-    const QString loginKey = makeMapKey( "login", entryNumber );
-    const QString passwordKey = makeMapKey( "password", entryNumber );
-    kDebug(debugArea()) << "writing to " << loginKey << "," << passwordKey;
-    // note the overwrite=true by default
-    map.insert( loginKey, info.username );
-    map.insert( passwordKey, info.password );
-    wallet->writeMap( walletKey, map );
-    return true;
-}
-
-
-static bool readFromWallet( KWallet::Wallet* wallet, const QString& key, const QString& realm, QString& username, QString& password, bool userReadOnly, QMap<QString,QString>& knownLogins )
-{
-    //kDebug(debugArea()) << "key =" << key << " username =" << username << " password =" /*<< password*/ << " userReadOnly =" << userReadOnly << " realm =" << realm;
-    if ( wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
-    {
-        wallet->setFolder( KWallet::Wallet::PasswordFolder() );
-
-        QMap<QString,QString> map;
-        if ( wallet->readMap( makeWalletKey( key, realm ), map ) == 0 )
-        {
-            typedef QMap<QString,QString> Map;
-            int entryNumber = 1;
-            Map::ConstIterator end = map.constEnd();
-            Map::ConstIterator it = map.constFind( "login" );
-            while ( it != end ) {
-                //kDebug(debugArea()) << "found " << it.key() << "=" << it.value();
-                Map::ConstIterator pwdIter = map.constFind( makeMapKey( "password", entryNumber ) );
-                if ( pwdIter != end ) {
-                    if ( it.value() == username )
-                        password = pwdIter.value();
-                    knownLogins.insert( it.value(), pwdIter.value() );
-                }
-
-                it = map.constFind( QString( "login-" ) + QString::number( ++entryNumber ) );
-            }
-            //kDebug(debugArea()) << knownLogins.count() << " known logins";
-
-            if ( !userReadOnly && !knownLogins.isEmpty() && username.isEmpty() ) {
-                // Pick one, any one...
-                username = knownLogins.begin().key();
-                password = knownLogins.begin().value();
-                //kDebug(debugArea()) << "picked the first one:" << username;
-            }
-
-            return true;
-        }
-    }
-    return false;
-}
-
-bool KPasswdServer::hasPendingQuery(const QString &key, const KIO::AuthInfo &info)
-{
-    const QString path2 (info.url.directory(KUrl::AppendTrailingSlash | KUrl::ObeyTrailingSlash));
-    Q_FOREACH(const Request *request, m_authPending) {
-        if (request->key != key) {
-            continue;
-        }
-
-        if (info.verifyPath) {
-            const QString path1 (request->info.url.directory(KUrl::AppendTrailingSlash |
-                                                             KUrl::ObeyTrailingSlash));
-            if (!path2.startsWith(path1)) {
-                continue;
-            }
-        }
-
-        return true;
-    }
-
-    return false;
-}
-
-QByteArray
-KPasswdServer::checkAuthInfo(const QByteArray &data, qlonglong windowId, qlonglong usertime)
-{
-    KIO::AuthInfo info;
-    QDataStream stream(data);
-    stream >> info;
-    if (usertime != 0) {
-        kapp->updateUserTimestamp(usertime);
-    }
-
-    // if the check depends on a pending query, delay it
-    // until that query is finished.
-    const QString key (createCacheKey(info));
-    if (hasPendingQuery(key, info)) {
-        setDelayedReply(true);
-        Request *pendingCheck = new Request;
-        pendingCheck->isAsync = false;
-        if (calledFromDBus()) {
-            pendingCheck->transaction = message();
-        }
-        pendingCheck->key = key;
-        pendingCheck->info = info;
-        m_authWait.append(pendingCheck);
-        return data;             // return value will be ignored
-    }
-
-    // kDebug(debugArea()) << "key =" << key << "user =" << info.username << "windowId =" << windowId;
-    const AuthInfoContainer *result = findAuthInfoItem(key, info);
-    if (!result || result->isCanceled)
-    {
-        if (!result &&
-            (info.username.isEmpty() || info.password.isEmpty()) &&
-            !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(),
-                                              KWallet::Wallet::PasswordFolder(),
-                                              makeWalletKey(key, info.realmValue)))
-        {
-            QMap<QString, QString> knownLogins;
-            if (openWallet(windowId)) {
-                if (readFromWallet(m_wallet, key, info.realmValue, info.username,
-                                   info.password, info.readOnly, knownLogins))
-                {
-                    info.setModified(true);
-                            // fall through
-                }
-            }
-        } else {
-            info.setModified(false);
-        }
-    } else {
-        kDebug(debugArea()) << "Found cached authentication for" << key;
-        updateAuthExpire(key, result, windowId, false);
-        copyAuthInfo(result, info);
-    }
-
-    QByteArray data2;
-    QDataStream stream2(&data2, QIODevice::WriteOnly);
-    stream2 << info;
-    return data2;
-}
-
-qlonglong KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo info, qlonglong windowId,
-                                            qlonglong usertime)
-{
-    if (usertime != 0) {
-        kapp->updateUserTimestamp(usertime);
-    }
-
-    // send the request id back to the client
-    qlonglong requestId = getRequestId();
-    kDebug(debugArea()) << "User =" << info.username << ", WindowId =" << windowId;
-    if (calledFromDBus()) {
-        QDBusMessage reply(message().createReply(requestId));
-        QDBusConnection::sessionBus().send(reply);
-    }
-
-    // if the check depends on a pending query, delay it
-    // until that query is finished.
-    const QString key (createCacheKey(info));
-    if (hasPendingQuery(key, info)) {
-        Request *pendingCheck = new Request;
-        pendingCheck->isAsync = true;
-        pendingCheck->requestId = requestId;
-        pendingCheck->key = key;
-        pendingCheck->info = info;
-        m_authWait.append(pendingCheck);
-        return 0; // ignored as we already sent a reply
-    }
-
-    const AuthInfoContainer *result = findAuthInfoItem(key, info);
-    if (!result || result->isCanceled)
-    {
-        if (!result &&
-            (info.username.isEmpty() || info.password.isEmpty()) &&
-            !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(),
-                                              KWallet::Wallet::PasswordFolder(),
-                                              makeWalletKey(key, info.realmValue)))
-        {
-            QMap<QString, QString> knownLogins;
-            if (openWallet(windowId)) {
-                if (readFromWallet(m_wallet, key, info.realmValue, info.username,
-                                   info.password, info.readOnly, knownLogins))
-                {
-                    info.setModified(true);
-                            // fall through
-                }
-            }
-        } else {
-            info.setModified(false);
-        }
-    } else {
-        // kDebug(debugArea()) << "Found cached authentication for" << key;
-        updateAuthExpire(key, result, windowId, false);
-        copyAuthInfo(result, info);
-    }
-
-    emit checkAuthInfoAsyncResult(requestId, m_seqNr, info);
-    return 0; // ignored
-}
-
-QByteArray
-KPasswdServer::queryAuthInfo(const QByteArray &data, const QString &errorMsg,
-                             qlonglong windowId, qlonglong seqNr, qlonglong usertime)
-{
-    KIO::AuthInfo info;
-    QDataStream stream(data);
-    stream >> info;
-
-    kDebug(debugArea()) << "User =" << info.username << ", WindowId =" << windowId
-                        << "seqNr =" << seqNr << ", errorMsg =" << errorMsg;
-
-    if ( !info.password.isEmpty() ) { // should we really allow the caller to pre-fill the password?
-        kDebug(debugArea()) << "password was set by caller";
-    }
-    if (usertime != 0) {
-        kapp->updateUserTimestamp(usertime);
-    }
-
-    const QString key (createCacheKey(info));
-    Request *request = new Request;
-    setDelayedReply(true);
-    request->isAsync = false;
-    request->transaction = message();
-    request->key = key;
-    request->info = info;
-    request->windowId = windowId;
-    request->seqNr = seqNr;
-    if (errorMsg == "<NoAuthPrompt>")
-    {
-       request->errorMsg.clear();
-       request->prompt = false;
-    }
-    else
-    {
-       request->errorMsg = errorMsg;
-       request->prompt = true;
-    }
-    m_authPending.append(request);
-
-    if (m_authPending.count() == 1)
-       QTimer::singleShot(0, this, SLOT(processRequest()));
-
-    return QByteArray();        // return value is going to be ignored
-}
-
-qlonglong
-KPasswdServer::queryAuthInfoAsync(const KIO::AuthInfo &info, const QString &errorMsg,
-                                  qlonglong windowId, qlonglong seqNr, qlonglong usertime)
-{
-    kDebug(debugArea()) << "User =" << info.username << ", WindowId =" << windowId
-                        << "seqNr =" << seqNr << ", errorMsg =" << errorMsg;
-
-    if (!info.password.isEmpty()) {
-        kDebug(debugArea()) << "password was set by caller";
-    }
-    if (usertime != 0) {
-        kapp->updateUserTimestamp(usertime);
-    }
-
-    const QString key (createCacheKey(info));
-    Request *request = new Request;
-    request->isAsync = true;
-    request->requestId = getRequestId();
-    request->key = key;
-    request->info = info;
-    request->windowId = windowId;
-    request->seqNr = seqNr;
-    if (errorMsg == "<NoAuthPrompt>") {
-        request->errorMsg.clear();
-        request->prompt = false;
-    } else {
-        request->errorMsg = errorMsg;
-        request->prompt = true;
-    }
-    m_authPending.append(request);
-
-    if (m_authPending.count() == 1) {
-        QTimer::singleShot(0, this, SLOT(processRequest()));
-    }
-
-    return request->requestId;
-}
-
-void
-KPasswdServer::addAuthInfo(const KIO::AuthInfo &info, qlonglong windowId)
-{
-    kDebug(debugArea()) << "User =" << info.username << ", Realm =" << info.realmValue << ", WindowId =" << windowId;
-    const QString key (createCacheKey(info));
-
-    m_seqNr++;
-
-    if (!m_walletDisabled && openWallet(windowId) && storeInWallet(m_wallet, key, info)) {
-        // Since storing the password in the wallet succeeded, make sure the
-        // password information is stored in memory only for the duration the
-        // windows associated with it are still around.
-        AuthInfo authToken (info);
-        authToken.keepPassword = false;
-        addAuthInfoItem(key, authToken, windowId, m_seqNr, false);
-        return;
-    }
-
-    addAuthInfoItem(key, info, windowId, m_seqNr, false);
-}
-
-void
-KPasswdServer::addAuthInfo(const QByteArray &data, qlonglong windowId)
-{
-    KIO::AuthInfo info;
-    QDataStream stream(data);
-    stream >> info;
-    addAuthInfo(info, windowId);
-}
-
-void
-KPasswdServer::removeAuthInfo(const QString& host, const QString& protocol, const QString& user)
-{
-    kDebug(debugArea()) << protocol << host << user;
-
-    QHashIterator< QString, AuthInfoContainerList* > dictIterator(m_authDict);
-    while (dictIterator.hasNext())
-    {
-        dictIterator.next();
-
-        AuthInfoContainerList *authList = dictIterator.value();
-        if (!authList)
-            continue;
-
-        Q_FOREACH(AuthInfoContainer *current, *authList)
-        {
-            kDebug(debugArea()) << "Evaluating: " << current->info.url.protocol()
-                     << current->info.url.host()
-                     << current->info.username;
-            if (current->info.url.protocol() == protocol &&
-               current->info.url.host() == host &&
-               (current->info.username == user || user.isEmpty()))
-            {
-                kDebug(debugArea()) << "Removing this entry";
-                removeAuthInfoItem(dictIterator.key(), current->info);
-            }
-        }
-    }
-}
-
-bool
-KPasswdServer::openWallet( qlonglong windowId )
-{
-    if ( m_wallet && !m_wallet->isOpen() ) { // forced closed
-        delete m_wallet;
-        m_wallet = 0;
-    }
-    if ( !m_wallet )
-        m_wallet = KWallet::Wallet::openWallet(
-            KWallet::Wallet::NetworkWallet(), (WId)(windowId));
-    return m_wallet != 0;
-}
-
-void
-KPasswdServer::processRequest()
-{
-    if (m_authPending.isEmpty()) {
-        return;
-    }
-
-    QScopedPointer<Request> request (m_authPending.takeFirst());
-
-    // Prevent multiple prompts originating from the same window or the same
-    // key (server address).
-    const QString windowIdStr = QString::number(request->windowId);
-    if (m_authPrompted.contains(windowIdStr) || m_authPrompted.contains(request->key)) {
-        m_authPending.prepend(request.take());  // put it back.
-        return;
-    }
-
-    m_authPrompted.append(windowIdStr);
-    m_authPrompted.append(request->key);
-
-    KIO::AuthInfo &info = request->info;
-
-    // NOTE: If info.username is empty and info.url.user() is not, set
-    // info.username to info.url.user() to ensure proper caching. See
-    // note passwordDialogDone.
-    if (info.username.isEmpty() && !info.url.user().isEmpty()) {
-        info.username = info.url.user();
-    }
-    const bool bypassCacheAndKWallet = info.getExtraField(AUTHINFO_EXTRAFIELD_BYPASS_CACHE_AND_KWALLET).toBool();
-
-    const AuthInfoContainer *result = findAuthInfoItem(request->key, request->info);
-    kDebug(debugArea()) << "key=" << request->key << ", user=" << info.username << "seqNr: request=" << request->seqNr << ", result=" << (result ? result->seqNr : -1);
-
-    if (!bypassCacheAndKWallet && result && (request->seqNr < result->seqNr))
-    {
-        kDebug(debugArea()) << "auto retry!";
-        if (result->isCanceled)
-        {
-           info.setModified(false);
-        }
-        else
-        {
-           updateAuthExpire(request->key, result, request->windowId, false);
-           copyAuthInfo(result, info);
-        }
-    }
-    else
-    {
-        m_seqNr++;
-        if (result && !request->errorMsg.isEmpty())
-        {
-            QString prompt (request->errorMsg.trimmed());
-            prompt += QLatin1Char('\n');
-            prompt += i18n("Do you want to retry?");
-
-            KDialog* dlg = new KDialog(0, Qt::Dialog);
-            connect(dlg, SIGNAL(finished(int)), this, SLOT(retryDialogDone(int)));
-            connect(this, SIGNAL(destroyed(QObject*)), dlg, SLOT(deleteLater()));
-            dlg->setWindowTitle(i18n("Retry Authentication"));
-            dlg->setWindowIcon(KIcon("dialog-password"));
-            dlg->setButtons(KDialog::Yes | KDialog::No);
-            dlg->setObjectName("warningOKCancel");
-            KGuiItem buttonContinue (i18nc("@action:button filter-continue", "Retry"));
-            dlg->setButtonGuiItem(KDialog::Yes, buttonContinue);
-            dlg->setButtonGuiItem(KDialog::No, KStandardGuiItem::cancel());
-            dlg->setDefaultButton(KDialog::Yes);
-            dlg->setEscapeButton(KDialog::No);
-
-            KMessageBox::createKMessageBox(dlg, QMessageBox::Warning, prompt,
-                                           QStringList(), QString(), 0L,
-                                           (KMessageBox::Notify | KMessageBox::NoExec));
-
-            KWindowSystem::setMainWindow(dlg, request->windowId);
-
-            kDebug(debugArea()) << "Calling open on retry dialog" << dlg;
-            m_authRetryInProgress.insert(dlg, request.take());
-            dlg->open();
-            return;
-        }
-
-        if (request->prompt)
-        {
-            showPasswordDialog(request.take());
-            return;
-        }
-        else
-        {
-            if (!bypassCacheAndKWallet && request->prompt)
-            {
-                addAuthInfoItem(request->key, info, 0, m_seqNr, true);
-            }
-            info.setModified( false );
-        }
-    }
-
-    sendResponse(request.data());
-}
-
-QString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
-{
-    if( !info.url.isValid() ) {
-        // Note that a null key will break findAuthInfoItem later on...
-        kWarning(debugArea()) << "createCacheKey: invalid URL " << info.url ;
-        return QString();
-    }
-
-    // Generate the basic key sequence.
-    QString key = info.url.protocol();
-    key += '-';
-    if (!info.url.user().isEmpty())
-    {
-       key += info.url.user();
-       key += '@';
-    }
-    key += info.url.host();
-    int port = info.url.port();
-    if( port )
-    {
-      key += ':';
-      key += QString::number(port);
-    }
-
-    return key;
-}
-
-void KPasswdServer::copyAuthInfo(const AuthInfoContainer *i, KIO::AuthInfo& info)
-{
-    info = i->info;
-    info.setModified(true);
-}
-
-const KPasswdServer::AuthInfoContainer *
-KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
-{
-   // kDebug(debugArea()) << "key=" << key << ", user=" << info.username;
-
-   AuthInfoContainerList *authList = m_authDict.value(key);
-   if (authList)
-   {
-      QString path2 = info.url.directory(KUrl::AppendTrailingSlash|KUrl::ObeyTrailingSlash);
-      Q_FOREACH(AuthInfoContainer *current, *authList)
-      {
-          if (current->expire == AuthInfoContainer::expTime &&
-              static_cast<qulonglong>(time(0)) > current->expireTime)
-          {
-              authList->removeOne(current);
-              delete current;
-              continue;
-          }
-
-          if (info.verifyPath)
-          {
-              QString path1 = current->directory;
-              if (path2.startsWith(path1) &&
-                  (info.username.isEmpty() || info.username == current->info.username))
-                return current;
-          }
-          else
-          {
-              if (current->info.realmValue == info.realmValue &&
-                  (info.username.isEmpty() || info.username == current->info.username))
-                return current; // TODO: Update directory info,
-          }
-      }
-   }
-   return 0;
-}
-
-void
-KPasswdServer::removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
-{
-   AuthInfoContainerList *authList = m_authDict.value(key);
-   if (!authList)
-      return;
-
-   Q_FOREACH(AuthInfoContainer *current, *authList)
-   {
-       if (current->info.realmValue == info.realmValue)
-       {
-          authList->removeOne(current);
-          delete current;
-       }
-   }
-   if (authList->isEmpty())
-   {
-       delete m_authDict.take(key);
-   }
-}
-
-
-void
-KPasswdServer::addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, qlonglong windowId, qlonglong seqNr, bool canceled)
-{
-   kDebug(debugArea()) << "key=" << key
-                       << "window-id=" << windowId
-                       << "username=" << info.username
-                       << "realm=" << info.realmValue
-                       << "seqNr=" << seqNr
-                       << "keepPassword?" << info.keepPassword
-                       << "canceled?" << canceled;
-   AuthInfoContainerList *authList = m_authDict.value(key);
-   if (!authList)
-   {
-      authList = new AuthInfoContainerList;
-      m_authDict.insert(key, authList);
-   }
-   AuthInfoContainer *authItem = 0;
-   Q_FOREACH(AuthInfoContainer* current, *authList)
-   {
-       if (current->info.realmValue == info.realmValue)
-       {
-          authList->removeAll(current);
-          authItem = current;
-          break;
-       }
-   }
-
-   if (!authItem)
-   {
-      kDebug(debugArea()) << "Creating AuthInfoContainer";
-      authItem = new AuthInfoContainer;
-      authItem->expire = AuthInfoContainer::expTime;
-   }
-
-   authItem->info = info;
-   authItem->directory = info.url.directory(KUrl::AppendTrailingSlash|KUrl::ObeyTrailingSlash);
-   authItem->seqNr = seqNr;
-   authItem->isCanceled = canceled;
-
-   updateAuthExpire(key, authItem, windowId, (info.keepPassword && !canceled));
-
-   // Insert into list, keep the list sorted "longest path" first.
-   authList->append(authItem);
-   qSort(authList->begin(), authList->end(), AuthInfoContainer::Sorter());
-}
-
-void
-KPasswdServer::updateAuthExpire(const QString &key, const AuthInfoContainer *auth, qlonglong windowId, bool keep)
-{
-   AuthInfoContainer *current = const_cast<AuthInfoContainer *>(auth);
-   Q_ASSERT(current);
-
-   kDebug(debugArea()) << "key=" << key << "expire=" << current->expire << "window-id=" << windowId << "keep=" << keep;
-
-   if (keep && !windowId)
-   {
-      current->expire = AuthInfoContainer::expNever;
-   }
-   else if (windowId && (current->expire != AuthInfoContainer::expNever))
-   {
-      current->expire = AuthInfoContainer::expWindowClose;
-      if (!current->windowList.contains(windowId))
-         current->windowList.append(windowId);
-   }
-   else if (current->expire == AuthInfoContainer::expTime)
-   {
-      current->expireTime = time(0) + 10;
-   }
-
-   // Update mWindowIdList
-   if (windowId)
-   {
-      QStringList& keysChanged = mWindowIdList[windowId]; // find or insert
-      if (!keysChanged.contains(key))
-         keysChanged.append(key);
-   }
-}
-
-void
-KPasswdServer::removeAuthForWindowId(qlonglong windowId)
-{
-   const QStringList keysChanged = mWindowIdList.value(windowId);
-   foreach (const QString &key, keysChanged)
-   {
-      AuthInfoContainerList *authList = m_authDict.value(key);
-      if (!authList)
-         continue;
-
-      QMutableListIterator<AuthInfoContainer*> it (*authList);
-      while (it.hasNext())
-      {
-        AuthInfoContainer* current = it.next();
-        if (current->expire == AuthInfoContainer::expWindowClose)
-        {
-           if (current->windowList.removeAll(windowId) && current->windowList.isEmpty())
-           {
-              delete current;
-              it.remove();
-           }
-        }
-      }
-   }
-}
-
-void KPasswdServer::showPasswordDialog (KPasswdServer::Request* request)
-{
-    KIO::AuthInfo &info = request->info;
-    const bool bypassCacheAndKWallet = info.getExtraField(AUTHINFO_EXTRAFIELD_BYPASS_CACHE_AND_KWALLET).toBool();
-
-    QString username = info.username;
-    QString password = info.password;
-    bool hasWalletData = false;
-    QMap<QString, QString> knownLogins;
-
-    if ( !bypassCacheAndKWallet
-        && ( username.isEmpty() || password.isEmpty() )
-        && !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::PasswordFolder(), makeWalletKey( request->key, info.realmValue )) )
-    {
-        // no login+pass provided, check if kwallet has one
-        if ( openWallet( request->windowId ) )
-            hasWalletData = readFromWallet( m_wallet, request->key, info.realmValue, username, password, info.readOnly, knownLogins );
-    }
-
-    // assemble dialog-flags
-    KPasswordDialog::KPasswordDialogFlags dialogFlags;
-
-    if (info.getExtraField(AUTHINFO_EXTRAFIELD_DOMAIN).isValid())
-    {
-        dialogFlags |= KPasswordDialog::ShowDomainLine;
-        if (info.getExtraFieldFlags(AUTHINFO_EXTRAFIELD_DOMAIN) & KIO::AuthInfo::ExtraFieldReadOnly)
-        {
-            dialogFlags |= KPasswordDialog::DomainReadOnly;
-        }
-    }
-
-    if (info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).isValid())
-    {
-        dialogFlags |= KPasswordDialog::ShowAnonymousLoginCheckBox;
-    }
-
-    if (!info.getExtraField(AUTHINFO_EXTRAFIELD_HIDE_USERNAME_INPUT).toBool())
-    {
-        dialogFlags |= KPasswordDialog::ShowUsernameLine;
-    }
-
-    // If wallet is not enabled and the caller explicitly requested for it,
-    // do not show the keep password checkbox.
-    if (info.keepPassword && KWallet::Wallet::isEnabled())
-        dialogFlags |= KPasswordDialog::ShowKeepPassword;
-
-    // instantiate dialog
-    kDebug(debugArea()) << "Widget for" << request->windowId << QWidget::find(request->windowId) << QApplication::activeWindow();
-
-    KPasswordDialog* dlg = new KPasswordDialog(0, dialogFlags);
-    connect(dlg, SIGNAL(finished(int)), this, SLOT(passwordDialogDone(int)));
-    connect(this, SIGNAL(destroyed(QObject*)), dlg, SLOT(deleteLater()));
-
-    dlg->setPrompt(info.prompt);
-    dlg->setUsername(username);
-    if (info.caption.isEmpty())
-        dlg->setWindowTitle( i18n("Authentication Dialog") );
-    else
-        dlg->setWindowTitle( info.caption );
-
-    if ( !info.comment.isEmpty() )
-        dlg->addCommentLine( info.commentLabel, info.comment );
-
-    if ( !password.isEmpty() )
-        dlg->setPassword( password );
-
-    if (info.readOnly)
-        dlg->setUsernameReadOnly( true );
-    else
-        dlg->setKnownLogins( knownLogins );
-
-    if (hasWalletData)
-        dlg->setKeepPassword( true );
-
-    if (info.getExtraField(AUTHINFO_EXTRAFIELD_DOMAIN).isValid ())
-        dlg->setDomain(info.getExtraField(AUTHINFO_EXTRAFIELD_DOMAIN).toString());
-
-    if (info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).isValid () && password.isEmpty() && username.isEmpty())
-        dlg->setAnonymousMode(info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).toBool());
-
-    KWindowSystem::setMainWindow(dlg, request->windowId);
-
-    kDebug(debugArea()) << "Showing password dialog" << dlg << ", window-id=" << request->windowId;
-    m_authInProgress.insert(dlg, request);
-    dlg->open();
-}
-
-
-void KPasswdServer::sendResponse (KPasswdServer::Request* request)
-{
-    Q_ASSERT(request);
-    if (!request) {
-        return;
-    }
-
-    kDebug(debugArea()) << "key=" << request->key;
-    if (request->isAsync) {
-        emit queryAuthInfoAsyncResult(request->requestId, m_seqNr, request->info);
-    } else {
-        QByteArray replyData;
-        QDataStream stream2(&replyData, QIODevice::WriteOnly);
-        stream2 << request->info;
-        QDBusConnection::sessionBus().send(request->transaction.createReply(QVariantList() << replyData << m_seqNr));
-    }
-
-    // Check all requests in the wait queue.
-    Request *waitRequest;
-    QMutableListIterator<Request*> it(m_authWait);
-    while (it.hasNext()) {
-        waitRequest = it.next();
-
-        if (!hasPendingQuery(waitRequest->key, waitRequest->info))
-        {
-            const AuthInfoContainer *result = findAuthInfoItem(waitRequest->key,
-                                                               waitRequest->info);
-            QByteArray replyData;
-
-            QDataStream stream2(&replyData, QIODevice::WriteOnly);
-
-            KIO::AuthInfo rcinfo;
-            if (!result || result->isCanceled)
-            {
-                waitRequest->info.setModified(false);
-                stream2 << waitRequest->info;
-            }
-            else
-            {
-                updateAuthExpire(waitRequest->key, result, waitRequest->windowId, false);
-                copyAuthInfo(result, rcinfo);
-                stream2 << rcinfo;
-            }
-
-            if (waitRequest->isAsync) {
-                emit checkAuthInfoAsyncResult(waitRequest->requestId, m_seqNr, rcinfo);
-            } else {
-                QDBusConnection::sessionBus().send(waitRequest->transaction.createReply(QVariantList() << replyData << m_seqNr));
-            }
-
-            delete waitRequest;
-            it.remove();
-        }
-    }
-
-    // Re-enable password request processing for the current window id again.
-    m_authPrompted.removeAll(QString::number(request->windowId));
-    m_authPrompted.removeAll(request->key);
-
-    if (m_authPending.count())
-       QTimer::singleShot(0, this, SLOT(processRequest()));
-}
-
-void KPasswdServer::passwordDialogDone (int result)
-{
-    KPasswordDialog* dlg = qobject_cast<KPasswordDialog*>(sender());
-    Q_ASSERT(dlg);
-
-    QScopedPointer<Request> request (m_authInProgress.take(dlg));
-    Q_ASSERT(request);  // request should never be NULL.
-
-    if (request) {
-        KIO::AuthInfo& info = request->info;
-        const bool bypassCacheAndKWallet = info.getExtraField(AUTHINFO_EXTRAFIELD_BYPASS_CACHE_AND_KWALLET).toBool();
-
-        kDebug(debugArea()) << "dialog result=" << result << ", bypassCacheAndKWallet?" << bypassCacheAndKWallet;
-        if (dlg && result == KDialog::Accepted) {
-            Q_ASSERT(dlg);
-            const QString oldUsername (info.username);
-            info.username = dlg->username();
-            info.password = dlg->password();
-            info.keepPassword = dlg->keepPassword();
-
-            if (info.getExtraField(AUTHINFO_EXTRAFIELD_DOMAIN).isValid ())
-                info.setExtraField(AUTHINFO_EXTRAFIELD_DOMAIN, dlg->domain());
-            if (info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).isValid ())
-                info.setExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS, dlg->anonymousMode());
-
-            // When the user checks "keep password", that means:
-            // * if the wallet is enabled, store it there for long-term, and in kpasswdserver
-            // only for the duration of the window (#92928)
-            // * otherwise store in kpasswdserver for the duration of the KDE session.
-            if (!bypassCacheAndKWallet) {
-                /*
-                  NOTE: The following code changes the key under which the auth
-                  info is stored in memory if the request url contains a username.
-                  e.g. "ftp://user@localhost", but the user changes that username
-                  in the password dialog.
-
-                  Since the key generated to store the credential contains the
-                  username from the request URL, the key must be updated on such
-                  changes. Otherwise, the key will not be found on subsequent
-                  requests and the user will be end up being prompted over and
-                  over to re-enter the password unnecessarily.
-                */
-                if (!info.url.user().isEmpty() && info.username != info.url.user()) {
-                    const QString oldKey(request->key);
-                    removeAuthInfoItem(oldKey, info);
-                    info.url.setUser(info.username);
-                    request->key = createCacheKey(info);
-                    updateCachedRequestKey(m_authPending, oldKey, request->key);
-                    updateCachedRequestKey(m_authWait, oldKey, request->key);
-                }
-
-                const bool skipAutoCaching = info.getExtraField(AUTHINFO_EXTRAFIELD_SKIP_CACHING_ON_QUERY).toBool();
-                if (!skipAutoCaching && info.keepPassword && openWallet(request->windowId)) {
-                    if ( storeInWallet( m_wallet, request->key, info ) )
-                        // password is in wallet, don't keep it in memory after window is closed
-                        info.keepPassword = false;
-                }
-                addAuthInfoItem(request->key, info, request->windowId, m_seqNr, false);
-            }
-            info.setModified( true );
-        } else {
-            if (!bypassCacheAndKWallet && request->prompt) {
-                addAuthInfoItem(request->key, info, 0, m_seqNr, true);
-            }
-            info.setModified( false );
-        }
-
-        sendResponse(request.data());
-    }
-
-    dlg->deleteLater();
-}
-
-void KPasswdServer::retryDialogDone (int result)
-{
-    KDialog* dlg = qobject_cast<KDialog*>(sender());
-    Q_ASSERT(dlg);
-
-    QScopedPointer<Request> request (m_authRetryInProgress.take(dlg));
-    Q_ASSERT(request);
-
-    if (request) {
-        if (result == KDialog::Yes) {
-            showPasswordDialog(request.take());
-        } else {
-            // NOTE: If the user simply cancels the retry dialog, we remove the
-            // credential stored under this key because the original attempt to
-            // use it has failed. Otherwise, the failed credential would be cached
-            // and used subsequently.
-            //
-            // TODO: decide whether it should be removed from the wallet too.
-            KIO::AuthInfo& info = request->info;
-            removeAuthInfoItem(request->key, request->info);
-            info.setModified(false);
-            sendResponse(request.data());
-        }
-    }
-}
-
-void KPasswdServer::windowRemoved (WId id)
-{
-    bool foundMatch = false;
-    if (!m_authInProgress.isEmpty()) {
-        const qlonglong windowId = (qlonglong)(id);
-        QMutableHashIterator<QObject*, Request*> it (m_authInProgress);
-        while (it.hasNext()) {
-            it.next();
-            if (it.value()->windowId == windowId) {
-                Request* request = it.value();
-                QObject* obj = it.key();
-                it.remove();
-                m_authPrompted.removeAll(QString::number(request->windowId));
-                m_authPrompted.removeAll(request->key);
-                delete obj;
-                delete request;
-                foundMatch = true;
-            }
-        }
-    }
-
-    if (!foundMatch && !m_authRetryInProgress.isEmpty()) {
-        const qlonglong windowId = (qlonglong)(id);
-        QMutableHashIterator<QObject*, Request*> it (m_authRetryInProgress);
-        while (it.hasNext()) {
-            it.next();
-            if (it.value()->windowId == windowId) {
-                Request* request = it.value();
-                QObject* obj = it.key();
-                it.remove();
-                delete obj;
-                delete request;
-            }
-        }
-    }
-}
-
-void KPasswdServer::updateCachedRequestKey (QList<KPasswdServer::Request*>& list, const QString& oldKey, const QString& newKey)
-{
-    QListIterator<Request*> it (list);
-    while (it.hasNext()) {
-        Request* r = it.next();
-        if (r->key == oldKey) {
-            r->key = newKey;
-        }
-    }
-}
-
-
-#include "moc_kpasswdserver.cpp"
diff --git a/kpasswdserver/kpasswdserver.desktop b/kpasswdserver/kpasswdserver.desktop
deleted file mode 100644 (file)
index 4c98ba2..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=Password Caching
-Name[ar]=تخزين مؤقت لكلمة السر
-Name[ast]=Caché de contraseñes
-Name[bg]=Запомняне на пароли
-Name[bn]=পাসওয়ার্ড ক্যাশিং
-Name[bs]=Keširanje lozinke
-Name[ca]=Cau de les contrasenyes
-Name[ca@valencia]=Ús de memòria cau de contrasenyes
-Name[cs]=Dočasné ukládání hesel do mezipaměti
-Name[da]=Caching af adgangskoder
-Name[de]=Passwort-Zwischenspeicherung
-Name[el]=Λανθάνουσας μνήμη κωδικού πρόσβασης
-Name[en_GB]=Password Caching
-Name[eo]=Kaŝmemorado por pasvorto
-Name[es]=Caché de contraseñas
-Name[et]=Parooli puhverdamine
-Name[eu]=Pasahitza cachean gordetzea
-Name[fa]=نهان‌سازی رمزعبور
-Name[fi]=Salasanavälimuisti
-Name[fr]=Masquage du mot de passe
-Name[ga]=Taisce Focal Faire
-Name[gl]=Caché de contrasinais
-Name[gu]=પાસવર્ડ કેશિંગ
-Name[he]=שמירת סיסמאות במטמון
-Name[hi]=पासवर्ड कैशिंग
-Name[hr]=Spremanje zaporke u privremenu memoriju
-Name[hu]=Jelszavak gyorsítótárazása
-Name[ia]=Ponente in cache le contrasigno
-Name[id]=Penyimpanan sandi
-Name[is]=Skyndiminni fyrir lykilorð
-Name[it]=Memorizzazione delle password
-Name[ja]=パスワードキャッシング
-Name[kk]=Паролін кэштеу
-Name[km]=ឃ្លាំងសម្ងាត់​ពាក្យ​សម្ងាត់
-Name[kn]=ಗುಪ್ತಪದ (ಪಾಸ್ ವರ್ಡ್) ಸಂಗ್ರಹಣೆ (ಕ್ಯಾಶಿಂಗ್)
-Name[ko]=암호 캐싱
-Name[lt]=Slaptažodžio prisiminimas
-Name[lv]=Paroļu saglabāšana
-Name[mai]=गूढ़किल्ली कैशिंग
-Name[ml]=അടയാളവാക്കു് ഓര്‍ത്തുവയ്ക്കുക
-Name[mr]=गुप्तशब्द आठवणीत ठेवत आहे
-Name[nb]=Passordlagring
-Name[nds]=Twischenspiekern vun Passwöör
-Name[nl]=Caching van wachtwoorden
-Name[nn]=Mellomlager for passord
-Name[pa]=ਪਾਸਵਰਡ ਕੈਸ਼ਿੰਗ
-Name[pl]=Zapamiętywanie haseł
-Name[pt]='Cache' de Senhas
-Name[pt_BR]=Cache de senhas
-Name[ro]=Stocare parole
-Name[ru]=Кэширование паролей
-Name[si]=මුරපද කැචේ කිරීම
-Name[sk]=Ukladanie hesiel do vyrovnávacej pamäte
-Name[sl]=Predpomnjenje gesel
-Name[sr]=Кеширање лозинке
-Name[sr@ijekavian]=Кеширање лозинке
-Name[sr@ijekavianlatin]=Keširanje lozinke
-Name[sr@latin]=Keširanje lozinke
-Name[sv]=Lösenordslagring
-Name[tg]=Захираи парол
-Name[th]=การจัดเก็บรหัสผ่าน
-Name[tr]=Parola Önbellekleme
-Name[ug]=ئىم غەملەك
-Name[uk]=Кешування паролів
-Name[vi]=Lưu đệm mật khẩu
-Name[wa]=Muchete do scret
-Name[x-test]=xxPassword Cachingxx
-Name[zh_CN]=密码缓存
-Name[zh_TW]=密碼快取
-Comment=Temporary password caching
-Comment[ar]=تخبئة (تخزين مؤقت) لكلمات السر
-Comment[ast]=Cachéu temporal de contraseñes
-Comment[bg]=Временно запомняне на пароли
-Comment[bn]=সাময়িক পাসওয়ার্ড ক্যাশিং
-Comment[bs]=Privremeno keširanje lozinke
-Comment[ca]=Cau temporal de les contrasenyes
-Comment[ca@valencia]=Ús temporal de memòria cau de contrasenyes
-Comment[cs]=Dočasné ukládání hesel do mezipaměti
-Comment[da]=Midlertidig caching af adgangskoder
-Comment[de]=Temporäre Passwort-Zwischenspeicherung
-Comment[el]=Προσωρινή λανθάνουσα μνήμη κωδικού πρόσβασης
-Comment[en_GB]=Temporary password caching
-Comment[eo]=Kaŝmemorado por portempa pasvorto
-Comment[es]=Cacheo temporal de contraseñas
-Comment[et]=Ajutine parooli puhverdamine
-Comment[eu]=Pasahitzak cachean gordetzea aldi baterako
-Comment[fa]=نهان‌سازی موقت رمزعبور
-Comment[fi]=Väliaikainen salasanavälimuisti
-Comment[fr]=Masquage temporaire du mot de passe
-Comment[ga]=Taisce Shealadach Focal Faire
-Comment[gl]=Caché temporal de contrasinais
-Comment[gu]=કામચલાઉ પાસવર્ડ કેશીંગ
-Comment[he]=שמירה זמנית של סיסמאות בזיכרון מטמון
-Comment[hi]=अस्थायी पासवर्ड कैशिंग
-Comment[hr]=Privremeno spremanje zaporke
-Comment[hu]=Jelszavak ideiglenes gyorsítótárazása
-Comment[ia]=Ponente in cache le contrasigno temporari
-Comment[id]=Penyimpanan sandi temporer
-Comment[is]=Bráðabirgðavistun lykilorða í skyndiminni
-Comment[it]=Memorizzazione delle password temporanea
-Comment[ja]=一時的なパスワードキャッシング
-Comment[kk]=Паролін уақытша кэштеу
-Comment[km]=​ឃ្លាំងសម្ងាត់​ពាក្យ​សម្ងាត់​បណ្ដោះអាសន្ន
-Comment[kn]=ಗುಪ್ತಪದ (ಪಾಸ್ ವರ್ಡ್) ತತ್ಕಾಲ  ಸಂಗ್ರಹಣೆ (ಕ್ಯಾಶಿಂಗ್)
-Comment[ko]=임시 암호 캐싱
-Comment[lt]=Laikinas slaptažodžio prisiminimas
-Comment[lv]=Īslaicīga paroļu atcerēšanās
-Comment[mai]=अस्थायी गूढ़किल्ली कैशिंग
-Comment[ml]=താത്കാലികമായി അടയാളവാക്കു് ഓര്‍ത്തുവയ്ക്കുക
-Comment[mr]=गुप्तशब्द तात्पूरता आठवणीत ठेवत आहे
-Comment[nb]=Midlertidig mellomlagring av passord
-Comment[nds]=Passwöör temporeer twischenspiekern
-Comment[nl]=Tijdelijke caching van wachtwoorden
-Comment[nn]=Mellombels lagring av passord
-Comment[pa]=ਆਰਜੀ ਪਾਸਵਰਡ ਕੈਸ਼ਿੰਗ
-Comment[pl]=Tymczasowe zapamiętywanie haseł
-Comment[pt]='Cache' temporária de senhas
-Comment[pt_BR]=Cache temporária de senhas
-Comment[ro]=Stocarea temporară a parolelor
-Comment[ru]=Временное кэширование паролей
-Comment[si]=තාවකාලික මුරපද කැශ් කිරීම
-Comment[sk]=Dočasné ukladanie hesiel do vyrovnávacej pamäte
-Comment[sl]=Začasno predpomnjenje gesel
-Comment[sr]=Привремено кеширање лозинке
-Comment[sr@ijekavian]=Привремено кеширање лозинке
-Comment[sr@ijekavianlatin]=Privremeno keširanje lozinke
-Comment[sr@latin]=Privremeno keširanje lozinke
-Comment[sv]=Tillfällig lagring av lösenord
-Comment[tg]=Захираи пароли муваққатӣ
-Comment[th]=การจัดเก็บรหัสผ่านชั่วคราว
-Comment[tr]=Geçici parola önbelleklemesi
-Comment[ug]=ۋاقىتلىق ئىم غەملەك
-Comment[uk]=Тимчасове кешування паролів
-Comment[vi]=Lưu đệm mật khẩu tạm
-Comment[wa]=Muchete timporaire do scret
-Comment[x-test]=xxTemporary password cachingxx
-Comment[zh_CN]=临时性密码缓存
-Comment[zh_TW]=暫時性的密碼快取
-X-KDE-ServiceTypes=KDEDModule
-X-KDE-Library=kpasswdserver
-X-KDE-DBus-ModuleName=kpasswdserver
-X-KDE-Kded-autoload=false
-X-KDE-Kded-load-on-demand=true
diff --git a/kpasswdserver/kpasswdserver.h b/kpasswdserver/kpasswdserver.h
deleted file mode 100644 (file)
index 5654550..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-    This file is part of the KDE Password Server
-
-    Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
-    Copyright (C) 2012 Dawit Alemayehu (adawit@kde.org)
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    This software 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 library; see the file COPYING. If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-//----------------------------------------------------------------------------
-//
-// KDE Password Server
-
-#ifndef KPASSWDSERVER_H
-#define KPASSWDSERVER_H
-
-#include <QtCore/QHash>
-#include <QtCore/QStringList>
-#include <QtDBus/QDBusContext>
-#include <QtDBus/QDBusMessage>
-#include <qwindowdefs.h>
-
-#include <kio/authinfo.h>
-#include <kdedmodule.h>
-
-namespace KWallet {
-    class Wallet;
-}
-
-using namespace KIO;
-
-class KPasswdServer : public KDEDModule, protected QDBusContext
-{
-  Q_OBJECT
-
-public:
-  KPasswdServer(QObject* parent, const QList<QVariant>& = QList<QVariant>());
-  ~KPasswdServer();
-
-  // Called by the unit test
-  void setWalletDisabled(bool d) { m_walletDisabled = d; }
-
-public Q_SLOTS:
-  qlonglong checkAuthInfoAsync(KIO::AuthInfo, qlonglong, qlonglong);
-  qlonglong queryAuthInfoAsync(const KIO::AuthInfo &, const QString &, qlonglong, qlonglong, qlonglong);
-  void addAuthInfo(const KIO::AuthInfo &, qlonglong);
-  void removeAuthInfo(const QString& host, const QString& protocol, const QString& user);
-
-  // legacy methods provided for compatibility with old clients
-  QByteArray checkAuthInfo(const QByteArray &, qlonglong, qlonglong);
-  QByteArray queryAuthInfo(const QByteArray &, const QString &, qlonglong, qlonglong, qlonglong);
-  void addAuthInfo(const QByteArray &, qlonglong);
-
-  void processRequest();
-  // Remove all authentication info associated with windowId
-  void removeAuthForWindowId(qlonglong windowId);
-
-Q_SIGNALS:
-  void checkAuthInfoAsyncResult(qlonglong requestId, qlonglong seqNr, const KIO::AuthInfo &);
-  void queryAuthInfoAsyncResult(qlonglong requestId, qlonglong seqNr, const KIO::AuthInfo &);
-
-private Q_SLOTS:
-  void passwordDialogDone(int);
-  void retryDialogDone(int);
-  void windowRemoved(WId);
-
-private:
-  struct AuthInfoContainer {
-      AuthInfoContainer() : expire( expNever ), seqNr( 0 ), isCanceled( false ) {}
-
-    KIO::AuthInfo info;
-    QString directory;
-
-    enum { expNever, expWindowClose, expTime } expire;
-    QList<qlonglong> windowList;
-    qulonglong expireTime;
-    qlonglong seqNr;
-
-    bool isCanceled;
-
-    struct Sorter {
-        bool operator() (AuthInfoContainer* n1, AuthInfoContainer* n2) const;
-    };
-  };
-
-  struct Request {
-     bool isAsync; // true for async requests
-     qlonglong requestId; // set for async requests only
-     QDBusMessage transaction; // set for sync requests only
-     QString key;
-     KIO::AuthInfo info;
-     QString errorMsg;
-     qlonglong windowId;
-     qlonglong seqNr;
-     bool prompt;
-  };
-
-  QString createCacheKey( const KIO::AuthInfo &info );
-  const AuthInfoContainer *findAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
-  void removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
-  void addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, qlonglong windowId, qlonglong seqNr, bool canceled);
-  void copyAuthInfo(const AuthInfoContainer*, KIO::AuthInfo&);
-  void updateAuthExpire(const QString &key, const AuthInfoContainer *, qlonglong windowId, bool keep);
-  int findWalletEntry( const QMap<QString,QString>& map, const QString& username );
-  bool openWallet( qlonglong windowId );
-
-  bool hasPendingQuery(const QString &key, const KIO::AuthInfo &info);
-  void sendResponse (Request* request);
-  void showPasswordDialog(Request* request);
-  void updateCachedRequestKey(QList<Request*>&, const QString& oldKey, const QString& newKey);
-
-  typedef QList<AuthInfoContainer*> AuthInfoContainerList;
-  QHash<QString, AuthInfoContainerList*> m_authDict;
-
-  QList<Request*> m_authPending;
-  QList<Request*> m_authWait;
-  QHash<int, QStringList> mWindowIdList;
-  QHash<QObject*, Request*> m_authInProgress;
-  QHash<QObject*, Request*> m_authRetryInProgress;
-  QStringList m_authPrompted;
-  KWallet::Wallet* m_wallet;
-  bool m_walletDisabled;
-  qlonglong m_seqNr;
-};
-
-#endif
diff --git a/kpasswdserver/org.kde.KPasswdServer.xml b/kpasswdserver/org.kde.KPasswdServer.xml
deleted file mode 100644 (file)
index c2c6bc1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node>
-  <interface name="org.kde.KPasswdServer" >
-    <signal name="checkAuthInfoAsyncResult" >
-      <arg type="x" name="requestId" />
-      <arg type="x" name="seqNr" />
-      <arg type="(ysssssssssbbbba{s(siv)})" name="info" />
-      <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="KIO::AuthInfo" />
-    </signal>
-    <signal name="queryAuthInfoAsyncResult" >
-      <arg type="x" name="requestId" />
-      <arg type="x" name="seqNr" />
-      <arg type="(ysssssssssbbbba{s(siv)})" name="info" />
-      <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="KIO::AuthInfo" />
-    </signal>
-    <method name="checkAuthInfo" >
-      <arg direction="out" type="ay" />
-      <arg direction="in" type="ay" name="data" />
-      <arg direction="in" type="x" name="windowId" />
-      <arg direction="in" type="x" name="usertime" />
-    </method>
-    <method name="queryAuthInfo" >
-      <arg direction="out" type="ay" />
-      <arg direction="in" type="ay" name="data" />
-      <arg direction="in" type="s" name="errorMsg" />
-      <arg direction="in" type="x" name="windowId" />
-      <arg direction="in" type="x" name="seqNr" />
-      <arg direction="in" type="x" name="usertime" />
-    </method>
-    <method name="checkAuthInfoAsync" >
-      <arg direction="out" type="x" />
-      <arg direction="in" type="(ysssssssssbbbba{s(siv)})" name="info" />
-      <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="KIO::AuthInfo" />
-      <arg direction="in" type="x" name="windowId" />
-      <arg direction="in" type="x" name="usertime" />
-    </method>
-    <method name="queryAuthInfoAsync" >
-      <arg direction="out" type="x" />
-      <arg direction="in" type="(ysssssssssbbbba{s(siv)})" name="info" />
-      <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="KIO::AuthInfo" />
-      <arg direction="in" type="s" name="errorMsg" />
-      <arg direction="in" type="x" name="windowId" />
-      <arg direction="in" type="x" name="seqNr" />
-      <arg direction="in" type="x" name="usertime" />
-    </method>
-    <method name="addAuthInfo" >
-      <arg direction="in" type="ay" name="data" />
-      <arg direction="in" type="x" name="windowId" />
-    </method>
-    <method name="addAuthInfo" >
-      <arg direction="in" type="(ysssssssssbbbba{s(siv)})" name="info" />
-      <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="KIO::AuthInfo" />
-      <arg direction="in" type="x" name="windowId" />
-    </method>
-    <method name="removeAuthInfo" >
-      <arg direction="in" type="s" name="host" />
-      <arg direction="in" type="s" name="protocol" />
-      <arg direction="in" type="s" name="user" />
-    </method>
-  </interface>
-</node>
diff --git a/kpasswdserver/tests/CMakeLists.txt b/kpasswdserver/tests/CMakeLists.txt
deleted file mode 100644 (file)
index eddd045..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}/..
-    ${CMAKE_CURRENT_BINARY_DIR}/..
-)
-
-set (kpasswdserver_test_SRCS
-    kpasswdservertest.cpp
-    ../kpasswdserver.cpp
-)
-
-qt4_add_dbus_adaptor(kpasswdserver_test_SRCS ../org.kde.KPasswdServer.xml kpasswdserver.h KPasswdServer)
-
-kde4_add_test(kpasswdservertest ${kpasswdserver_test_SRCS})
-target_link_libraries(kpasswdservertest
-    ${KDE4_KDECORE_LIBS}
-    ${KDE4_KIO_LIBS}
-    ${QT_QTCORE_LIBRARY}
-    ${QT_QTTEST_LIBRARY}
-)
diff --git a/kpasswdserver/tests/kpasswdservertest.cpp b/kpasswdserver/tests/kpasswdservertest.cpp
deleted file mode 100644 (file)
index 3b1da80..0000000
+++ /dev/null
@@ -1,554 +0,0 @@
-/* This file is part of the KDE project
-    Copyright 2010 David Faure <faure@kde.org>
-    Copyright 2012 Dawit Alemayehu <adawit@kde.org>
-
-   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 ) version 3 or, at the discretion of KDE e.V. ( which shall
-   act as a proxy as in section 14 of the GPLv3 ), 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.  If not, see <http://www.gnu.org/licenses/>.
-   Boston, MA 02110-1301, USA.
-*/
-
-#include <kdebug.h>
-#include <kpassworddialog.h>
-#include <QApplication>
-#include <qtest_kde.h>
-#include <kpasswdserver.h>
-
-static const char* sigQueryAuthInfoResult = SIGNAL(queryAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo));
-static const char* sigCheckAuthInfoResult = SIGNAL(checkAuthInfoAsyncResult(qlonglong,qlonglong,KIO::AuthInfo));
-
-static QString getUserNameFrom(const KIO::AuthInfo& auth)
-{
-    if (auth.username.isEmpty() && !auth.url.user().isEmpty()) {
-        return auth.url.user();
-    }
-
-    return auth.username;
-}
-
-class KPasswdServerTest : public QObject
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void initTestCase()
-    {
-    }
-
-    void simpleTest()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        // Check that processRequest doesn't crash when it has nothing to do
-        server.processRequest();
-
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-
-        // Make a check for that host, should say "not found"
-        QVERIFY(noCheckAuth(server, info));
-
-        // Now add auth to the cache
-        const qlonglong windowId = 42;
-        KIO::AuthInfo realInfo = info;
-        realInfo.username = "toto"; // you can see I'm french
-        realInfo.password = "foobar";
-        server.addAuthInfo(realInfo, windowId); // seqnr=2
-
-        // queryAuth without the ability to prompt, will just return info unmodified
-        KIO::AuthInfo resultInfo;
-        queryAuth(server, info, resultInfo);
-        QCOMPARE(resultInfo.url, info.url);
-        QCOMPARE(resultInfo.username, QString());
-        QCOMPARE(resultInfo.password, QString());
-        QCOMPARE(resultInfo.isModified(), false);
-
-        // Check that checkAuth finds it
-        QVERIFY(successCheckAuth(server, info, realInfo));
-
-        // Now remove auth
-        server.removeAuthInfo(info.url.host(), info.url.protocol(), info.username);
-        // Check we can't find that auth anymore
-        QVERIFY(noCheckAuth(server, info));
-    }
-
-    void testCheckDuringQuery()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.kde.org");
-
-        // Start a query
-        QSignalSpy spyQuery(&server, sigQueryAuthInfoResult);
-        const qlonglong windowId = 42;
-        const qlonglong seqNr = 2;
-        const qlonglong id = server.queryAuthInfoAsync(
-            info,
-            QString("<NoAuthPrompt>"), // magic string to avoid a dialog
-            windowId, seqNr, 16 /*usertime*/);
-
-        // Before it is processed, do a check, it will reply delayed.
-        QSignalSpy spyCheck(&server, sigCheckAuthInfoResult);
-        const qlonglong idCheck = server.checkAuthInfoAsync(info, windowId, 17 /*usertime*/);
-        QCOMPARE(idCheck, 0LL); // always
-        QCOMPARE(spyCheck.count(), 0); // no reply yet
-
-        // Wait for the query to be processed
-        QVERIFY(QTest::kWaitForSignal(&server, sigQueryAuthInfoResult, 1000));
-        QCOMPARE(spyQuery.count(), 1);
-        QCOMPARE(spyQuery[0][0].toLongLong(), id);
-        KIO::AuthInfo result = spyQuery[0][2].value<KIO::AuthInfo>();
-
-        // Now the check will have replied
-        QCOMPARE(spyCheck.count(), 1);
-        QCOMPARE(spyCheck[0][0].toLongLong(), id+1); // it was the next request after the query
-        KIO::AuthInfo resultCheck = spyCheck[0][2].value<KIO::AuthInfo>();
-        QCOMPARE(result.username, resultCheck.username);
-        QCOMPARE(result.password, resultCheck.password);
-    }
-
-    void testExpiry()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-
-        // Add auth to the cache
-        const qlonglong windowId = 42;
-        KIO::AuthInfo realInfo = info;
-        realInfo.username = "toto";
-        realInfo.password = "foobar";
-        server.addAuthInfo(realInfo, windowId);
-
-        QVERIFY(successCheckAuth(server, info, realInfo));
-
-        // Close another window, shouldn't hurt
-        server.removeAuthForWindowId(windowId + 1);
-        QVERIFY(successCheckAuth(server, info, realInfo));
-
-        // Close window
-        server.removeAuthForWindowId(windowId);
-
-        // Check we can't find that auth anymore
-        QVERIFY(noCheckAuth(server, info));
-    }
-
-    void testFillDialog()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-        // What the app would ask
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-
-        // What the user would type
-        KIO::AuthInfo filledInfo(info);
-        filledInfo.username = "dfaure";
-        filledInfo.password = "toto";
-
-        KIO::AuthInfo result;
-        queryAuthWithDialog(server, info, filledInfo, result);
-    }
-
-    void testRejectRetryDialog()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-       // What the app would ask
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-
-        // What the user would type
-        KIO::AuthInfo filledInfo(info);
-        filledInfo.username = "username";
-        filledInfo.password = "password";
-
-        KIO::AuthInfo result;
-        queryAuthWithDialog(server, info, filledInfo, result);
-
-        // Pretend that the returned credentials failed and initiate a retry,
-        // but cancel the retry dialog.
-        info.password.clear();
-        result = KIO::AuthInfo();
-        queryAuthWithDialog(server, info, filledInfo, result, QDialog::Rejected, QLatin1String("Invalid username or password"));
-    }
-
-    void testAcceptRetryDialog()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-       // What the app would ask
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-
-        // What the user would type
-        KIO::AuthInfo filledInfo(info);
-        filledInfo.username = "username";
-        filledInfo.password = "password";
-
-        KIO::AuthInfo result;
-        queryAuthWithDialog(server, info, filledInfo, result);
-
-        // Pretend that the returned credentials failed and initiate a retry,
-        // but this time continue the retry.
-        info.password.clear();
-        result = KIO::AuthInfo();
-        queryAuthWithDialog(server, info, filledInfo, result, QDialog::Accepted, QLatin1String("Invalid username or password"));
-    }
-
-    void testUsernameMistmatch()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        // What the app would ask. Note the username in the URL.
-        KIO::AuthInfo info;
-        info.url = KUrl("http://foo@www.example.com");
-
-        // What the user would type
-        KIO::AuthInfo filledInfo(info);
-        filledInfo.username = "bar";
-        filledInfo.password = "blah";
-
-        KIO::AuthInfo result;
-        queryAuthWithDialog(server, info, filledInfo, result);
-
-        // Check the returned url does not match the request url because of the
-        // username mismatch between the request URL and the filled in one.
-        QVERIFY(result.url != filledInfo.url);
-
-        // Verify there is NO cached auth data if the request URL contains the
-        // original user name (foo).
-        QVERIFY(noCheckAuth(server, info));
-
-        // Verify there is a cached auth data if the request URL contains the
-        // new user name (bar).
-        filledInfo.url = KUrl("http://bar@www.example.com");
-        QVERIFY(successCheckAuth(server, filledInfo, result));
-
-        // Now the URL check should be valid too.
-        QCOMPARE(result.url, filledInfo.url);
-    }
-
-    void testCancelPasswordDialog()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        // What the app would ask.
-        KIO::AuthInfo info;
-        info.url = KUrl("http://www.example.com");
-        info.username = info.url.user();
-
-        KIO::AuthInfo result;
-        queryAuthWithDialog(server, info, KIO::AuthInfo(), result, QDialog::Rejected);
-    }
-
-    void testVerifyPath()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        // Add auth to the cache
-        const qlonglong windowId = 42;
-        KIO::AuthInfo authInfo;
-        authInfo.url = KUrl("http://www.example.com/test/test.html");
-        authInfo.username = "toto";
-        authInfo.password = "foobar";
-        server.addAuthInfo(authInfo, windowId);
-
-        KIO::AuthInfo queryAuthInfo;
-        queryAuthInfo.url = KUrl("http://www.example.com/test/test2/test.html");
-        queryAuthInfo.verifyPath = true;
-
-        KIO::AuthInfo expectedAuthInfo;
-        expectedAuthInfo.username = "toto";
-        expectedAuthInfo.password = "foobar";
-
-        QVERIFY(successCheckAuth(server, queryAuthInfo, expectedAuthInfo));
-    }
-
-    void testConcurrentQueryAuth()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        QList<KIO::AuthInfo> authInfos;
-        for (int i=0; i < 10; ++i) {
-           KIO::AuthInfo info;
-           info.url = KUrl("http://www.example.com/test" + QString::number(i) + ".html");
-           authInfos << info;
-        }
-
-        // What the user would type
-        KIO::AuthInfo filledInfo;
-        filledInfo.username = "bar";
-        filledInfo.password = "blah";
-
-        QList<KIO::AuthInfo> results;
-        concurrentQueryAuthWithDialog(server, authInfos, filledInfo, results);
-    }
-
-    void testConcurrentCheckAuth()
-    {
-        KPasswdServer server(this);
-        server.setWalletDisabled(true);
-
-        QList<KIO::AuthInfo> authInfos;
-        for (int i=0; i < 10; ++i) {
-           KIO::AuthInfo info;
-           info.url = KUrl("http://www.example.com/test" + QString::number(i) + ".html");
-           authInfos << info;
-        }
-
-        // What the user would type
-        KIO::AuthInfo filledInfo;
-        filledInfo.username = "bar";
-        filledInfo.password = "blah";
-
-        QList<KIO::AuthInfo> results;
-        concurrentQueryAuthWithDialog(server, authInfos, filledInfo, results);
-    }
-
-private:
-    // Checks that no auth is available for @p info
-    bool noCheckAuth(KPasswdServer& server, const KIO::AuthInfo& info)
-    {
-        KIO::AuthInfo result;
-        checkAuth(server, info, result);
-        return (result.username == info.username)
-            && (result.password == info.password)
-            && !result.isModified();
-    }
-
-    // Check that the auth is available and equal to @expectedInfo
-    bool successCheckAuth(KPasswdServer& server, const KIO::AuthInfo& info, const KIO::AuthInfo& expectedInfo)
-    {
-        KIO::AuthInfo result;
-        checkAuth(server, info, result);
-        return (result.username == expectedInfo.username)
-            && (result.password == expectedInfo.password)
-            && result.isModified();
-    }
-
-    void checkAuth(KPasswdServer& server, const KIO::AuthInfo& info, KIO::AuthInfo& result)
-    {
-        QSignalSpy spy(&server, sigCheckAuthInfoResult);
-        const qlonglong windowId = 42;
-        const qlonglong id = server.checkAuthInfoAsync(info, windowId, 17 /*usertime*/);
-        QCOMPARE(id, 0LL); // always
-        if (spy.isEmpty()) {
-            QVERIFY(QTest::kWaitForSignal(&server, sigCheckAuthInfoResult, 1000));
-        }
-        QCOMPARE(spy.count(), 1);
-        // kpasswdserver emits a requestId via dbus, we can't get that id here
-        QVERIFY(spy[0][0].toLongLong() >= 0);
-        //QCOMPARE(spy[0][1].toLongLong(), 3LL); // seqNr
-        result = spy[0][2].value<KIO::AuthInfo>();
-    }
-
-    void queryAuth(KPasswdServer& server, const KIO::AuthInfo& info, KIO::AuthInfo& result)
-    {
-        QSignalSpy spy(&server, sigQueryAuthInfoResult);
-        const qlonglong windowId = 42;
-        const qlonglong seqNr = 2;
-        const qlonglong id = server.queryAuthInfoAsync(
-            info,
-            QString("<NoAuthPrompt>"), // magic string to avoid a dialog
-            windowId, seqNr, 16 /*usertime*/);
-        QVERIFY(id >= 0); // requestId, ever increasing
-        if (spy.isEmpty())
-            QVERIFY(QTest::kWaitForSignal(&server, sigQueryAuthInfoResult, 1000));
-        QCOMPARE(spy.count(), 1);
-        QCOMPARE(spy[0][0].toLongLong(), id);
-        //QCOMPARE(spy[0][1].toLongLong(), 3LL); // seqNr
-        result = spy[0][2].value<KIO::AuthInfo>();
-    }
-
-    void queryAuthWithDialog(KPasswdServer& server, const KIO::AuthInfo& info,
-                             const KIO::AuthInfo& filledInfo, KIO::AuthInfo& result,
-                             int code = QDialog::Accepted, const QString& errMsg = QString())
-    {
-        QSignalSpy spy(&server, sigQueryAuthInfoResult);
-        const qlonglong windowId = 42;
-        const qlonglong seqNr = 2;
-        const qlonglong id = server.queryAuthInfoAsync(
-            info,
-            errMsg,
-            windowId, seqNr, 16 /*usertime*/);
-        QVERIFY(id >= 0); // requestId, ever increasing
-        QVERIFY(spy.isEmpty());
-
-        const bool hasErrorMessage = (!errMsg.isEmpty());
-        const bool isCancelRetryDialogTest = (hasErrorMessage && code == QDialog::Rejected);
-
-        if (hasErrorMessage) {
-            // Retry dialog only knows Yes/No
-            const int retryCode = (code == QDialog::Accepted ? KDialog::Yes : KDialog::No);
-            QMetaObject::invokeMethod(this, "checkRetryDialog",
-                                      Qt::QueuedConnection, Q_ARG(int, retryCode));
-        }
-
-        if (!isCancelRetryDialogTest) {
-            QMetaObject::invokeMethod(this, "checkAndFillDialog", Qt::QueuedConnection,
-                                      Q_ARG(KIO::AuthInfo, info),
-                                      Q_ARG(KIO::AuthInfo, filledInfo),
-                                      Q_ARG(int, code));
-        }
-        // Force KPasswdServer to process the request now, otherwise the checkAndFillDialog needs a timer too...
-        server.processRequest();
-        if (spy.isEmpty())
-            QVERIFY(QTest::kWaitForSignal(&server, sigQueryAuthInfoResult, 1000));
-        QCOMPARE(spy.count(), 1);
-        QCOMPARE(spy[0][0].toLongLong(), id);
-        //QCOMPARE(spy[0][1].toLongLong(), 3LL); // seqNr
-        result = spy[0][2].value<KIO::AuthInfo>();
-        const QString username = (isCancelRetryDialogTest ? QString() : filledInfo.username);
-        const QString password = (isCancelRetryDialogTest ? QString() : filledInfo.password);
-        const bool modified = (code == QDialog::Accepted ? true : false);
-        QCOMPARE(result.username, username);
-        QCOMPARE(result.password, password);
-        QCOMPARE(result.isModified(), modified);
-    }
-
-    void concurrentQueryAuthWithDialog(KPasswdServer& server, const QList<KIO::AuthInfo>& infos,
-                                       const KIO::AuthInfo& filledInfo, QList<KIO::AuthInfo>& results,
-                                       int code = QDialog::Accepted)
-    {
-        QSignalSpy spy(&server, sigQueryAuthInfoResult);
-        const qlonglong windowId = 42;
-        qlonglong seqNr = 0;
-        QList<qlonglong> idList;
-
-        Q_FOREACH(const KIO::AuthInfo& info, infos) {
-            const qlonglong id = server.queryAuthInfoAsync(
-                info,
-                QString(),
-                windowId, seqNr, 16 /*usertime*/);
-            QVERIFY(id >= 0); // requestId, ever increasing
-            idList << id;
-        }
-
-        QVERIFY(spy.isEmpty());
-        QMetaObject::invokeMethod(this, "checkAndFillDialog", Qt::QueuedConnection,
-                                  Q_ARG(KIO::AuthInfo, infos.first()),
-                                  Q_ARG(KIO::AuthInfo,filledInfo),
-                                  Q_ARG(int, code));
-
-        // Force KPasswdServer to process the request now, otherwise the checkAndFillDialog needs a timer too...
-        server.processRequest();
-        while (spy.count() < infos.count())
-            QVERIFY(QTest::kWaitForSignal(&server, sigQueryAuthInfoResult, 1000));
-
-        QCOMPARE(spy.count(), infos.count());
-
-        for(int i = 0, count = spy.count(); i < count; ++i) {
-            QCOMPARE(spy[i][0].toLongLong(), idList.at(i));
-            //QCOMPARE(spy[0][1].toLongLong(), 3LL); // seqNr
-            KIO::AuthInfo result = spy[i][2].value<KIO::AuthInfo>();
-            QCOMPARE(result.username, filledInfo.username);
-            QCOMPARE(result.password, filledInfo.password);
-            QCOMPARE(result.isModified(), (code == QDialog::Accepted ? true : false));
-            results << result;
-        }
-    }
-
-    void concurrentCheckAuthWithDialog(KPasswdServer& server, const QList<KIO::AuthInfo>& infos,
-                                       const KIO::AuthInfo& filledInfo, QList<KIO::AuthInfo>& results,
-                                       int code = QDialog::Accepted)
-    {
-        QSignalSpy spy(&server, sigQueryAuthInfoResult);
-        const qlonglong windowId = 42;
-        qlonglong seqNr = 0;
-        QList<qlonglong> idList;
-
-        QListIterator<KIO::AuthInfo> it (infos);
-        if (it.hasNext()) {
-            const qlonglong id = server.queryAuthInfoAsync(
-                it.next(),
-                QString(),
-                windowId, seqNr, 16 /*usertime*/);
-            QVERIFY(id >= 0); // requestId, ever increasing
-            idList << id;
-        }
-
-        while (it.hasNext()) {
-            const qlonglong id = server.checkAuthInfoAsync(it.next(), windowId,16 /*usertime*/);
-            QVERIFY(id >= 0); // requestId, ever increasing
-            idList << id;
-        }
-
-        QVERIFY(spy.isEmpty());
-        QMetaObject::invokeMethod(this, "checkAndFillDialog", Qt::QueuedConnection,
-                                  Q_ARG(KIO::AuthInfo, infos.first()),
-                                  Q_ARG(KIO::AuthInfo,filledInfo),
-                                  Q_ARG(int, code));
-
-        // Force KPasswdServer to process the request now, otherwise the checkAndFillDialog needs a timer too...
-        server.processRequest();
-        if (spy.isEmpty())
-            QVERIFY(QTest::kWaitForSignal(&server, sigQueryAuthInfoResult, 1000));
-
-        while ((spy.count()-1) < infos.count()) {
-            QVERIFY(QTest::kWaitForSignal(&server, sigCheckAuthInfoResult, 1000));
-        }
-
-        for(int i = 0, count = spy.count(); i < count; ++i) {
-            QCOMPARE(spy[i][0].toLongLong(), idList.at(i));
-            //QCOMPARE(spy[0][1].toLongLong(), 3LL); // seqNr
-            KIO::AuthInfo result = spy[i][2].value<KIO::AuthInfo>();
-            QCOMPARE(result.username, filledInfo.username);
-            QCOMPARE(result.password, filledInfo.password);
-            QCOMPARE(result.isModified(), (code == QDialog::Accepted ? true : false));
-            results << result;
-        }
-    }
-
-protected Q_SLOTS:
-    void checkAndFillDialog(const KIO::AuthInfo& info, const KIO::AuthInfo& filledInfo, int code = QDialog::Accepted)
-    {
-        Q_FOREACH(QWidget *widget, QApplication::topLevelWidgets()) {
-            if (KPasswordDialog* dialog = qobject_cast<KPasswordDialog *>(widget)) {
-                if (code == QDialog::Accepted) {
-                    QCOMPARE(dialog->username(), getUserNameFrom(info));
-                    QCOMPARE(dialog->password(), info.password);
-                    dialog->setUsername(filledInfo.username);
-                    dialog->setPassword(filledInfo.password);
-                }
-                dialog->done(code);
-                return;
-            }
-        }
-        kWarning() << "No KPasswordDialog found!";
-    }
-
-    void checkRetryDialog(int code = QDialog::Accepted)
-    {
-        Q_FOREACH(QWidget *widget, QApplication::topLevelWidgets()) {
-            KDialog* dialog = qobject_cast<KDialog*>(widget);
-            if (dialog && !dialog->inherits("KPasswordDialog")) {
-                dialog->done(code);
-                return;
-            }
-        }
-    }
-};
-
-QTEST_KDEMAIN( KPasswdServerTest, GUI )
-
-#include "kpasswdservertest.moc"
diff --git a/kwalletd/CMakeLists.txt b/kwalletd/CMakeLists.txt
deleted file mode 100644 (file)
index 7f1fc59..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-project(kwalletd)
-
-########### build backends #########
-add_subdirectory(backend)
-
-########### kwalletd ###############
-
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}/backend
-    ${CMAKE_CURRENT_BINARY_DIR}/backend
-)
-
-add_definitions(-DKDE_DEFAULT_DEBUG_AREA=285)
-
-set(kwalletd_SRCS
-   main.cpp
-   kbetterthankdialog.cpp
-   kwalletd.cpp
-   kwalletwizard.cpp
-   ktimeout.cpp
-   kwalletsessionstore.cpp
-   kbetterthankdialogbase.ui
-   kwalletwizardpageexplanation.ui
-   kwalletwizardpageintro.ui
-   kwalletwizardpageoptions.ui
-   kwalletwizardpagepassword.ui
-)
-
-find_file(kwallet_xml org.kde.KWallet.xml HINTS ${KDE4_DBUS_INTERFACES_INSTALL_DIR} )
-
-qt4_add_dbus_adaptor( kwalletd_SRCS ${kwallet_xml} kwalletd.h KWalletD )
-
-dbus_add_activation_service(org.kde.kwalletd.service.in)
-
-add_executable( kwalletd ${kwalletd_SRCS} )
-
-target_link_libraries(kwalletd
-    ${KDE4_KDEUI_LIBS}
-    ${SOCKET_LIBRARIES}
-    kwalletbackend
-)
-
-install(TARGETS kwalletd  ${INSTALL_TARGETS_DEFAULT_ARGS} )
-
-########### install files ###############
-
-install( FILES kwalletd.desktop  DESTINATION  ${KDE4_SERVICES_INSTALL_DIR} )
-install( FILES kwalletd.notifyrc DESTINATION  ${KDE4_DATA_INSTALL_DIR}/kwalletd )
-
-if(ENABLE_TESTING)
-    add_subdirectory(tests)
-    add_subdirectory(autotests)
-endif()
diff --git a/kwalletd/Messages.sh b/kwalletd/Messages.sh
deleted file mode 100755 (executable)
index 1ffed50..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-$EXTRACTRC `find . -name \*.ui` >> rc.cpp || exit 11
-$XGETTEXT `find . -name "*.cpp" -o -name "*.cc" | grep -v "/tests"` -o $podir/kwalletd.pot
diff --git a/kwalletd/README b/kwalletd/README
deleted file mode 100644 (file)
index 020e1ba..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-This directory consists of one daemon: kwalletd, and one library, in backend.
-
-KWallet::Backend is used inside kwalletd to manage the actual files and
-encryption.
-
-KWallet::Wallet, used to represent wallet entries and to encapsulate communication
-to and from the wallet server kwalletd, is part of the public API and has been
-moved to kdeui.
-
-
-Application level:
-
-KSystemTray notifier for wallet accesses
-
-Konqueror plugin
-
-KControl module
-
-You can also read the paper at http://www.staikos.net/~staikos/papers/2003/
diff --git a/kwalletd/autotests/CMakeLists.txt b/kwalletd/autotests/CMakeLists.txt
deleted file mode 100644 (file)
index 9620571..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-add_definitions(-DTEST_DATA="\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"")
-
-set(testname testpamopen)
-include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
-kde4_add_test(kwalletd-${testname} kwalletexecuter.cpp ${testname}.cpp)
-target_link_libraries(kwalletd-${testname} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDE4_KDECORE_LIBS})
-
-set(testname testpamopennofile)
-include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
-kde4_add_test(kwalletd-${testname} kwalletexecuter.cpp ${testname}.cpp)
-target_link_libraries(kwalletd-${testname} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDE4_KDECORE_LIBS})
\ No newline at end of file
diff --git a/kwalletd/autotests/kdewallet.kwl b/kwalletd/autotests/kdewallet.kwl
deleted file mode 100644 (file)
index 0cfc769..0000000
Binary files a/kwalletd/autotests/kdewallet.kwl and /dev/null differ
diff --git a/kwalletd/autotests/kwalletexecuter.cpp b/kwalletd/autotests/kwalletexecuter.cpp
deleted file mode 100644 (file)
index 432ae2a..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2014 by Alejandro Fiestas Olivares <afiestas@kde.org>              *
- *                                                                                   *
- *  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; if not, write to the Free Software                      *
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
- *************************************************************************************/
-
-#include "kwalletexecuter.h"
-
-#include <unistd.h>
-#include <sys/un.h>
-#include <sys/socket.h>
-
-#include <QTest>
-#include <QtCore/QTimer>
-#include <QtCore/QFile>
-#include <QtCore/QDebug>
-#include <QtCore/QEventLoop>
-#include <QtNetwork/QLocalSocket>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusServiceWatcher>
-#include <QtDBus/QDBusConnectionInterface>
-#include <kconfig.h>
-#include <kconfiggroup.h>
-#include <kstandarddirs.h>
-
-extern char **environ;
-
-KWalletExecuter::KWalletExecuter(QObject* parent): QObject(parent)
-{
-    // Make sure wallet is enabled, otherwise test will fail
-    KConfig cfg("kwalletrc");
-    KConfigGroup cg( &cfg, "Wallet");
-    cg.writeEntry("First Use", false);
-    cg.writeEntry("Enabled", true);
-}
-
-void KWalletExecuter::pamOpen()
-{
-    QDBusMessage msg =
-    QDBusMessage::createMethodCall("org.kde.kwalletd", "/modules/kwalletd", "org.kde.KWallet", "open");
-    QVariantList args;
-    qlonglong wid = 0;
-    args << QLatin1String("kdewallet") << wid << QLatin1String("buh");
-    msg.setArguments(args);
-    const QDBusMessage reply = QDBusConnection::sessionBus().call(msg);
-
-    QVERIFY2(reply.type() != QDBusMessage::ErrorMessage, reply.errorMessage().toLocal8Bit());
-    m_handler = reply.arguments().first().toInt();
-    if (m_handler <= 0) {
-        qFatal("Couldn't open the wallet via dbus");//We don't want the test to continue
-    }
-}
-
-void KWalletExecuter::pamWrite(const QString &value) const
-{
-    QDBusMessage msg =
-    QDBusMessage::createMethodCall("org.kde.kwalletd", "/modules/kwalletd", "org.kde.KWallet", "writePassword");
-    QVariantList args;
-    args << m_handler
-        << QLatin1String("Passwords")
-        << QLatin1String("foo")
-        << value
-        << QLatin1String("buh");
-    msg.setArguments(args);
-    const QDBusMessage reply = QDBusConnection::sessionBus().call(msg);
-
-    QVERIFY2(reply.type() != QDBusMessage::ErrorMessage, reply.errorMessage().toLocal8Bit());
-    int ret = reply.arguments().first().toInt();
-    QCOMPARE(ret, 0);
-}
-
-void KWalletExecuter::pamRead(const QString &value) const
-{
-    QDBusMessage msg =
-    QDBusMessage::createMethodCall("org.kde.kwalletd", "/modules/kwalletd", "org.kde.KWallet", "readPassword");
-    QVariantList args;
-    args << m_handler
-        << QLatin1String("Passwords")
-        << QLatin1String("foo")
-        << QLatin1String("buh");
-    msg.setArguments(args);
-    const QDBusMessage reply = QDBusConnection::sessionBus().call(msg);
-
-    QVERIFY2(reply.type() != QDBusMessage::ErrorMessage, reply.errorMessage().toLocal8Bit());
-    const QString password = reply.arguments().first().toString();
-    QCOMPARE(password, value);
-}
-
-void KWalletExecuter::execute_kwallet(int toWalletPipe[2], int envSocket)
-{
-    int x = 3;
-    //Close fd that are not of interest of kwallet
-    for (; x < 64; ++x) {
-        if (x != toWalletPipe[0] && x != envSocket) {
-            close (x);
-        }
-    }
-
-    close (toWalletPipe[1]);
-
-    char pipeInt[2];
-    sprintf(pipeInt, "%d", toWalletPipe[0]);
-    char sockIn[2];
-    sprintf(sockIn, "%d", envSocket);
-
-    qDebug() << "Executing kwalletd";
-    QByteArray wallet = KStandardDirs::findExe("kwalletd").toLocal8Bit();
-    char *args[] = {wallet.data(), (char*)"--pam-login", pipeInt, sockIn, NULL};
-    execve(args[0], args, environ);
-    qFatal("Couldn't execute kwalletd");
-}
-
-void KWalletExecuter::execute()
-{
-//Preparing sockets, we will share them with kwalletd
-    int toWalletPipe[2] = { -1, -1};
-    if (pipe(toWalletPipe) < 0) {
-        qFatal("Couldn't craete pipes");
-    }
-
-    int envSocket;
-    if ((envSocket = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
-        qFatal("Couldn't create socket");
-    }
-
-    QByteArray sock = KStandardDirs::locateLocal("socket", QLatin1String("test.socket")).toLocal8Bit();
-    struct sockaddr_un local;
-    local.sun_family = AF_UNIX;
-    strcpy(local.sun_path, sock.constData());
-    unlink(local.sun_path);//Just in case it exists from a previous login
-
-    int len;
-    len = strlen(local.sun_path) + sizeof(local.sun_family);
-    if (bind(envSocket, (struct sockaddr *)&local, len) == -1) {
-        qFatal("Couldn't bind the socket");
-    }
-
-    if (listen(envSocket, 5) == -1) {
-        qFatal("Couldn't listen into the socket");
-    }
-
-    qputenv("PAM_KWALLET_LOGIN", "1");
-    pid_t pid;
-    switch (pid = fork ()) {
-        case -1: {
-            qFatal("Couldn't fork to execv kwalletd");
-            break;
-        }
-
-        // Child fork, will contain kwalletd
-        case 0: {
-            execute_kwallet(toWalletPipe, envSocket);
-            /* Should never be reached */
-            break;
-        }
-
-        // Parent
-        default:
-            break;
-    };
-
-    close(toWalletPipe[0]);//Read end of the pipe, we will only use the write
-
-    QByteArray hash =
-    QByteArray::fromHex("1f1e7736894243657ef4a5274211b9a62703494c286e1699418a36e7ecf31d37319644db63d9fb26eb57cd9b7fea3e88bc18312480ba54f4");
-    write(toWalletPipe[1], hash.constData(), 56);
-
-    QLocalSocket *socket = new QLocalSocket(this);
-    socket->connectToServer(sock);
-    //No need to send any environment vars, the env is already ok
-    socket->close();
-
-    if (!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.kwalletd")) {
-        qDebug() << "AAAAAAAA";
-        QEventLoop loop;
-        QTimer::singleShot(30000, &loop, SLOT(quit()));
-        QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.kwalletd",
-                                                            QDBusConnection::sessionBus(),
-                                                            QDBusServiceWatcher::WatchForRegistration);
-        connect(watcher, SIGNAL(serviceRegistered(QString)), &loop, SLOT(quit()));
-        loop.exec();
-    }
-}
-
-void KWalletExecuter::cleanupTestCase()
-{
-    QDBusMessage msg =
-    QDBusMessage::createMethodCall("org.kde.kwalletd", "/MainApplication", "org.kde.KApplication", "quit");
-    const QDBusMessage reply = QDBusConnection::sessionBus().call(msg);
-
-    Q_ASSERT(reply.type() != QDBusMessage::ErrorMessage);
-}
diff --git a/kwalletd/autotests/kwalletexecuter.h b/kwalletd/autotests/kwalletexecuter.h
deleted file mode 100644 (file)
index 25c505c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2014 by Alejandro Fiestas Olivares <afiestas@kde.org>              *
- *                                                                                   *
- *  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; if not, write to the Free Software                      *
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
- *************************************************************************************/
-
-#ifndef KWALLET_EXECUTER
-#define KWALLET_EXECUTER
-
-#include <QtCore/QObject>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusConnection>
-/**
- * Executes kwalletd exactly in the same way it is executed in the pam module.
- * This makes the integration test closer to the real thing.
- */
-class KWalletExecuter : public QObject
-{
-    Q_OBJECT
-
-protected:
-    KWalletExecuter(QObject *parent=0);
-    void execute();
-    void pamOpen();
-    void pamWrite(const QString &value) const;
-    void pamRead(const QString &value) const;
-
-protected Q_SLOTS:
-    void cleanupTestCase();
-
-private:
-    void execute_kwallet(int toWalletPipe[2], int envSocket);
-
-    int m_handler;
-};
-#endif //KWALLET_EXECUTER
\ No newline at end of file
diff --git a/kwalletd/autotests/qtest_kwallet.h b/kwalletd/autotests/qtest_kwallet.h
deleted file mode 100644 (file)
index c582c04..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#ifndef KWALLET_CUSTOM_QTEST
-#define KWALLET_CUSTOM_QTEST
-#include <QtTest/QtTest>
-#include <QtCore/qdir.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <kaboutdata.h>
-#include <kcomponentdata.h>
-#include <kglobal.h>
-#include <kurl.h>
-
-#define QTEST_KDEMAIN_CORE_WITH_DBUS_DAEMON(TestObject) \
-int main(int argc, char *argv[]) \
-{ \
-    setenv("LC_ALL", "C", 1); \
-    assert( !QDir::homePath().isEmpty() ); \
-    setenv("KDEHOME", QFile::encodeName( QDir::homePath() + QString::fromLatin1("/.kde-unit-test" )), 1); \
-    setenv("XDG_DATA_HOME", QFile::encodeName( QDir::homePath() + QString::fromLatin1("/.kde-unit-test/xdg/local") ), 1); \
-    setenv("XDG_CONFIG_HOME", QFile::encodeName( QDir::homePath() + QString::fromLatin1("/.kde-unit-test/xdg/config") ), 1); \
-    unsetenv("KDE_COLOR_DEBUG"); \
-    QFile::remove(QDir::homePath() + QString::fromLatin1("/.kde-unit-test/share/config/qttestrc"));  \
-    QProcess dbus; \
-    dbus.start("dbus-launch"); \
-    dbus.waitForFinished(10000);    \
-    QByteArray session = dbus.readLine(); \
-    if (session.isEmpty()) { \
-        qFatal("Couldn't execute new dbus session"); \
-    } \
-    int pos = session.indexOf('='); \
-    setenv(session.left(pos), session.right(session.count() - pos - 1).trimmed(), 1); \
-    session = dbus.readLine(); \
-    pos = session.indexOf('='); \
-    QByteArray pid = session.right(session.count() - pos - 1).trimmed(); \
-    KAboutData aboutData( QByteArray("qttest"), QByteArray(), ki18n("KDE Test Program"), QByteArray("version") );  \
-    KComponentData cData(&aboutData); \
-    QCoreApplication app( argc, argv ); \
-    app.setApplicationName( QLatin1String("qttest") ); \
-    qRegisterMetaType<KUrl>(); /*as done by kapplication*/ \
-    qRegisterMetaType<KUrl::List>(); \
-    TestObject tc; \
-    KGlobal::ref(); /* don't quit qeventloop after closing a mainwindow */ \
-    int result = QTest::qExec( &tc, argc, argv ); \
-    dbus.start("kill", QStringList() << "-9" << pid); \
-    dbus.waitForFinished(10000); \
-    return result; \
-}
-#endif //KWALLET_CUSTOM_QTEST
diff --git a/kwalletd/autotests/testpamopen.cpp b/kwalletd/autotests/testpamopen.cpp
deleted file mode 100644 (file)
index 5c17837..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2013 by Alejandro Fiestas Olivares <afiestas@kde.org>              *
- *                                                                                   *
- *  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; if not, write to the Free Software                      *
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
- *************************************************************************************/
-
-#include "kwalletexecuter.h"
-#include "qtest_kwallet.h"
-#include <backendpersisthandler.h>
-
-#include <kstandarddirs.h>
-#include <QtTest/QtTest>
-#include <QtCore/QObject>
-#include <QtCore/QDebug>
-#include <QtCore/QProcess>
-#include <QtCore/qfile.h>
-
-#include <QDBusConnection>
-#include <QDBusMessage>
-#include <QDBusServiceWatcher>
-
-class testPamOpen : public KWalletExecuter
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void initTestCase();
-    void testOpen();
-    void testRead();
-    void testWrite();
-};
-
-void testPamOpen::initTestCase()
-{
-    QString from(TEST_DATA);
-    from.append("kdewallet.kwl");
-    QString to = KStandardDirs::locateLocal("data", "kwallet/kdewallet.kwl");
-    QFile::remove(to);
-    QFile::copy(from, to);
-    execute();
-}
-
-void testPamOpen::testOpen()
-{
-    pamOpen();
-}
-
-void testPamOpen::testRead()
-{
-    pamRead(QLatin1String("bar"));
-}
-
-void testPamOpen::testWrite()
-{
-    const QString value("bar2");
-    pamWrite(value);
-    pamRead(value);
-}
-
-QTEST_KDEMAIN_CORE_WITH_DBUS_DAEMON(testPamOpen)
-
-#include "testpamopen.moc"
diff --git a/kwalletd/autotests/testpamopennofile.cpp b/kwalletd/autotests/testpamopennofile.cpp
deleted file mode 100644 (file)
index a85619f..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2013 by Alejandro Fiestas Olivares <afiestas@kde.org>              *
- *                                                                                   *
- *  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; if not, write to the Free Software                      *
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
- *************************************************************************************/
-
-#include "kwalletexecuter.h"
-
-#include "qtest_kwallet.h"
-
-#include <kstandarddirs.h>
-#include <QtTest/QtTest>
-#include <QtCore/QObject>
-#include <QtCore/qdebug.h>
-#include <QtCore/qprocess.h>
-#include <QtCore/qfile.h>
-
-class testPamOpenNoFile : public KWalletExecuter
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void initTestCase();
-    void testOpen();
-    void testRead();
-    void testWrite();
-};
-
-void testPamOpenNoFile::initTestCase()
-{
-    //Make sure no file is there, so kwalletd should create one
-    const QString to = KStandardDirs::locateLocal("data", "kwallet/kdewallet.kwl");
-    qDebug() << "Removing: " << to;
-    qDebug() << "RemoveDF: " << QFile::remove(to);
-    execute();
-}
-
-void testPamOpenNoFile::testOpen()
-{
-    pamOpen();
-}
-
-void testPamOpenNoFile::testRead()
-{
-    pamRead(QString());
-}
-
-void testPamOpenNoFile::testWrite()
-{
-    const QLatin1String value("bar");
-    pamWrite(value);
-    pamRead(value);
-}
-
-QTEST_KDEMAIN_CORE_WITH_DBUS_DAEMON(testPamOpenNoFile)
-
-#include "testpamopennofile.moc"
diff --git a/kwalletd/backend/CMakeLists.txt b/kwalletd/backend/CMakeLists.txt
deleted file mode 100644 (file)
index caddc40..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-########### Configure checks for kwalletbackend ###############
-
-check_include_files(stdint.h HAVE_STDINT_H)
-check_include_files(sys/bitypes.h HAVE_SYS_BITYPES_H)
-
-configure_file(
-    config-kwalletbackend.h.cmake
-    ${CMAKE_CURRENT_BINARY_DIR}/config-kwalletbackend.h
-)
-
-########### kwalletbackend ###############
-
-set(kwalletbackend_LIB_SRCS
-   blockcipher.cc
-   blowfish.cc
-   cbc.cc
-   kwalletentry.cc
-   kwalletbackend.cc
-   backendpersisthandler.cpp
-)
-
-add_library(kwalletbackend SHARED ${kwalletbackend_LIB_SRCS})
-
-target_link_libraries(kwalletbackend ${KDE4_KDEUI_LIBS})
-
-set_target_properties(kwalletbackend PROPERTIES
-    VERSION ${GENERIC_LIB_VERSION}
-    SOVERSION ${GENERIC_LIB_SOVERSION}
-)
-
-generate_export_header(kwalletbackend)
-
-install(TARGETS kwalletbackend ${INSTALL_TARGETS_DEFAULT_ARGS})
-
-if(ENABLE_TESTING)
-    add_subdirectory(tests)
-endif()
diff --git a/kwalletd/backend/backendpersisthandler.cpp b/kwalletd/backend/backendpersisthandler.cpp
deleted file mode 100644 (file)
index 13bd3b8..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
-  * This file is part of the KDE project
-  * Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library 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
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#include <QIODevice>
-#include <QFile>
-#include <QCryptographicHash>
-
-#include <ksavefile.h>
-#include <kdebug.h>
-#include <kmessagebox.h>
-#include <klocalizedstring.h>
-
-#include "backendpersisthandler.h"
-#include "kwalletbackend.h"
-#include "blowfish.h"
-#include "cbc.h"
-
-#include <assert.h>
-#include <limits.h>
-
-#define KWALLET_CIPHER_BLOWFISH_ECB 0 // this was the old KWALLET_CIPHER_BLOWFISH_CBC
-#define KWALLET_CIPHER_3DES_CBC     1 // unsupported
-#define KWALLET_CIPHER_GPG          2 // unsupported
-#define KWALLET_CIPHER_BLOWFISH_CBC 3
-
-#define KWALLET_HASH_SHA1       0 // fallback
-#define KWALLET_HASH_MD5        1 // unsupported
-#define KWALLET_HASH_PBKDF2_SHA512 2 // used since 4.13 version
-#define KWALLET_HASH_SHA512 3 // used since 4.20 version
-
-namespace KWallet {
-
-typedef char Digest[16];
-
-static BlowfishPersistHandler *blowfishHandler = 0;
-
-BackendPersistHandler *BackendPersistHandler::getPersistHandler(BackendCipherType cipherType)
-{
-    switch (cipherType){
-        case BACKEND_CIPHER_BLOWFISH: {
-            if (blowfishHandler == 0) {
-                blowfishHandler = new BlowfishPersistHandler;
-            }
-            return blowfishHandler;
-        }
-        default: {
-            Q_ASSERT(0);
-            return 0;
-        }
-    }
-}
-
-BackendPersistHandler *BackendPersistHandler::getPersistHandler(char magicBuf[KWMAGIC_LEN])
-{
-    if (magicBuf[2] == KWALLET_CIPHER_BLOWFISH_CBC && magicBuf[3] == KWALLET_HASH_SHA512) {
-        if (blowfishHandler == 0) {
-            blowfishHandler = new BlowfishPersistHandler();
-        }
-        return blowfishHandler;
-    }
-    return 0;    // unknown cipher or hash
-}
-
-int BlowfishPersistHandler::write(Backend* wb, KSaveFile& sf, QByteArray& version, WId)
-{
-    assert(wb->_cipherType == BACKEND_CIPHER_BLOWFISH);
-
-    version[2] = KWALLET_CIPHER_BLOWFISH_CBC;
-    version[3] = KWALLET_HASH_SHA512; // Since 4.20 we always use SHA512
-
-    if (sf.write(version, 4) != 4) {
-        sf.abort();
-        return -4; // write error
-    }
-
-    // Holds the hashes we write out
-    QByteArray hashes;
-    QDataStream hashStream(&hashes, QIODevice::WriteOnly);
-    QCryptographicHash md5(QCryptographicHash::Md5);
-    hashStream << static_cast<quint32>(wb->_entries.count());
-
-    // Holds decrypted data prior to encryption
-    QByteArray decrypted;
-
-    // FIXME: we should estimate the amount of data we will write in each
-    // buffer and resize them approximately in order to avoid extra
-    // resizes.
-
-    // populate decrypted
-    QDataStream dStream(&decrypted, QIODevice::WriteOnly);
-    for (Backend::FolderMap::ConstIterator i = wb->_entries.constBegin(); i != wb->_entries.constEnd(); ++i) {
-        dStream << i.key();
-        dStream << static_cast<quint32>(i.value().count());
-
-        md5.reset();
-        md5.addData(i.key().toUtf8());
-        hashStream.writeRawData(md5.result().constData(), 16);
-        hashStream << static_cast<quint32>(i.value().count());
-
-        for (Backend::EntryMap::ConstIterator j = i.value().constBegin(); j != i.value().constEnd(); ++j) {
-            dStream << j.key();
-            dStream << static_cast<qint32>(j.value()->type());
-            dStream << j.value()->value();
-
-            md5.reset();
-            md5.addData(j.key().toUtf8());
-            hashStream.writeRawData(md5.result().constData(), 16);
-        }
-    }
-
-    if (sf.write(hashes, hashes.size()) != hashes.size()) {
-        sf.abort();
-        return -4; // write error
-    }
-
-    // calculate the hash of the file
-    QCryptographicHash sha(QCryptographicHash::Sha1);
-    BlowFish _bf;
-    CipherBlockChain bf(&_bf);
-
-    sha.addData(decrypted);
-
-    // prepend and append the random data
-    QByteArray wholeFile;
-    long blksz = bf.blockSize();
-    long newsize = decrypted.size() +
-               blksz            +    // encrypted block
-               4                +    // file size
-               20;      // size of the SHA hash
-
-    int delta = (blksz - (newsize % blksz));
-    newsize += delta;
-    wholeFile.resize(newsize);
-
-    const int randBlockSize = blksz+delta;
-    char randomData[randBlockSize];
-    ::memset(randomData, 0, randBlockSize * sizeof(char));
-    for (int i = 0; i < randBlockSize; i++) {
-        randomData[i] = char(qrand() % SHRT_MAX);
-    }
-    QByteArray randBlock(randomData, randBlockSize);
-
-    for (int i = 0; i < blksz; i++) {
-        wholeFile[i] = randBlock[i];
-    }
-
-    for (int i = 0; i < 4; i++) {
-        wholeFile[(int)(i+blksz)] = (decrypted.size() >> 8*(3-i))&0xff;
-    }
-
-    for (int i = 0; i < decrypted.size(); i++) {
-        wholeFile[(int)(i+blksz+4)] = decrypted[i];
-    }
-
-    for (int i = 0; i < delta; i++) {
-        wholeFile[(int)(i+blksz+4+decrypted.size())] = randBlock[(int)(i+blksz)];
-    }
-
-    const QByteArray hash = sha.result();
-    for (int i = 0; i < 20; i++) {
-        wholeFile[(int)(newsize - 20 + i)] = hash[i];
-    }
-
-    sha.reset();
-    decrypted.fill(0);
-
-    // encrypt the data
-    if (!bf.setKey(wb->_passhash.data(), wb->_passhash.size() * 8)) {
-        wholeFile.fill(0);
-        sf.abort();
-        return -2; // encrypt error
-    }
-
-    int rc = bf.encrypt(wholeFile.data(), wholeFile.size());
-    if (rc < 0) {
-        wholeFile.fill(0);
-        sf.abort();
-        return -2;  // encrypt error
-    }
-
-    // write the file
-    if (sf.write(wholeFile, wholeFile.size()) != wholeFile.size()) {
-        wholeFile.fill(0);
-        sf.abort();
-        return -4; // write error
-    }
-    if (!sf.finalize()) {
-        kDebug() << "WARNING: wallet sync to disk failed! KSaveFile status was " << sf.errorString();
-        wholeFile.fill(0);
-        return -4; // write error
-    }
-
-    wholeFile.fill(0);
-
-    return 0;
-}
-
-
-int BlowfishPersistHandler::read(Backend* wb, QFile& db, WId)
-{
-    wb->_cipherType = BACKEND_CIPHER_BLOWFISH;
-    wb->_hashes.clear();
-    // Read in the hashes
-    QDataStream hds(&db);
-    quint32 n;
-    hds >> n;
-    if (n > 0xffff) { // sanity check
-        return -43;
-    }
-
-    for (size_t i = 0; i < n; ++i) {
-        Digest d, d2; // judgment day
-        MD5Digest ba;
-        QMap<MD5Digest,QList<MD5Digest> >::iterator it;
-        quint32 fsz;
-        if (hds.atEnd()) return -43;
-        hds.readRawData(d, 16);
-        hds >> fsz;
-        ba = MD5Digest(reinterpret_cast<char *>(d));
-        it = wb->_hashes.insert(ba, QList<MD5Digest>());
-        for (size_t j = 0; j < fsz; ++j) {
-            hds.readRawData(d2, 16);
-            ba = MD5Digest(d2);
-            (*it).append(ba);
-        }
-    }
-
-    // Read in the rest of the file.
-    QByteArray encrypted = db.readAll();
-    assert(encrypted.size() < db.size());
-
-    BlowFish _bf;
-    CipherBlockChain bf(&_bf);
-    int blksz = bf.blockSize();
-    if ((encrypted.size() % blksz) != 0) {
-        return -5;     // invalid file structure
-    }
-
-    bf.setKey((void *)wb->_passhash.data(), wb->_passhash.size()*8);
-
-    if (!encrypted.data()) {
-        wb->_passhash.fill(0);
-        encrypted.fill(0);
-        return -7; // file structure error
-    }
-
-    int rc = bf.decrypt(encrypted.data(), encrypted.size());
-    if (rc < 0) {
-        wb->_passhash.fill(0);
-        encrypted.fill(0);
-        return -6;  // decrypt error
-    }
-
-    const char *t = encrypted.data();
-
-    // strip the leading data
-    t += blksz;    // one block of random data
-
-    // strip the file size off
-    long fsize = 0;
-
-    fsize |= (long(*t) << 24) & 0xff000000;
-    t++;
-    fsize |= (long(*t) << 16) & 0x00ff0000;
-    t++;
-    fsize |= (long(*t) <<  8) & 0x0000ff00;
-    t++;
-    fsize |= long(*t) & 0x000000ff;
-    t++;
-
-    if (fsize < 0 || fsize > long(encrypted.size()) - blksz - 4) {
-        //kDebug() << "fsize: " << fsize << " encrypted.size(): " << encrypted.size() << " blksz: " << blksz;
-        encrypted.fill(0);
-        return -9;         // file structure error.
-    }
-
-    // compute the hash ourself
-    QCryptographicHash sha(QCryptographicHash::Sha1);
-    sha.addData(t, fsize);
-    const QByteArray testhash = sha.result();
-
-    // compare hashes
-    int sz = encrypted.size();
-    for (int i = 0; i < 20; i++) {
-        if (testhash[i] != encrypted[sz - 20 + i]) {
-            encrypted.fill(0);
-            sha.reset();
-            return -8;         // hash error.
-        }
-    }
-
-    sha.reset();
-
-    // chop off the leading blksz+4 bytes
-    QByteArray tmpenc(encrypted.data()+blksz+4, fsize);
-    encrypted = tmpenc;
-    tmpenc.fill(0);
-
-    // Load the data structures up
-    QDataStream eStream(encrypted);
-
-    while (!eStream.atEnd()) {
-        QString folder;
-        quint32 n;
-
-        eStream >> folder;
-        eStream >> n;
-
-        // Force initialisation
-        wb->_entries[folder].clear();
-
-        for (size_t i = 0; i < n; ++i) {
-            QString key;
-            KWallet::Wallet::EntryType et = KWallet::Wallet::Unknown;
-            Entry *e = new Entry;
-            eStream >> key;
-            qint32 x = 0; // necessary to read properly
-            eStream >> x;
-            et = static_cast<KWallet::Wallet::EntryType>(x);
-
-            switch (et) {
-                case KWallet::Wallet::Password:
-                case KWallet::Wallet::Stream:
-                case KWallet::Wallet::Map:
-                    break;
-                default: // Unknown entry
-                    delete e;
-                    continue;
-            }
-
-            QByteArray a;
-            eStream >> a;
-            e->setValue(a);
-            e->setType(et);
-            e->setKey(key);
-            wb->_entries[folder][key] = e;
-        }
-    }
-
-    wb->_open = true;
-    encrypted.fill(0);
-    return 0;
-}
-
-} // namespace
diff --git a/kwalletd/backend/backendpersisthandler.h b/kwalletd/backend/backendpersisthandler.h
deleted file mode 100644 (file)
index 87aa7a3..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
-  * This file is part of the KDE project
-  * Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library 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
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-#ifndef BACKENDPERSISTHANDLER_H
-#define BACKENDPERSISTHANDLER_H
-
-#define KWMAGIC_LEN 12
-
-#include <qwindowdefs.h>
-#include <QFile>
-
-class KSaveFile;
-namespace KWallet {
-
-class Backend;
-
-enum BackendCipherType {
-    BACKEND_CIPHER_UNKNOWN,  /// this is used by freshly allocated wallets
-    BACKEND_CIPHER_BLOWFISH, /// use the legacy blowfish cipher type
-};
-
-class BackendPersistHandler {
-protected:
-    BackendPersistHandler() {}
-public:
-    virtual ~BackendPersistHandler() {}
-    /**
-     * This is a factory method used to get an instance of the backend suitable
-     * for reading/writing using the given cipher type
-     * 
-     * @param cypherType indication of the backend that should be returned
-     * @return a pointer to an instance of the requested handler type. No need to delete this pointer, it's lifetime is taken care of by this factory
-     */
-    static BackendPersistHandler *getPersistHandler(BackendCipherType cipherType);
-    static BackendPersistHandler *getPersistHandler(char magicBuf[KWMAGIC_LEN]);
-
-    virtual int write(Backend* wb, KSaveFile& sf, QByteArray& version, WId w) =0;
-    virtual int read(Backend* wb, QFile& sf, WId w) =0;
-};
-
-
-class BlowfishPersistHandler : public BackendPersistHandler {
-public:
-    explicit BlowfishPersistHandler() {}
-    virtual ~BlowfishPersistHandler() {}
-
-    virtual int write(Backend* wb, KSaveFile& sf, QByteArray& version, WId w);
-    virtual int read(Backend* wb, QFile& sf, WId w);
-};
-
-} // namespace
-
-#endif // BACKENDPERSISTHANDLER_H
diff --git a/kwalletd/backend/blockcipher.cc b/kwalletd/backend/blockcipher.cc
deleted file mode 100644 (file)
index 0584f06..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "blockcipher.h"
-
-
-
-BlockCipher::BlockCipher() {
-    _blksz = -1;
-}
-
-
-BlockCipher::~BlockCipher() {
-}
-
-
-int BlockCipher::blockSize() const {
-    return _blksz;
-}
-
-
diff --git a/kwalletd/backend/blockcipher.h b/kwalletd/backend/blockcipher.h
deleted file mode 100644 (file)
index 8e34f44..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef BLOCKCIPHER_H
-#define BLOCKCIPHER_H
-
-/* @internal
- */
-class BlockCipher {
-public:
-    BlockCipher();
-    virtual ~BlockCipher();
-
-    /*
-    *  Return the current blocksize in bytes.
-    */
-    int blockSize() const;
-
-    /*
-    *  Set the encryption key to key.  Return true on success.
-    */
-    virtual bool setKey(void *key, int bitlength) = 0;
-
-    /*
-    *  Get the required (or if it's variable, then the maximum) key
-    *  length for this cipher in bits.
-    */
-    virtual int keyLen() const = 0;
-
-    /*
-    *  True if all settings are good and we are ready to encrypt.
-    */
-    virtual bool readyToGo() const = 0;
-
-    /*
-    *  Encrypt the block.  Returns the number of bytes successfully
-    *  encrypted.  Can return -1 on error.
-    */
-    virtual int encrypt(void *block, int len) = 0;
-
-    /*
-    *  Decrypt the block.  Returns as does encrypt();
-    */
-    virtual int decrypt(void *block, int len) = 0;
-
-protected:
-    int _blksz;
-    int _keylen;   // in bits
-};
-
-#endif // BLOCKCIPHER_H
diff --git a/kwalletd/backend/blowfish.cc b/kwalletd/backend/blowfish.cc
deleted file mode 100644 (file)
index 55f92a9..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-   This library 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
-   Library General Public License for more details.
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-
-// FIXME: should we unroll some loops?  Optimization can be done here.
-
-
-/* Implementation of 16 rounds blowfish as described in:
- * _Applied_Cryptography_ (c) Bruce Schneier, 1996.
- */
-
-#include "blowfish.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "blowfishtables.h"
-
-
-BlowFish::BlowFish() {
-    _blksz = 8;
-    _key = 0L;
-    _init = false;
-}
-
-
-
-bool BlowFish::init() {
-    // Initialize the sboxes
-    for (int i = 0; i < 256; i++) {
-        _BF_S[0][i] = ks0[i];
-        _BF_S[1][i] = ks1[i];
-        _BF_S[2][i] = ks2[i];
-        _BF_S[3][i] = ks3[i];
-    }
-
-    uint32_t datal = 0;
-    uint32_t datar = 0;
-    uint32_t data = 0;
-    int j = 0;
-
-
-    // Update the sboxes and pbox.
-    for (int i = 0; i < 18; i++) {
-        data = 0;
-        for (int k = 0; k < 4; ++k) {
-            data = (data << 8) | ((unsigned char *)_key)[j++];
-            if (j >= _keylen / 8) {
-                j = 0;
-            }
-        }
-        _BF_P[i] = P[i] ^ data;
-    }
-
-    for (int i = 0; i < 18; i += 2) {
-        encipher(&datal, &datar);
-        _BF_P[i] = datal;
-        _BF_P[i+1] = datar;
-    }
-
-    for (int j = 0; j < 4; j++) {
-        for (int i = 0; i < 256; i += 2) {
-            encipher(&datal, &datar);
-            _BF_S[j][i] = datal;
-            _BF_S[j][i+1] = datar;
-        }
-    }
-
-    // Nice code from gpg's implementation...
-    //     check to see if the key is weak and return error if so
-    for (int i = 0; i < 255; i++) {
-        for (int j = i + 1; j < 256; j++) {
-            if ((_BF_S[0][i] == _BF_S[0][j]) || (_BF_S[1][i] == _BF_S[1][j]) ||
-                (_BF_S[2][i] == _BF_S[2][j]) || (_BF_S[3][i] == _BF_S[3][j])) {
-                return false;
-            }
-        }
-    }
-
-    _init = true;
-
-    return true;
-}
-
-
-BlowFish::~BlowFish() {
-    delete[] (unsigned char *)_key;
-    _key = 0L;
-}
-
-
-int BlowFish::keyLen() const {
-    return 512;
-}
-
-
-bool BlowFish::readyToGo() const {
-    return _init;
-}
-
-
-bool BlowFish::setKey(void *key, int bitlength) {
-    if (bitlength <= 0 || bitlength > 512 || bitlength % 8 != 0) {
-        return false;
-    }
-
-    delete[] (unsigned char *)_key;
-
-    _key = new unsigned char[bitlength / 8];
-    memcpy(_key, key, bitlength / 8);
-    _keylen = bitlength;
-
-    return init();
-}
-
-
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-#define shuffle(x) do { \
-    uint32_t r = x; \
-            x  = (r & 0xff000000) >> 24; \
-            x |= (r & 0x00ff0000) >>  8; \
-            x |= (r & 0x0000ff00) <<  8; \
-            x |= (r & 0x000000ff) << 24; \
-    } while (0)
-#endif
-
-int BlowFish::encrypt(void *block, int len) {
-    uint32_t *d = (uint32_t *)block;
-
-    if (!_init || len % _blksz != 0) {
-        return -1;
-    }
-
-    for (int i = 0; i < len / _blksz; i++) {
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-        shuffle(*d);
-        shuffle(*(d + 1));
-#endif
-        encipher(d, d + 1);
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-        shuffle(*d);
-        shuffle(*(d + 1));
-#endif
-        d += 2;
-    }
-
-    return len;
-}
-
-
-int BlowFish::decrypt(void *block, int len) {
-    uint32_t *d = (uint32_t *)block;
-
-    if (!_init || len % _blksz != 0) {
-        return -1;
-    }
-
-    for (int i = 0; i < len / _blksz; i++) {
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-        shuffle(*d);
-        shuffle(*(d + 1));
-#endif
-        decipher(d, d + 1);
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-        shuffle(*d);
-        shuffle(*(d + 1));
-#endif
-        d += 2;
-    }
-
-    return len;
-}
-
-
-uint32_t BlowFish::F(uint32_t x) {
-    unsigned short a, b, c, d;
-    uint32_t y;
-
-    d = x & 0x000000ff;
-    x >>= 8;
-    c = x & 0x000000ff;
-    x >>= 8;
-    b = x & 0x000000ff;
-    x >>= 8;
-    a = x & 0x000000ff;
-
-    y = _BF_S[0][a] + _BF_S[1][b];
-    y ^= _BF_S[2][c];
-    y += _BF_S[3][d];
-
-    return y;
-}
-
-
-void BlowFish::encipher(uint32_t *xl, uint32_t *xr) {
-    uint32_t Xl = *xl, Xr = *xr, temp;
-
-    for (int i = 0; i < 16; ++i) {
-        Xl ^= _BF_P[i];
-        Xr ^= F(Xl);
-        // Exchange
-        temp = Xl; Xl = Xr; Xr = temp;
-    }
-
-    // Exchange
-    temp = Xl; Xl = Xr; Xr = temp;
-
-    Xr ^= _BF_P[16];
-    Xl ^= _BF_P[17];
-
-    *xl = Xl;
-    *xr = Xr;
-}
-
-
-void BlowFish::decipher(uint32_t *xl, uint32_t *xr) {
-    uint32_t Xl = *xl, Xr = *xr, temp;
-
-    for (int i = 17; i > 1; --i) {
-        Xl ^= _BF_P[i];
-        Xr ^= F(Xl);
-        // Exchange
-        temp = Xl; Xl = Xr; Xr = temp;
-    }
-
-    // Exchange
-    temp = Xl; Xl = Xr; Xr = temp;
-
-    Xr ^= _BF_P[1];
-    Xl ^= _BF_P[0];
-
-    *xl = Xl;
-    *xr = Xr;
-}
-
-
diff --git a/kwalletd/backend/blowfish.h b/kwalletd/backend/blowfish.h
deleted file mode 100644 (file)
index 6b02135..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-   This library 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
-   Library General Public License for more details.
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef BLOWFISH_H
-#define BLOWFISH_H
-
-#include <config-kwalletbackend.h>
-
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <sys/types.h>
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h> /* For uintXX_t on Tru64 */
-#endif
-
-#include "blockcipher.h"
-#include "kwalletbackend_export.h"
-
-/* @internal
- */
-class KWALLETBACKEND_EXPORT BlowFish : public BlockCipher {
-public:
-    BlowFish();
-    virtual ~BlowFish();
-
-    virtual bool setKey(void *key, int bitlength);
-
-    virtual int keyLen() const;
-
-    virtual bool readyToGo() const;
-
-    virtual int encrypt(void *block, int len);
-
-    virtual int decrypt(void *block, int len);
-
-private:
-    uint32_t _BF_S[4][256];
-    uint32_t _BF_P[18];
-
-    void *_key;
-    int _keylen;  // in bits
-
-    bool _init;
-
-    bool init();
-    uint32_t F(uint32_t x);
-    void encipher(uint32_t *xl, uint32_t *xr);
-    void decipher(uint32_t *xl, uint32_t *xr);
-};
-
-#endif
-
diff --git a/kwalletd/backend/blowfishtables.h b/kwalletd/backend/blowfishtables.h
deleted file mode 100644 (file)
index bed18f1..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-   This library 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
-   Library General Public License for more details.
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-// This is also from _Applied_Cryptography_.  See blowfish.cc for more details.
-
-#ifndef BLOWFISHTABLES_H
-#define BLOWFISHTABLES_H
-
-const unsigned long ks0[256] = {
-    0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 
-    0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 
-    0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658, 
-    0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 
-    0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e, 
-    0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, 
-    0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6, 
-    0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, 
-    0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 
-    0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 
-    0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1, 
-    0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, 
-    0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 
-    0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 
-    0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176, 
-    0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, 
-    0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706, 
-    0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, 
-    0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 
-    0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, 
-    0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c, 
-    0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 
-    0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 
-    0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 
-    0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 
-    0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, 
-    0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8, 
-    0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 
-    0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 
-    0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, 
-    0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0, 
-    0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, 
-    0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 
-    0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 
-    0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705, 
-    0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, 
-    0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 
-    0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, 
-    0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 
-    0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 
-    0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f, 
-    0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 
-    0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a };
-
-const unsigned long ks1[256] = {
-    0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 
-    0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 
-    0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 
-    0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 
-    0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 
-    0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 
-    0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 
-    0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 
-    0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 
-    0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 
-    0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 
-    0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 
-    0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 
-    0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 
-    0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 
-    0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 
-    0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 
-    0x3c11183b, 0x5924a509, 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 
-    0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 
-    0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 
-    0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 
-    0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 
-    0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 
-    0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 
-    0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 
-    0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 
-    0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 
-    0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 
-    0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 
-    0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 
-    0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 
-    0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 
-    0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 
-    0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 
-    0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 
-    0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 
-    0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 
-    0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 
-    0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 
-    0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 
-    0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 
-    0x675fda79, 0xe3674340, 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 
-    0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7 };
-
-const unsigned long ks2[256] = {
-    0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 
-    0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 
-    0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 
-    0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, 
-    0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4, 
-    0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 
-    0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 
-    0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, 
-    0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 
-    0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 
-    0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, 0x55a867bc, 0xa1159a58, 
-    0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 
-    0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 
-    0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, 
-    0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60, 
-    0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, 
-    0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 
-    0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 
-    0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74, 
-    0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, 
-    0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 
-    0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 
-    0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979, 
-    0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, 
-    0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 
-    0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, 
-    0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 
-    0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, 
-    0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24, 
-    0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 
-    0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 
-    0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 
-    0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 
-    0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 
-    0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, 0xdcb7da83, 0x573906fe, 
-    0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, 
-    0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 
-    0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, 
-    0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188, 
-    0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 
-    0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 
-    0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 
-    0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0 };
-
-const unsigned long ks3[256] = {
-    0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 
-    0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 
-    0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79, 
-    0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, 
-    0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 
-    0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 
-    0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1, 
-    0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, 
-    0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797, 
-    0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 
-    0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 
-    0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, 
-    0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba, 
-    0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 
-    0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5, 
-    0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 
-    0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 
-    0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, 
-    0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd, 
-    0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 
-    0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 
-    0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, 
-    0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc, 
-    0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, 
-    0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc, 
-    0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 
-    0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a, 
-    0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, 
-    0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 
-    0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, 
-    0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 
-    0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, 
-    0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e, 
-    0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, 
-    0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623, 
-    0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 
-    0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a, 
-    0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 
-    0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3, 
-    0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, 
-    0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 
-    0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 
-    0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 };
-
-const unsigned long P[18] = {
-    0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 
-    0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, 
-    0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b };
-
-#endif // BLOWFISHTABLES_H
diff --git a/kwalletd/backend/cbc.cc b/kwalletd/backend/cbc.cc
deleted file mode 100644 (file)
index 84f1abd..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "cbc.h"
-#include <string.h>
-#include <kdebug.h>
-
-CipherBlockChain::CipherBlockChain(BlockCipher *cipher)
-    : _cipher(cipher)
-{
-    _next = 0L;
-    _register = 0L;
-    _len = -1;
-    _reader = _writer = 0L;
-    if (cipher) {
-        _blksz = cipher->blockSize();
-    }
-}
-
-CipherBlockChain::~CipherBlockChain()
-{
-    delete[](char *)_register;
-    _register = 0L;
-    delete[](char *)_next;
-    _next = 0L;
-}
-
-bool CipherBlockChain::setKey(void *key, int bitlength)
-{
-    if (_cipher) {
-        return _cipher->setKey(key, bitlength);
-    }
-    return false;
-}
-
-int CipherBlockChain::keyLen() const
-{
-    if (_cipher) {
-        return _cipher->keyLen();
-    }
-    return -1;
-}
-
-bool CipherBlockChain::readyToGo() const
-{
-    if (_cipher) {
-        return _cipher->readyToGo();
-    }
-    return false;
-}
-
-void CipherBlockChain::initRegister() {
-    if (_register == 0L) {
-        size_t registerLen = _cipher->blockSize();
-        _register = new unsigned char[registerLen];
-        _len = registerLen;
-    }
-    memset(_register, 0, _len);
-}
-
-int CipherBlockChain::encrypt(void *block, int len)
-{
-    int rc = -1;
-    if (_cipher && !_reader) {
-
-        _writer |= 1;
-
-        initRegister();
-
-        if ((len % _len) >0) {
-            kDebug() << "Block length given encrypt (" << len << ") is not a multiple of " << _len;
-            return -1;
-        }
-
-        char *elemBlock = static_cast<char*>(block);
-        for (int b = 0; b < len/_len; b++) {
-
-            // This might be optimizable
-            char *tb = static_cast<char*>(elemBlock);
-            for (int i = 0; i < _len; i++) {
-                *tb++ ^= ((char *)_register)[i];
-            }
-
-            rc = _cipher->encrypt(elemBlock, _len);
-
-            if (rc != -1) {
-                memcpy(_register, elemBlock, _len);
-            }
-            elemBlock += _len;
-        }
-
-        return rc;
-    }
-    return rc;
-}
-
-int CipherBlockChain::decrypt(void *block, int len)
-{
-    if (_cipher && !_writer) {
-        int rc = 0;
-
-        _reader |= 1;
-
-        initRegister();
-
-        if ((len % _len) >0) {
-            kDebug() << "Block length given for decrypt (" << len << ") is not a multiple of " << _len;
-            return -1;
-        }
-
-        char *elemBlock = static_cast<char*>(block);
-        for (int b = 0; b < len/_len; b++) {
-            if (_next == 0L) {
-                _next = new unsigned char[_len];
-            }
-            memcpy(_next, elemBlock, _len);
-
-            int bytesDecrypted = _cipher->decrypt(elemBlock, _len);
-
-            if (bytesDecrypted != -1) {
-                rc += bytesDecrypted;
-                // This might be optimizable
-                char *tb = (char *)elemBlock;
-                for (int i = 0; i < _len; i++) {
-                    *tb++ ^= ((char *)_register)[i];
-                }
-            }
-
-            void *temp;
-            temp = _next;
-            _next = _register;
-            _register = temp;
-
-            elemBlock += _len;
-        }
-
-        return rc;
-    }
-    return -1;
-}
-
diff --git a/kwalletd/backend/cbc.h b/kwalletd/backend/cbc.h
deleted file mode 100644 (file)
index 3c5ad98..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2001 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef CBC__KO__H
-#define CBC__KO__H
-
-#include "blockcipher.h"
-
-/* @internal
- *   Initialize this class with a pointer to a valid, uninitialized BlockCipher
- *   and it will apply that cipher using CBC.  You may want to make the
- *   initial block a full block of random data.  Do not change the block size
- *   at any time!!  You must pad it yourself.  Also, you can only encrypt or
- *   decrypt.  You can't do both with a given instance.  After you call one,
- *   calls to the other will fail in this instance.
- */
-
-class CipherBlockChain : public BlockCipher
-{
-public:
-    CipherBlockChain(BlockCipher *cipher);
-    virtual ~CipherBlockChain();
-
-    virtual bool setKey(void *key, int bitlength);
-
-    virtual int keyLen() const;
-
-    virtual bool readyToGo() const;
-
-    virtual int encrypt(void *block, int len);
-
-    virtual int decrypt(void *block, int len);
-
-private:
-    void initRegister();
-
-    BlockCipher *_cipher;
-    void *_register;
-    void *_next;
-    int _len;
-    int _reader, _writer;
-};
-
-#endif
diff --git a/kwalletd/backend/config-kwalletbackend.h.cmake b/kwalletd/backend/config-kwalletbackend.h.cmake
deleted file mode 100644 (file)
index 4705cd1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#cmakedefine HAVE_STDINT_H 1
-
-#cmakedefine HAVE_SYS_BITYPES_H 1
diff --git a/kwalletd/backend/kwalletbackend.cc b/kwalletd/backend/kwalletbackend.cc
deleted file mode 100644 (file)
index be6f2b5..0000000
+++ /dev/null
@@ -1,469 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2001-2004 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "kwalletbackend.h"
-
-#include <stdlib.h>
-
-#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <ksavefile.h>
-#include <kstandarddirs.h>
-#include <knotification.h>
-
-#include <QtCore/QFile>
-#include <QtCore/QFileInfo>
-#include <QtCore/QRegExp>
-#include <QCryptographicHash>
-
-#include "blowfish.h"
-#include "cbc.h"
-
-#include <assert.h>
-
-#define KWALLET_VERSION_MAJOR 0
-// has been 0 until 4.13, 1 until 4.20
-#define KWALLET_VERSION_MINOR 2
-
-using namespace KWallet;
-
-#define KWMAGIC "KWALLET\n\r\0\r\n"
-
-class Backend::BackendPrivate
-{
-};
-
-static void initKWalletDir()
-{
-    KGlobal::dirs()->addResourceType("kwallet", 0, "share/apps/kwallet");
-}
-
-Backend::Backend(const QString& name, bool isPath)
-    : d(0)
-    , _name(name)
-    , _ref(0)
-    , _cipherType(KWallet::BACKEND_CIPHER_UNKNOWN)
-{
-    initKWalletDir();
-    if (isPath) {
-        _path = name;
-    } else {
-        _path = KGlobal::dirs()->saveLocation("kwallet") + _name + ".kwl";
-    }
-
-    _open = false;
-}
-
-
-Backend::~Backend() {
-    if (_open) {
-        close();
-    }
-    delete d;
-}
-
-void Backend::setCipherType(BackendCipherType ct)
-{
-    // changing cipher type on already initialed wallets is not permitted
-    assert(_cipherType == KWallet::BACKEND_CIPHER_UNKNOWN);
-    _cipherType = ct;
-}
-
-int Backend::deref() {
-    if (--_ref < 0) {
-        kDebug() << "refCount negative!";
-        _ref = 0;
-    }
-    return _ref;
-}
-
-bool Backend::exists(const QString& wallet) {
-    initKWalletDir();
-    QString path = KGlobal::dirs()->saveLocation("kwallet") + '/' + wallet + ".kwl";
-    // Note: 60 bytes is presently the minimum size of a wallet file.
-    //       Anything smaller is junk.
-    return QFile::exists(path) && QFileInfo(path).size() >= 60;
-}
-
-
-QString Backend::openRCToString(int rc) {
-    switch (rc) {
-        case -255:
-            return i18n("Already open.");
-        case -2:
-            return i18n("Error opening file.");
-        case -3:
-            return i18n("Not a wallet file.");
-        case -4:
-            return i18n("Unsupported file format revision.");
-        case -42:
-            return i18n("Unknown encryption scheme.");
-        case -43:
-            return i18n("Corrupt file?");
-        case -8:
-            return i18n("Error validating wallet integrity. Possibly corrupted.");
-        case -5:
-        case -7:
-        case -9:
-            return i18n("Read error - possibly incorrect password.");
-        case -6:
-            return i18n("Decryption error.");
-        default:
-            return QString();
-    }
-}
-
-
-int Backend::open(const QByteArray& password, WId w) {
-    if (_open) {
-        return -255;  // already open
-    }
-    
-    setPassword(password);
-    return openInternal(w);
-}
-
-int Backend::openPreHashed(const QByteArray &passwordHash)
-{
-    if (_open) {
-        return -255;  // already open
-    }
-   
-    // check the password hash for correct size (currently fixed)
-    if (passwordHash.size() != KWALLET_SHA512_KEYSIZE) {
-        return -42; // unsupported encryption scheme
-    }
-   
-    _passhash = passwordHash;
-
-    return openInternal();
-}
-int Backend::openInternal(WId w)
-{
-    // No wallet existed.  Let's create it.
-    // Note: 60 bytes is presently the minimum size of a wallet file.
-    //       Anything smaller is junk and should be deleted.
-    if (!QFile::exists(_path) || QFileInfo(_path).size() < 60) {
-        QFile newfile(_path);
-        if (!newfile.open(QIODevice::ReadWrite)) {
-            return -2;   // error opening file
-        }
-        newfile.close();
-        _open = true;
-        if (sync(w) != 0) {
-            return -2;
-        }
-    }
-
-    QFile db(_path);
-
-    if (!db.open(QIODevice::ReadOnly)) {
-        return -2;         // error opening file
-    }
-
-    char magicBuf[KWMAGIC_LEN];
-    db.read(magicBuf, KWMAGIC_LEN);
-    if (memcmp(magicBuf, KWMAGIC, KWMAGIC_LEN) != 0) {
-        return -3; // bad magic
-    }
-
-    db.read(magicBuf, 4);
-
-    // First byte is major version, second byte is minor version
-    if (magicBuf[0] != KWALLET_VERSION_MAJOR) {
-        return -4; // unknown version
-    }
-
-    if (magicBuf[1] == KWALLET_VERSION_MINOR) {
-        kDebug() << "Wallet new enough, using new hash";
-    } else if (magicBuf[1] != 0){
-        kDebug() << "Wallet is old, sad panda :(";
-        return -4; // unknown version
-    }
-
-    BackendPersistHandler *phandler = BackendPersistHandler::getPersistHandler(magicBuf);
-    if (0 == phandler){
-        return 42; // unknown cipher or hash
-    }
-    return phandler->read(this, db, w);
-}
-
-int Backend::sync(WId w) {
-    if (!_open) {
-        return -255;  // not open yet
-    }
-
-    KSaveFile sf(_path);
-
-    if (!sf.open(QIODevice::WriteOnly | QIODevice::Unbuffered)) {
-        return -1; // error opening file
-    }
-    sf.setPermissions(QFile::ReadUser|QFile::WriteUser);
-
-    if (sf.write(KWMAGIC, KWMAGIC_LEN) != KWMAGIC_LEN) {
-        sf.abort();
-        return -4; // write error
-    }
-
-    // Write the version number
-    QByteArray version(4, 0);
-    version[0] = KWALLET_VERSION_MAJOR;
-    version[1] = KWALLET_VERSION_MINOR;
-
-    BackendPersistHandler *phandler = BackendPersistHandler::getPersistHandler(_cipherType);
-    if (0 == phandler) {
-        return -4; // write error
-    }
-    int rc = phandler->write(this, sf, version, w);
-    if (rc<0) {
-        // Oops! wallet file sync filed! Display a notification about that
-        // TODO: change kwalletd status flags, when status flags will be implemented
-        KNotification *notification = new KNotification( "syncFailed" );
-        notification->setText( i18n("Failed to sync wallet <b>%1</b> to disk. Error codes are:\nRC <b>%2</b>\nSF <b>%3</b>. Please file a BUG report using this information to bugs.kde.org").arg(_name).arg(rc).arg(sf.errorString()) );
-        notification->sendEvent();
-    }
-    return rc;
-}
-
-
-int Backend::close(bool save) {
-    // save if requested
-    if (save) {
-        int rc = sync(0);
-        if (rc != 0) {
-            return rc;
-        }
-    }
-
-    // do the actual close
-    for (FolderMap::ConstIterator i = _entries.constBegin(); i != _entries.constEnd(); ++i) {
-        for (EntryMap::ConstIterator j = i.value().constBegin(); j != i.value().constEnd(); ++j) {
-            delete j.value();
-        }
-    }
-    _entries.clear();
-
-    // empty the password hash
-    _passhash.fill(0);
-
-    _open = false;
-
-    return 0;
-}
-
-const QString& Backend::walletName() const {
-    return _name;
-}
-
-
-bool Backend::isOpen() const {
-    return _open;
-}
-
-
-QStringList Backend::folderList() const {
-    return _entries.keys();
-}
-
-
-QStringList Backend::entryList() const {
-    return _entries[_folder].keys();
-}
-
-
-Entry *Backend::readEntry(const QString& key) {
-    Entry *rc = 0L;
-
-    if (_open && hasEntry(key)) {
-        rc = _entries[_folder][key];
-    }
-
-    return rc;
-}
-
-
-QList<Entry*> Backend::readEntryList(const QString& key) {
-    QList<Entry*> rc;
-
-    if (!_open) {
-        return rc;
-    }
-
-    QRegExp re(key, Qt::CaseSensitive, QRegExp::Wildcard);
-
-    const EntryMap& map = _entries[_folder];
-    for (EntryMap::ConstIterator i = map.begin(); i != map.end(); ++i) {
-        if (re.exactMatch(i.key())) {
-            rc.append(i.value());
-        }
-    }
-    return rc;
-}
-
-
-bool Backend::createFolder(const QString& f) {
-    if (_entries.contains(f)) {
-        return false;
-    }
-
-    _entries.insert(f, EntryMap());
-
-    QCryptographicHash folderMd5(QCryptographicHash::Md5);
-    folderMd5.addData(f.toUtf8());
-    _hashes.insert(MD5Digest(folderMd5.result()), QList<MD5Digest>());
-
-    return true;
-}
-
-
-int Backend::renameEntry(const QString& oldName, const QString& newName) {
-    EntryMap& emap = _entries[_folder];
-    EntryMap::Iterator oi = emap.find(oldName);
-    EntryMap::Iterator ni = emap.find(newName);
-
-    if (oi != emap.end() && ni == emap.end()) {
-        Entry *e = oi.value();
-        emap.erase(oi);
-        emap[newName] = e;
-
-        QCryptographicHash folderMd5(QCryptographicHash::Md5);
-        folderMd5.addData(_folder.toUtf8());
-
-        HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.result()));
-        if (i != _hashes.end()) {
-            QCryptographicHash oldMd5(QCryptographicHash::Md5), newMd5(QCryptographicHash::Md5);
-            oldMd5.addData(oldName.toUtf8());
-            newMd5.addData(newName.toUtf8());
-            i.value().removeAll(MD5Digest(oldMd5.result()));
-            i.value().append(MD5Digest(newMd5.result()));
-        }
-        return 0;
-    }
-
-    return -1;
-}
-
-
-void Backend::writeEntry(Entry *e) {
-    if (!_open) {
-        return;
-    }
-
-    if (!hasEntry(e->key())) {
-        _entries[_folder][e->key()] = new Entry;
-    }
-    _entries[_folder][e->key()]->copy(e);
-
-    QCryptographicHash folderMd5(QCryptographicHash::Md5);
-    folderMd5.addData(_folder.toUtf8());
-
-    HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.result()));
-    if (i != _hashes.end()) {
-        QCryptographicHash md5(QCryptographicHash::Md5);
-        md5.addData(e->key().toUtf8());
-        i.value().append(MD5Digest(md5.result()));
-    }
-}
-
-
-bool Backend::hasEntry(const QString& key) const {
-    return _entries.contains(_folder) && _entries[_folder].contains(key);
-}
-
-
-bool Backend::removeEntry(const QString& key) {
-    if (!_open) {
-        return false;
-    }
-
-    FolderMap::Iterator fi = _entries.find(_folder);
-    EntryMap::Iterator ei = fi.value().find(key);
-
-    if (fi != _entries.end() && ei != fi.value().end()) {
-        delete ei.value();
-        fi.value().erase(ei);
-        QCryptographicHash folderMd5(QCryptographicHash::Md5);
-        folderMd5.addData(_folder.toUtf8());
-
-        HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.result()));
-        if (i != _hashes.end()) {
-            QCryptographicHash md5(QCryptographicHash::Md5);
-            md5.addData(key.toUtf8());
-            i.value().removeAll(MD5Digest(md5.result()));
-        }
-        return true;
-    }
-
-    return false;
-}
-
-
-bool Backend::removeFolder(const QString& f) {
-    if (!_open) {
-        return false;
-    }
-
-    FolderMap::Iterator fi = _entries.find(f);
-
-    if (fi != _entries.end()) {
-        if (_folder == f) {
-            _folder.clear();
-        }
-
-        for (EntryMap::Iterator ei = fi.value().begin(); ei != fi.value().end(); ++ei) {
-            delete ei.value();
-        }
-
-        _entries.erase(fi);
-
-        QCryptographicHash folderMd5(QCryptographicHash::Md5);
-        folderMd5.addData(f.toUtf8());
-        _hashes.remove(MD5Digest(folderMd5.result()));
-        return true;
-    }
-
-    return false;
-}
-
-
-bool Backend::folderDoesNotExist(const QString& folder) const {
-    QCryptographicHash md5(QCryptographicHash::Md5);
-    md5.addData(folder.toUtf8());
-    return !_hashes.contains(MD5Digest(md5.result()));
-}
-
-
-bool Backend::entryDoesNotExist(const QString& folder, const QString& entry) const {
-    QCryptographicHash md5(QCryptographicHash::Md5);
-    md5.addData(folder.toUtf8());
-    HashMap::const_iterator i = _hashes.find(MD5Digest(md5.result()));
-    if (i != _hashes.end()) {
-        md5.reset();
-        md5.addData(entry.toUtf8());
-        return !i.value().contains(MD5Digest(md5.result()));
-    }
-    return true;
-}
-
-void Backend::setPassword(const QByteArray &password) {
-    _passhash = QCryptographicHash::hash(password, QCryptographicHash::Sha512);
-}
diff --git a/kwalletd/backend/kwalletbackend.h b/kwalletd/backend/kwalletbackend.h
deleted file mode 100644 (file)
index 9b16aaf..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2001-2004 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef KWALLETBACKEND_H
-#define KWALLETBACKEND_H
-
-#include <QtCore/QString>
-#include <QtCore/QStringList>
-#include <QtCore/QMap>
-#include <kdemacros.h>
-
-#include "kwalletentry.h"
-#include "backendpersisthandler.h"
-
-#define KWALLET_SHA512_KEYSIZE 128
-
-namespace KWallet {
-
-/**
- * @internal
- */
-class MD5Digest : public QByteArray {
-    public:
-        MD5Digest() : QByteArray(16, 0) {}
-        MD5Digest(const char *data) : QByteArray(data, 16) {}
-        MD5Digest(const QByteArray& digest) : QByteArray(digest) {}
-        virtual ~MD5Digest() {}
-
-        int operator<(const MD5Digest& r) const {
-            int i = 0;
-            char x, y;
-            for (; i < 16; ++i) {
-                x = at(i);
-                y = r.at(i);
-                if (x != y) {
-                    break;
-                }
-            }
-            if (i < 16 && x < y) {
-                return 1;
-            }
-            return 0;
-        }
-};
-
-
-/* @internal
- */
-class KDE_EXPORT Backend {
-public:
-    explicit Backend(const QString& name = QLatin1String("kdewallet"), bool isPath = false);
-    ~Backend();
-
-    // Open and unlock the wallet.
-    // If opening succeeds, the password's hash will be remembered.
-    // If opening fails, the password's hash will be cleared.
-    int open(const QByteArray& password, WId w=0);
-
-    // Open and unlock the wallet using a pre-hashed password.
-    // If opening succeeds, the password's hash will be remembered.
-    // If opening fails, the password's hash will be cleared.
-    int openPreHashed(const QByteArray &passwordHash);
-
-    // Close the wallet, losing any changes.
-    // if save is true, the wallet is saved prior to closing it.
-    int close(bool save = false);
-
-    // Write the wallet to disk
-    int sync(WId w);
-
-    // Returns true if the current wallet is open.
-    bool isOpen() const;
-
-    // Returns the current wallet name.
-    const QString& walletName() const;
-
-    // The list of folders.
-    QStringList folderList() const;
-
-    // Force creation of a folder.
-    bool createFolder(const QString& f);
-
-    // Change the folder.
-    void setFolder(const QString& f) { _folder = f; }
-
-    // Current folder.  If empty, it's the global folder.
-    const QString& folder() const { return _folder; }
-
-    // Does it have this folder?
-    bool hasFolder(const QString& f) const { return _entries.contains(f); }
-
-    // Look up an entry.  Returns null if it doesn't exist.
-    Entry *readEntry(const QString& key);
-    
-    // Look up a list of entries.  Supports wildcards.
-    // You delete the list
-    QList<Entry*> readEntryList(const QString& key);
-
-    // Store an entry.
-    void writeEntry(Entry *e);
-
-    // Does this folder contain this entry?
-    bool hasEntry(const QString& key) const;
-
-    // Returns true if the entry was removed
-    bool removeEntry(const QString& key);
-
-    // Returns true if the folder was removed
-    bool removeFolder(const QString& f);
-
-    // The list of entries in this folder.
-    QStringList entryList() const;
-
-    // Rename an entry in this folder.
-    int renameEntry(const QString& oldName, const QString& newName);
-    
-    // Set the password used for opening/closing the wallet.
-    // This does not sync the wallet to disk!
-    void setPassword(const QByteArray &password);
-
-    int ref() { return ++_ref; }
-
-    int deref();
-
-    int refCount() const { return _ref; }
-
-    static bool exists(const QString& wallet);
-
-    bool folderDoesNotExist(const QString& folder) const;
-
-    bool entryDoesNotExist(const QString& folder, const QString& entry) const;
-
-    static QString openRCToString(int rc);
-
-    void setCipherType(BackendCipherType ct);
-    BackendCipherType cipherType() const { return _cipherType; }
-
-private:
-    Q_DISABLE_COPY( Backend )
-    class BackendPrivate;
-    BackendPrivate *const d;
-    QString _name;
-    QString _path;
-    bool _open;
-    QString _folder;
-    int _ref;
-    // Map Folder->Entries
-    typedef QMap< QString, Entry* > EntryMap;
-    typedef QMap< QString, EntryMap > FolderMap;
-    FolderMap _entries;
-    typedef QMap<MD5Digest, QList<MD5Digest> > HashMap;
-    HashMap _hashes;
-    QByteArray _passhash;   // password hash used for saving the wallet
-    BackendCipherType _cipherType; // the kind of encryption used for this wallet
-
-    friend class BlowfishPersistHandler;
-    
-    // open the wallet with the password already set. This is
-    // called internally by both open and openPreHashed.
-    int openInternal(WId w=0);
-
-};
-
-}
-
-#endif
-
diff --git a/kwalletd/backend/kwalletentry.cc b/kwalletd/backend/kwalletentry.cc
deleted file mode 100644 (file)
index 3419fa6..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2001-2003 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */ 
-
-#include "kwalletentry.h"
-
-
-using namespace KWallet;
-
-
-Entry::Entry() {
-}
-
-Entry::~Entry() {
-    _value.fill(0);
-}
-
-const QString& Entry::key() const {
-    return _key;
-}
-
-
-const QByteArray& Entry::value() const {
-    return _value;
-}
-
-
-QString Entry::password() const {
-    QString x;
-    QDataStream qds(_value);
-    qds >> x;
-    return x;
-}
-
-
-void Entry::setValue(const QByteArray& val) {
-    // do a direct copy from one into the other without
-    // temporary variables
-    _value.fill(0);
-    _value = val;
-}
-
-
-void Entry::setValue(const QString& val) {
-    _value.fill(0);
-    QDataStream qds(&_value, QIODevice::WriteOnly);
-    qds << val;
-}
-
-
-void Entry::setKey(const QString& key) {
-    _key = key;
-}
-
-
-Wallet::EntryType Entry::type() const {
-    return _type;
-}
-
-
-void Entry::setType(Wallet::EntryType type) {
-    _type = type;
-}
-
-
-void Entry::copy(const Entry* x) {
-    _type = x->_type;
-    _key = x->_key;
-    _value.fill(0);
-    _value = x->_value;
-}
diff --git a/kwalletd/backend/kwalletentry.h b/kwalletd/backend/kwalletentry.h
deleted file mode 100644 (file)
index 751c2e6..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2001-2003 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef KWALLETENTRY_H
-#define KWALLETENTRY_H
-
-#include <QtCore/QString>
-#include <QtCore/QDataStream>
-
-#include "kwalletbackend_export.h"
-#include "kwallet.h"
-
-namespace KWallet {
-
-/* @internal
- */
-class KWALLETBACKEND_EXPORT Entry {
-public:
-    Entry();
-    ~Entry();
-
-    const QString& key() const;
-    const QByteArray& value() const;
-    QString password() const;
-
-    void setValue(const QByteArray& val);
-    void setValue(const QString& val);
-    void setKey(const QString& key);
-
-    Wallet::EntryType type() const;
-    void setType(Wallet::EntryType type);
-
-    void copy(const Entry* x);
-
-private:
-    QString _key;
-    QByteArray _value;
-    Wallet::EntryType _type;
-};
-
-}
-
-#endif
-
diff --git a/kwalletd/backend/tests/CMakeLists.txt b/kwalletd/backend/tests/CMakeLists.txt
deleted file mode 100644 (file)
index 7016618..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-include_directories(
-   ${CMAKE_CURRENT_SOURCE_DIR}/..
-   ${CMAKE_CURRENT_BINARY_DIR}/..
-)
-
-
-########### next target ###############
-
-set(backendtest_SRCS backendtest.cpp )
-
-
-kde4_add_manual_test(backendtest ${backendtest_SRCS})
-
-target_link_libraries(backendtest  ${KDE4_KDEUI_LIBS} kwalletbackend )
-
-
-########### next target ###############
-
-set(testbf_SRCS testbf.cpp )
-
-
-kde4_add_manual_test(testbf ${testbf_SRCS})
-
-target_link_libraries(testbf  ${KDE4_KDECORE_LIBS} kwalletbackend )
-
diff --git a/kwalletd/backend/tests/backendtest.cpp b/kwalletd/backend/tests/backendtest.cpp
deleted file mode 100644 (file)
index c98e3b9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kapplication.h>
-#include <klocale.h>
-#include <QtCore/QString>
-
-#include "kwalletbackend.h"
-
-int main(int argc, char **argv) {
-    KAboutData aboutData("backendtest", 0, ki18n("backendtest"), "version");
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication a;
-
-    KWallet::Backend be("ktestwallet");
-    printf("KWalletBackend constructed\n");
-
-    QByteArray apass("apassword", 9);
-    QByteArray bpass("bpassword", 9);
-    QByteArray cpass("cpassword", 9);
-
-    printf("Passwords initialised.\n");
-    be.setPassword(apass);
-    int rc = be.close(true);
-
-    printf("be.close(true) returned %d  (should be -255)\n", rc);
-
-    rc = be.open(bpass);
-
-    printf("be.open(bpass) returned %d  (should be 0 or 1)\n", rc);
-
-    rc = be.close(true);
-
-    printf("be.close(true) returned %d  (should be 0)\n", rc);
-
-    rc = be.open(apass);
-
-    printf("be.open(apass) returned %d  (should be negative)\n", rc);
-
-    rc = be.open(bpass);
-
-    printf("be.open(bpass) returned %d  (should be 0)\n", rc);
-
-    return 0;
-}
-
-
diff --git a/kwalletd/backend/tests/testbf.cpp b/kwalletd/backend/tests/testbf.cpp
deleted file mode 100644 (file)
index 3a15f0b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "blowfish.h"
-#include "cbc.h"
-
-int main()
-{
-    BlockCipher *bf;
-    char data[] = "This is a test.";
-    char expect[] = "\x3f\x3c\x2d\xae\x8c\x7\x84\xf2\xa7\x6d\x28\xbd\xd\xb\xb8\x79";
-    char key[] = "testkey";
-    unsigned long et[] = {0x11223344};
-
-    printf("%d:  0x11 == %d and 0x44 == %d\n", ((unsigned char *)et)[0],
-           0x11, 0x44);
-    bf = new BlowFish();
-    // bf = new CipherBlockChain(new BlowFish());
-
-    bf->setKey((void *)key, 7 * 8);
-
-    if (!bf->readyToGo()) {
-        printf("Error: not ready to go!\n");
-        return -1;
-    }
-
-    printf("About to encrypt...\n"); fflush(stdout);
-    if (-1 == bf->encrypt((void *)data, 16)) {
-        printf("Error: encrypt failed!\n");
-        return -1;
-    }
-
-    printf("Encryption done.  data[] is now: ");
-    for (int i = 0; i < 16; i++) {
-        printf("0x%x ", data[i] & 0xff);
-        if ((data[i] & 0xff) != (expect[i] & 0xff)) {
-            printf("Error.  This byte failed the comparison.  It should have been 0x%x.\n", expect[i] & 0xff);
-            return -1;
-        }
-    }
-    printf("\n");
-
-    delete bf;
-    bf = new BlowFish();
-//  bf = new CipherBlockChain(new BlowFish());
-    bf->setKey((void *)key, 7 * 8);
-
-    printf("About to decrypt...\n"); fflush(stdout);
-    if (-1 == bf->decrypt((void *)data, 16)) {
-        printf("Error: decrypt failed!\n");
-        return -1;
-    }
-    //bf->decrypt((void *)(data+8), 8);
-
-    printf("All done!  Result...  data[] = \"%s\"\n", data);
-    if (strcmp(data, "This is a test.")) {
-        printf("ERROR. Decryption failed.\n");
-        return -1;
-    }
-
-    delete bf;
-}
-
diff --git a/kwalletd/kbetterthankdialog.cpp b/kwalletd/kbetterthankdialog.cpp
deleted file mode 100644 (file)
index bb7d96e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* This file is part of the KDE libraries
-   Copyright (C) 2004 George Staikos <staikos@kde.org>
-
-   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; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#include "kbetterthankdialog.h"
-#include <kicon.h>
-
-KBetterThanKDialog::KBetterThanKDialog( QWidget *parent )
-    : QDialog( parent )
-{
-    setupUi( this );
-    connect(_allowOnce, SIGNAL(clicked()), this, SLOT(allowOnceClicked()));
-    connect(_allowAlways, SIGNAL(clicked()), this, SLOT(allowAlwaysClicked()));
-    connect(_deny, SIGNAL(clicked()), this, SLOT(denyClicked()));
-    connect(_denyForever, SIGNAL(clicked()), this, SLOT(denyForeverClicked()));
-
-    init();
-}
-
-void KBetterThanKDialog::init()
-{
-    _allowOnce->setIcon(KIcon("dialog-ok"));
-    _allowAlways->setIcon(KIcon("dialog-ok"));
-    _deny->setIcon(KIcon("dialog-cancel"));
-    _denyForever->setIcon(KIcon("dialog-cancel"));
-
-    _allowOnce->setFocus();
-}
-
-void KBetterThanKDialog::setLabel( const QString & label )
-{
-    _label->setText(label);
-}
-
-void KBetterThanKDialog::accept()
-{
-    setResult(0);
-}
-
-void KBetterThanKDialog::reject()
-{
-    QDialog::reject();
-    setResult(2);
-}
-
-void KBetterThanKDialog::allowOnceClicked()
-{
-    done(0);
-}
-
-void KBetterThanKDialog::allowAlwaysClicked()
-{
-    done(1);
-}
-
-void KBetterThanKDialog::denyClicked()
-{
-    done(2);
-}
-
-void KBetterThanKDialog::denyForeverClicked()
-{
-    done(3);
-}
-
-#include "moc_kbetterthankdialog.cpp"
diff --git a/kwalletd/kbetterthankdialog.h b/kwalletd/kbetterthankdialog.h
deleted file mode 100644 (file)
index f11e3b1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* This file is part of the KDE libraries
-   Copyright (C) 2004 George Staikos <staikos@kde.org>
-
-   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; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef KBETTERTHANKDIALOG_H
-#define KBETTERTHANKDIALOG_H
-
-#include <QDialog>
-
-#include "ui_kbetterthankdialogbase.h"
-
-class KBetterThanKDialog : public QDialog, private Ui_KBetterThanKDialogBase
-{
-    Q_OBJECT
-
-public:
-    KBetterThanKDialog( QWidget *parent = 0 );
-
-    void init();
-    void setLabel( const QString &label );
-
-protected Q_SLOTS:
-    virtual void accept();
-    virtual void reject();
-  
-private Q_SLOTS:
-    void allowOnceClicked();
-    void allowAlwaysClicked();
-    void denyClicked();
-    void denyForeverClicked();
-};
-
-#endif
diff --git a/kwalletd/kbetterthankdialogbase.ui b/kwalletd/kbetterthankdialogbase.ui
deleted file mode 100644 (file)
index 66c40b3..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>KBetterThanKDialogBase</class>
- <widget class="QDialog" name="KBetterThanKDialogBase">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>479</width>
-    <height>109</height>
-   </rect>
-  </property>
-  <layout class="QGridLayout">
-   <property name="margin">
-    <number>11</number>
-   </property>
-   <property name="spacing">
-    <number>6</number>
-   </property>
-   <item row="0" column="0" colspan="3">
-    <widget class="QLabel" name="_label"/>
-   </item>
-   <item row="1" column="2">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>41</width>
-       <height>21</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="1">
-    <layout class="QHBoxLayout">
-     <property name="spacing">
-      <number>6</number>
-     </property>
-     <property name="margin">
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="KPushButton" name="_allowOnce">
-       <property name="text">
-        <string>Allow &amp;Once</string>
-       </property>
-       <property name="default">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="KPushButton" name="_allowAlways">
-       <property name="text">
-        <string>Allow &amp;Always</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="KPushButton" name="_deny">
-       <property name="text">
-        <string>&amp;Deny</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="KPushButton" name="_denyForever">
-       <property name="text">
-        <string>Deny &amp;Forever</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="1" column="0">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>61</width>
-       <height>21</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KPushButton</class>
-   <extends>QPushButton</extends>
-   <header>kpushbutton.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/kwalletd/ktimeout.cpp b/kwalletd/ktimeout.cpp
deleted file mode 100644 (file)
index b87d587..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2003 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#include "ktimeout.h"
-#include <QtCore/QEvent>
-
-KTimeout::KTimeout(QObject *parent)
-    : QObject(parent) {
-}
-
-KTimeout::~KTimeout() {
-}
-
-void KTimeout::clear() {
-    foreach (int timerId, _timers) {
-        killTimer(timerId);
-    }
-    _timers.clear();
-}
-
-void KTimeout::removeTimer(int id) {
-    const int timerId = _timers.value(id, 0);
-    if (timerId != 0) {
-        killTimer(timerId);
-    }
-    _timers.remove(id);
-}
-
-void KTimeout::addTimer(int id, int timeout) {
-    if (_timers.contains(id)) {
-        return;
-    }
-    _timers.insert(id, startTimer(timeout));
-}
-
-void KTimeout::resetTimer(int id, int timeout) {
-    int timerId = _timers.value(id, 0);
-    if (timerId != 0) {
-        killTimer(timerId);
-        _timers.insert(id, startTimer(timeout));
-    }
-}
-
-void KTimeout::timerEvent(QTimerEvent* ev) {
-    QHash<int, int>::const_iterator it = _timers.constBegin();
-    for ( ; it != _timers.constEnd(); ++it) {
-        if (it.value() == ev->timerId()) {
-            emit timedOut(it.key());
-            return;
-        }
-    }
-}
-
-#include "moc_ktimeout.cpp"
-
diff --git a/kwalletd/ktimeout.h b/kwalletd/ktimeout.h
deleted file mode 100644 (file)
index fbb93c8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2003 George Staikos <staikos@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-#ifndef _KTIMEOUT_H_
-#define _KTIMEOUT_H_
-
-#include <QtCore/QHash>
-#include <QtCore/QObject>
-
-// @internal
-class KTimeout : public QObject {
-    Q_OBJECT
-public:
-    KTimeout(QObject *parent = 0);
-    ~KTimeout();
-
-Q_SIGNALS:
-    void timedOut(int id);
-
-public Q_SLOTS:
-    void resetTimer(int id, int timeout);
-    void addTimer(int id, int timeout);
-    void removeTimer(int id);
-    void clear();
-
-protected:
-    void timerEvent(QTimerEvent*);
-
-private:
-    QHash<int /*id*/,int /*timerId*/> _timers;
-};
-
-#endif
diff --git a/kwalletd/kwalletd.cpp b/kwalletd/kwalletd.cpp
deleted file mode 100644 (file)
index c889add..0000000
+++ /dev/null
@@ -1,1606 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2002-2004 George Staikos <staikos@kde.org>
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#include "kwalletd.h"
-
-#include "kbetterthankdialog.h"
-#include "kwalletwizard.h"
-
-#include <kuniqueapplication.h>
-#include <ktoolinvocation.h>
-#include <kconfig.h>
-#include <kconfiggroup.h>
-#include <kdebug.h>
-#include <kdirwatch.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kpassworddialog.h>
-#include <knewpassworddialog.h>
-#include <kstandarddirs.h>
-#include <kwalletentry.h>
-#include <kicon.h>
-#include <kwindowsystem.h>
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-#include <KNotification>
-
-#include <QtCore/QDir>
-#include <QTextDocument> // Qt::escape
-#include <QtCore/QRegExp>
-#include <QtCore/QTimer>
-#include <QtCore/QEventLoop>
-
-#include <assert.h>
-
-#include "kwalletadaptor.h"
-
-class KWalletTransaction {
-
-public:
-    explicit KWalletTransaction(QDBusConnection conn)
-        : tType(Unknown), cancelled(false), res(-1), connection(conn)
-    {
-        // make sure the id is never < 0 as that's used for the
-        // error conditions.
-        if (nextTransactionId < 0) {
-            nextTransactionId = 0;
-        }
-        nextTransactionId++;
-        tId = nextTransactionId;
-    }
-
-    ~KWalletTransaction() {
-    }
-
-    enum Type {
-        Unknown,
-        Open,
-        ChangePassword,
-        OpenFail,
-        CloseCancelled
-    };
-
-    Type tType;
-    QString appid;
-    qlonglong wId;
-    QString wallet;
-    QString service;
-    bool cancelled; // set true if the client dies before open
-    bool modal;
-    bool isPath;
-    int tId; // transaction id
-    int res;
-    QDBusMessage message;
-    QDBusConnection connection;
-
-private:
-    static int nextTransactionId;
-};
-
-int KWalletTransaction::nextTransactionId = 0;
-
-KWalletD::KWalletD()
-    : QObject(0), _failed(0), _syncTime(5000), _curtrans(0) {
-
-    _showingFailureNotify = false;
-    _closeIdle = false;
-    _idleTime = 0;
-    connect(&_closeTimers, SIGNAL(timedOut(int)), this, SLOT(timedOutClose(int)));
-    connect(&_syncTimers, SIGNAL(timedOut(int)), this, SLOT(timedOutSync(int)));
-
-    (void)new KWalletAdaptor(this);
-    // register services
-    QDBusConnection::sessionBus().registerService(QLatin1String("org.kde.kwalletd"));
-    QDBusConnection::sessionBus().registerObject(QLatin1String("/modules/kwalletd"), this);
-
-#ifdef Q_WS_X11
-    screensaver = 0;
-#endif
-
-    reconfigure();
-    KGlobal::dirs()->addResourceType("kwallet", 0, "share/apps/kwallet");
-    _dw = new KDirWatch(this );
-    _dw->setObjectName( QLatin1String( "KWallet Directory Watcher" ) );
-    _dw->addDir(KGlobal::dirs()->saveLocation("kwallet"));
-    connect(_dw, SIGNAL(dirty(const QString&)), this, SLOT(emitWalletListDirty()));
-
-    _serviceWatcher.setWatchMode( QDBusServiceWatcher::WatchForOwnerChange );
-    connect(&_serviceWatcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)), this, SLOT(slotServiceOwnerChanged(QString,QString,QString)));
-}
-
-
-KWalletD::~KWalletD() {
-#ifdef Q_WS_X11
-    delete screensaver;
-    screensaver = 0;
-#endif
-    closeAllWallets();
-    qDeleteAll(_transactions);
-}
-
-void KWalletD::connectToScreenSaver()
-{
-#ifdef Q_WS_X11
-    screensaver = new QDBusInterface("org.freedesktop.ScreenSaver", "/ScreenSaver", "org.freedesktop.ScreenSaver");
-    if (!screensaver->isValid()) {
-        kDebug() << "Service org.freedesktop.ScreenSaver not found. Retrying in 10 seconds...";
-        // keep attempting every 10 seconds
-        QTimer::singleShot(10000, this, SLOT(connectToScreenSaver()));
-    } else {
-        connect(screensaver, SIGNAL(ActiveChanged(bool)), SLOT(screenSaverChanged(bool)));
-        kDebug() << "connected to screen saver service.";
-    }
-#endif
-}
-
-int KWalletD::generateHandle() {
-    int rc;
-
-    // ASSUMPTION: RAND_MAX is fairly large.
-    do {
-        rc = qrand();
-    } while (_wallets.contains(rc) || rc == 0);
-
-    return rc;
-}
-
-QPair<int, KWallet::Backend*> KWalletD::findWallet(const QString& walletName) const
-{
-    Wallets::const_iterator it = _wallets.constBegin();
-    const Wallets::const_iterator end = _wallets.constEnd();
-    for (; it != end; ++it) {
-        if (it.value()->walletName() == walletName) {
-            return qMakePair(it.key(), it.value());
-        }
-    }
-    return qMakePair(-1, static_cast<KWallet::Backend*>(0));
-}
-
-bool KWalletD::_processing = false;
-
-void KWalletD::processTransactions() {
-    if (_processing) {
-        return;
-    }
-
-    _processing = true;
-
-    // Process remaining transactions
-    while (!_transactions.isEmpty()) {
-        _curtrans = _transactions.takeFirst();
-        int res;
-
-        assert(_curtrans->tType != KWalletTransaction::Unknown);
-
-        switch (_curtrans->tType) {
-            case KWalletTransaction::Open: {
-                res = doTransactionOpen(_curtrans->appid, _curtrans->wallet, _curtrans->isPath,
-                                        _curtrans->wId, _curtrans->modal, _curtrans->service);
-
-                // multiple requests from the same client
-                // should not produce multiple password
-                // dialogs on a failure
-                if (res < 0) {
-                    QList<KWalletTransaction *>::iterator it;
-                    for (it = _transactions.begin(); it != _transactions.end(); ++it) {
-                        KWalletTransaction *x = *it;
-                        if (_curtrans->appid == x->appid && x->tType == KWalletTransaction::Open
-                            && x->wallet == _curtrans->wallet && x->wId == _curtrans->wId) {
-                            x->tType = KWalletTransaction::OpenFail;
-                        }
-                    }
-                } else if (_curtrans->cancelled) {
-                    // the wallet opened successfully but the application
-                    // opening exited/crashed while the dialog was still shown.
-                    KWalletTransaction *_xact = new KWalletTransaction(_curtrans->connection);
-                    _xact->tType = KWalletTransaction::CloseCancelled;
-                    _xact->appid = _curtrans->appid;
-                    _xact->wallet = _curtrans->wallet;
-                    _xact->service = _curtrans->service;
-                    _transactions.append(_xact);
-                }
-
-                // emit the AsyncOpened signal as a reply
-                _curtrans->res = res;
-                emit walletAsyncOpened(_curtrans->tId, res);
-                break;
-            }
-
-            case KWalletTransaction::OpenFail: {
-                // emit the AsyncOpened signal with an invalid handle
-                _curtrans->res = -1;
-                emit walletAsyncOpened(_curtrans->tId, -1);
-                break;
-            }
-
-            case KWalletTransaction::ChangePassword: {
-                doTransactionChangePassword(_curtrans->appid, _curtrans->wallet, _curtrans->wId);
-                break;
-            }
-
-            case KWalletTransaction::CloseCancelled: {
-                doTransactionOpenCancelled(_curtrans->appid, _curtrans->wallet,
-                                           _curtrans->service);
-                break;
-            }
-
-            case KWalletTransaction::Unknown:
-            default: {
-                break;
-            }
-        }
-
-        // send delayed dbus message reply to the caller
-        if (_curtrans->message.type() != QDBusMessage::InvalidMessage) {
-            if (_curtrans->connection.isConnected()) {
-                QDBusMessage reply = _curtrans->message.createReply();
-                reply << _curtrans->res;
-                _curtrans->connection.send(reply);
-            }
-        }
-
-        delete _curtrans;
-        _curtrans = 0;
-    }
-
-    _processing = false;
-}
-
-int KWalletD::openPath(const QString& path, qlonglong wId, const QString& appid) {
-    int tId = openPathAsync(path, wId, appid, false);
-    if (tId < 0) {
-        return tId;
-    }
-
-    // NOTE the real return value will be sent by the dbusmessage delayed reply
-    return 0;
-    // wait for the open-transaction to be processed
-    // KWalletOpenLoop loop(this);
-    // return loop.waitForAsyncOpen(tId);
-}
-
-int KWalletD::open(const QString& wallet, qlonglong wId, const QString& appid) {
-    if (!_enabled) { // guard
-        return -1;
-    }
-
-    if (!QRegExp("^[\\w\\^\\&\\'\\@\\{\\}\\[\\]\\,\\$\\=\\!\\-\\#\\(\\)\\%\\.\\+\\_\\s]+$").exactMatch(wallet)) {
-        return -1;
-    }
-
-    KWalletTransaction *xact = new KWalletTransaction(connection());
-    _transactions.append(xact);
-
-    // message().setDelayedReply(true);
-    xact->message = message();
-    xact->message.setDelayedReply(true);
-
-    xact->appid = appid;
-    xact->wallet = wallet;
-    xact->wId = wId;
-    xact->modal = true; // mark dialogs as modal, the app has blocking wait
-    xact->tType = KWalletTransaction::Open;
-    xact->isPath = false;
-
-    QTimer::singleShot(0, this, SLOT(processTransactions()));
-    checkActiveDialog();
-    // NOTE the real return value will be sent by the dbusmessage delayed reply
-    return 0;
-}
-
-int KWalletD::openAsync(const QString& wallet, qlonglong wId, const QString& appid,
-                        bool handleSession) {
-    if (!_enabled) { // guard
-        return -1;
-    }
-
-    if (!QRegExp("^[\\w\\^\\&\\'\\@\\{\\}\\[\\]\\,\\$\\=\\!\\-\\#\\(\\)\\%\\.\\+\\_\\s]+$").exactMatch(wallet)) {
-        return -1;
-    }
-
-    KWalletTransaction *xact = new KWalletTransaction(connection());
-    _transactions.append(xact);
-
-    xact->appid = appid;
-    xact->wallet = wallet;
-    xact->wId = wId;
-    xact->modal = true; // mark dialogs as modal, the app has blocking wait
-    xact->tType = KWalletTransaction::Open;
-    xact->isPath = false;
-    if (handleSession) {
-        kDebug() << "openAsync for " << message().service();
-        _serviceWatcher.setConnection(connection());
-        _serviceWatcher.addWatchedService(message().service());
-        xact->service = message().service();
-    }
-    QTimer::singleShot(0, this, SLOT(processTransactions()));
-    checkActiveDialog();
-    // opening is in progress. return the transaction number
-    return xact->tId;
-}
-
-int KWalletD::openPathAsync(const QString& path, qlonglong wId, const QString& appid,
-                            bool handleSession) {
-    if (!_enabled) { // gaurd
-        return -1;
-    }
-
-    KWalletTransaction *xact = new KWalletTransaction(connection());
-    _transactions.append(xact);
-
-    xact->appid = appid;
-    xact->wallet = path;
-    xact->wId = wId;
-    xact->modal = true;
-    xact->tType = KWalletTransaction::Open;
-    xact->isPath = true;
-    if (handleSession) {
-        kDebug() << "openPathAsync " << message().service();
-        _serviceWatcher.setConnection(connection());
-        _serviceWatcher.addWatchedService(message().service());
-        xact->service = message().service();
-    }
-    QTimer::singleShot(0, this, SLOT(processTransactions()));
-    checkActiveDialog();
-    // opening is in progress. return the transaction number
-    return xact->tId;
-}
-
-// Sets up a dialog that will be shown by kwallet.
-void KWalletD::setupDialog( QWidget* dialog, WId wId, const QString& appid, bool modal ) {
-    if( wId != 0 ) {
-        KWindowSystem::setMainWindow( dialog, wId ); // correct, set dialog parent
-    } else {
-        if( appid.isEmpty()) {
-            kWarning() << "Using kwallet without parent window!";
-        } else {
-            kWarning() << "Application '" << appid << "' using kwallet without parent window!";
-        }
-        // allow dialog activation even if it interrupts, better than trying hacks
-        // with keeping the dialog on top or on all desktops
-        kapp->updateUserTimestamp();
-    }
-    if( modal ) {
-        KWindowSystem::setState( dialog->winId(), NET::Modal );
-    } else {
-        KWindowSystem::clearState( dialog->winId(), NET::Modal );
-    }
-    activeDialog = dialog;
-}
-
-// If there's a dialog already open and another application tries some operation that'd lead to
-// opening a dialog, that application will be blocked by this dialog. A proper solution would
-// be to set the second application's window also as a parent for the active dialog, so that
-// KWin properly handles focus changes and so on, but there's currently no support for multiple
-// dialog parents. Hopefully to be done in KDE4, for now just use all kinds of bad hacks to make
-//  sure the user doesn't overlook the active dialog.
-void KWalletD::checkActiveDialog() {
-    if( !activeDialog ) {
-        return;
-    }
-
-    kapp->updateUserTimestamp();
-
-    activeDialog->show();
-
-    WId window = activeDialog->winId();
-    KWindowSystem::setState( window, NET::KeepAbove );
-    KWindowSystem::setOnAllDesktops( window, true );
-    KWindowSystem::forceActiveWindow( window );
-    KWindowSystem::raiseWindow( window );
-}
-
-
-int KWalletD::doTransactionOpen(const QString& appid, const QString& wallet, bool isPath,
-                                qlonglong wId, bool modal, const QString& service) {
-    if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet()) && !isPath) {
-        // First use wizard
-        QPointer<KWalletWizard> wiz = new KWalletWizard(0);
-        wiz->setWindowTitle(i18n("KDE Wallet Service"));
-        setupDialog( wiz, (WId)wId, appid, modal );
-        int rc = wiz->exec();
-        if (rc == QDialog::Accepted && wiz) {
-            bool useWallet = wiz->field("useWallet").toBool();
-            KConfig kwalletrc("kwalletrc");
-            KConfigGroup cfg(&kwalletrc, "Wallet");
-            cfg.writeEntry("First Use", false);
-            cfg.writeEntry("Enabled", useWallet);
-            cfg.writeEntry("Close When Idle", wiz->field("closeWhenIdle").toBool());
-            cfg.writeEntry("Use One Wallet", !wiz->field("networkWallet").toBool());
-            cfg.sync();
-            reconfigure();
-
-            if (!useWallet) {
-                delete wiz;
-                return -1;
-            }
-
-            // Create the wallet
-            KWallet::Backend *b = new KWallet::Backend(KWallet::Wallet::LocalWallet());
-            QString pass = wiz->field("pass1").toString();
-            QByteArray p(pass.toUtf8(), pass.length());
-            b->open(p);
-            p.fill(0);
-            b->createFolder(KWallet::Wallet::PasswordFolder());
-            b->createFolder(KWallet::Wallet::FormDataFolder());
-            b->close(true);
-            delete b;
-            delete wiz;
-        } else {
-            delete wiz;
-            return -1;
-        }
-    } else if (_firstUse && !isPath) {
-        KConfig kwalletrc("kwalletrc");
-        KConfigGroup cfg(&kwalletrc, "Wallet");
-        _firstUse = false;
-        cfg.writeEntry("First Use", false);
-    }
-
-    int rc = internalOpen(appid, wallet, isPath, WId(wId), modal, service);
-    return rc;
-}
-
-
-int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isPath, WId w,
-                           bool modal, const QString& service) {
-    bool brandNew = false;
-
-    QString thisApp;
-    if (appid.isEmpty()) {
-        thisApp = "KDE System";
-    } else {
-        thisApp = appid;
-    }
-
-    if (implicitDeny(wallet, thisApp)) {
-        return -1;
-    }
-
-    QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int rc = walletInfo.first;
-    if (rc == -1) {
-        if (_wallets.count() > 20) {
-            kDebug() << "Too many wallets open.";
-            return -1;
-        }
-
-        KWallet::Backend *b = new KWallet::Backend(wallet, isPath);
-        QString password;
-        bool emptyPass = false;
-        if ((isPath && QFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) {
-        // this open attempt will set wallet type from the file header, even if password is needed
-            int pwless = b->open(QByteArray(), w);
-            if (0 != pwless || !b->isOpen()) {
-                if (pwless == 0) {
-                    // release, start anew
-                    delete b;
-                    b = new KWallet::Backend(wallet, isPath);
-                }
-                KPasswordDialog *kpd = new KPasswordDialog();
-                if (appid.isEmpty()) {
-                    kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.</qt>", Qt::escape(wallet)));
-                } else {
-                    kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.</qt>", Qt::escape(appid), Qt::escape(wallet)));
-                }
-                brandNew = false;
-                // don't use KStdGuiItem::open() here which has trailing ellipsis!
-                kpd->setButtonGuiItem(KDialog::Ok,KGuiItem( i18n( "&Open" ), "wallet-open"));
-                kpd->setCaption(i18n("KDE Wallet Service"));
-                kpd->setPixmap(KIcon("kwalletmanager").pixmap(KIconLoader::SizeHuge));
-                if (w != KWindowSystem::activeWindow() && w != 0L) {
-                    // If the dialog is modal to a minimized window it might not be visible
-                    // (but still blocking the calling application). Notify the user about
-                    // the request to open the wallet.
-                    KNotification *notification = new KNotification("needsPassword", kpd,
-                                                                    KNotification::Persistent |
-                                                                    KNotification::CloseWhenWidgetActivated);
-                    QStringList actions(i18nc("Text of a button to ignore the open-wallet notification", "Ignore"));
-                    if (appid.isEmpty()) {
-                        notification->setText(i18n("<b>KDE</b> has requested to open a wallet (%1).",
-                                                    Qt::escape(wallet)));
-                        actions.append(i18nc("Text of a button for switching to the (unnamed) application "
-                                                "requesting a password", "Switch there"));
-                    } else {
-                        notification->setText(i18n("<b>%1</b> has requested to open a wallet (%2).",
-                                                    Qt::escape(appid), Qt::escape(wallet)));
-                        actions.append(i18nc("Text of a button for switching to the application requesting "
-                                                "a password", "Switch to %1", Qt::escape(appid)));
-                    }
-                    notification->setActions(actions);
-                    connect(notification, SIGNAL(action1Activated()),
-                            notification, SLOT(close()));
-                    connect(notification, SIGNAL(action2Activated()),
-                            this, SLOT(activatePasswordDialog()));
-                    notification->sendEvent();
-                }
-                while (!b->isOpen()) {
-                    setupDialog( kpd, w, appid, modal );
-                    if (kpd->exec() == KDialog::Accepted) {
-                        password = kpd->password();
-                        int rc = b->open(password.toUtf8());
-                        if (!b->isOpen()) {
-                            kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br />(Error code %2: %3)</qt>", Qt::escape(wallet), rc, KWallet::Backend::openRCToString(rc)));
-                            kpd->setPassword("");
-                        }
-                    } else {
-                        break;
-                    }
-                }
-                delete kpd;
-            } else {
-                emptyPass = true;
-            }
-        } else {
-            brandNew = true;
-            b->setCipherType(KWallet::BACKEND_CIPHER_BLOWFISH);
-            KNewPasswordDialog *kpd = new KNewPasswordDialog();
-            if (wallet == KWallet::Wallet::LocalWallet() ||
-                wallet == KWallet::Wallet::NetworkWallet()) {
-                // Auto create these wallets.
-                if (appid.isEmpty()) {
-                    kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request."));
-                } else {
-                    kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.</qt>", Qt::escape(appid)));
-                }
-            } else {
-                if (appid.length() == 0) {
-                    kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(wallet)));
-                } else {
-                    kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(appid), Qt::escape(wallet)));
-                }
-            }
-            kpd->setCaption(i18n("KDE Wallet Service"));
-            kpd->setButtonGuiItem(KDialog::Ok,KGuiItem(i18n("C&reate"),"document-new"));
-            kpd->setPixmap(KIcon("kwalletmanager").pixmap(96, 96));
-            while (!b->isOpen()) {
-                setupDialog( kpd, w, appid, modal );
-                if (kpd->exec() == KDialog::Accepted) {
-                    password = kpd->password();
-                    int rc = b->open(password.toUtf8());
-                    if (!b->isOpen()) {
-                        kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br />(Error code %2: %3)</qt>", Qt::escape(wallet), rc, KWallet::Backend::openRCToString(rc)));
-                    }
-                } else {
-                    break;
-                }
-            }
-            delete kpd;
-        }
-
-
-        if ((b->cipherType() == KWallet::BACKEND_CIPHER_BLOWFISH) && 
-            !emptyPass && (password.isNull() || !b->isOpen())) {
-            delete b;
-            return -1;
-        }
-
-        if (emptyPass && !isAuthorizedApp(appid, wallet, w)) {
-            delete b;
-            return -1;
-        }
-
-        _wallets.insert(rc = generateHandle(), b);
-        _sessions.addSession(appid, service, rc);
-        _syncTimers.addTimer(rc, _syncTime);
-
-        if (brandNew) {
-            createFolder(rc, KWallet::Wallet::PasswordFolder(), appid);
-            createFolder(rc, KWallet::Wallet::FormDataFolder(), appid);
-        }
-
-        b->ref();
-        if (_closeIdle) {
-            _closeTimers.addTimer(rc, _idleTime);
-        }
-        if (brandNew) {
-            emit walletCreated(wallet);
-        }
-        emit walletOpened(wallet);
-        if (_wallets.count() == 1 && _launchManager) {
-            KToolInvocation::startServiceByDesktopName("kwalletmanager-kwalletd");
-        }
-    } else {
-        // prematurely add a reference so that the wallet does not close while the
-        // authorization dialog is being shown.
-        walletInfo.second->ref();
-        bool isAuthorized = _sessions.hasSession(appid, rc) || isAuthorizedApp(appid, wallet, w);
-        // as the wallet might have been forcefully closed, find it again to make sure it's
-        // still available (isAuthorizedApp might show a dialog).
-        walletInfo = findWallet(wallet);
-        if (!isAuthorized) {
-            if (walletInfo.first != -1) {
-                walletInfo.second->deref();
-                // check if the wallet should be closed now.
-                internalClose(walletInfo.second, walletInfo.first, false);
-            }
-            return -1;
-        } else {
-            if (walletInfo.first != -1) {
-                _sessions.addSession(appid, service, rc);
-            } else {
-                // wallet was forcefully closed.
-                return -1;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-bool KWalletD::isAuthorizedApp(const QString& appid, const QString& wallet, WId w) {
-    if (!_openPrompt) {
-        return true;
-    }
-
-    int response = 0;
-
-    QString thisApp;
-    if (appid.isEmpty()) {
-        thisApp = "KDE System";
-    } else {
-        thisApp = appid;
-    }
-
-    if (!implicitAllow(wallet, thisApp)) {
-        KConfigGroup cfg = KSharedConfig::openConfig("kwalletrc")->group("Auto Allow");
-        if (!cfg.isEntryImmutable(wallet)) {
-            KBetterThanKDialog *dialog = new KBetterThanKDialog;
-            dialog->setWindowTitle(i18n("KDE Wallet Service"));
-            if (appid.isEmpty()) {
-                dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.</qt>", Qt::escape(wallet)));
-            } else {
-                dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.</qt>", Qt::escape(QString(appid)), Qt::escape(wallet)));
-            }
-            setupDialog( dialog, w, appid, false );
-            response = dialog->exec();
-            delete dialog;
-        }
-    }
-
-    if (response == 0 || response == 1) {
-        if (response == 1) {
-            KConfigGroup cfg = KSharedConfig::openConfig("kwalletrc")->group("Auto Allow");
-            QStringList apps = cfg.readEntry(wallet, QStringList());
-            if (!apps.contains(thisApp)) {
-                if (cfg.isEntryImmutable(wallet)) {
-                    return false;
-                }
-                apps += thisApp;
-                _implicitAllowMap[wallet] += thisApp;
-                cfg.writeEntry(wallet, apps);
-                cfg.sync();
-            }
-        }
-    } else if (response == 3) {
-        KConfigGroup cfg = KSharedConfig::openConfig("kwalletrc")->group("Auto Deny");
-        QStringList apps = cfg.readEntry(wallet, QStringList());
-        if (!apps.contains(thisApp)) {
-            apps += thisApp;
-            _implicitDenyMap[wallet] += thisApp;
-            cfg.writeEntry(wallet, apps);
-            cfg.sync();
-        }
-        return false;
-    } else {
-        return false;
-    }
-    return true;
-}
-
-
-int KWalletD::deleteWallet(const QString& wallet) {
-    int result = -1;
-    QString path = KGlobal::dirs()->saveLocation("kwallet") + QDir::separator() + wallet + ".kwl";
-
-    if (QFile::exists(path)) {
-        const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-        internalClose(walletInfo.second, walletInfo.first, true);
-        QFile::remove(path);
-        emit walletDeleted(wallet);
-        // also delete access control entries
-        KConfigGroup cfgAllow = KSharedConfig::openConfig("kwalletrc")->group("Auto Allow");
-        cfgAllow.deleteEntry(wallet);
-
-        KConfigGroup cfgDeny = KSharedConfig::openConfig("kwalletrc")->group("Auto Deny");
-        cfgDeny.deleteEntry(wallet);
-
-        result = 0;
-    }
-
-    return result;
-}
-
-
-void KWalletD::changePassword(const QString& wallet, qlonglong wId, const QString& appid) {
-    KWalletTransaction *xact = new KWalletTransaction(connection());
-
-    // message().setDelayedReply(true);
-    xact->message = message();
-    xact->message.setDelayedReply(true);
-
-    xact->appid = appid;
-    xact->wallet = wallet;
-    xact->wId = wId;
-    xact->modal = false;
-    xact->tType = KWalletTransaction::ChangePassword;
-
-    _transactions.append(xact);
-
-    QTimer::singleShot(0, this, SLOT(processTransactions()));
-    checkActiveDialog();
-    checkActiveDialog();
-}
-
-void KWalletD::initiateSync(int handle) {
-    // add a timer and reset it right away
-    _syncTimers.addTimer(handle, _syncTime);
-    _syncTimers.resetTimer(handle, _syncTime);
-}
-
-void KWalletD::doTransactionChangePassword(const QString& appid, const QString& wallet, qlonglong wId) {
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int handle = walletInfo.first;
-    KWallet::Backend* w = walletInfo.second;
-
-    bool reclose = false;
-    if (!w) {
-        handle = doTransactionOpen(appid, wallet, false, wId, false, "");
-        if (-1 == handle) {
-            KMessageBox::sorryWId((WId)wId, i18n("Unable to open wallet. The wallet must be opened in order to change the password."), i18n("KDE Wallet Service"));
-            return;
-        }
-
-        w = _wallets.value(handle);
-        reclose = true;
-    }
-
-    assert(w);
-
-    QPointer<KNewPasswordDialog> kpd = new KNewPasswordDialog();
-    kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.</qt>", Qt::escape(wallet)));
-    kpd->setCaption(i18n("KDE Wallet Service"));
-    kpd->setAllowEmptyPasswords(true);
-    setupDialog( kpd, (WId)wId, appid, false );
-    if (kpd->exec() == KDialog::Accepted && kpd) {
-        QString p = kpd->password();
-        if (!p.isNull()) {
-            w->setPassword(p.toUtf8());
-            int rc = w->close(true);
-            if (rc < 0) {
-                KMessageBox::sorryWId((WId)wId, i18n("Error re-encrypting the wallet. Password was not changed."), i18n("KDE Wallet Service"));
-                reclose = true;
-            } else {
-                rc = w->open(p.toUtf8());
-                if (rc < 0) {
-                    KMessageBox::sorryWId((WId)wId, i18n("Error reopening the wallet. Data may be lost."), i18n("KDE Wallet Service"));
-                    reclose = true;
-                }
-            }
-        }
-    }
-
-    delete kpd;
-
-    if (reclose) {
-        internalClose(w, handle, true);
-    }
-}
-
-
-int KWalletD::close(const QString& wallet, bool force) {
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int handle = walletInfo.first;
-    KWallet::Backend* w = walletInfo.second;
-
-    return internalClose(w, handle, force);
-}
-
-
-int KWalletD::internalClose(KWallet::Backend *w, int handle, bool force) {
-    if (w) {
-        const QString& wallet = w->walletName();
-        if ((w->refCount() == 0 && !_leaveOpen) || force) {
-            // this is only a safety measure. sessions should be gone already.
-            _sessions.removeAllSessions(handle);
-            if (_closeIdle) {
-                _closeTimers.removeTimer(handle);
-            }
-            _syncTimers.removeTimer(handle);
-            _wallets.remove(handle);
-            w->close(true);
-            doCloseSignals(handle, wallet);
-            delete w;
-            return 0;
-        }
-        return 1;
-    }
-
-    return -1;
-}
-
-
-int KWalletD::close(int handle, bool force, const QString& appid) {
-    KWallet::Backend *w = _wallets.value(handle);
-
-    if (w) {
-        if (_sessions.hasSession(appid, handle)) {
-            // remove one handle for the application
-            bool removed = _sessions.removeSession(appid, message().service(), handle);
-            // alternatively try sessionless
-            if (removed || _sessions.removeSession(appid, "", handle)) {
-                w->deref();
-            }
-            return internalClose(w, handle, force);
-        }
-        return 1; // not closed, handle unknown
-    }
-    return -1; // not open to begin with, or other error
-}
-
-
-bool KWalletD::isOpen(const QString& wallet) {
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    return walletInfo.second != 0;
-}
-
-
-bool KWalletD::isOpen(int handle) {
-    if (handle == 0) {
-        return false;
-    }
-
-    KWallet::Backend *rc = _wallets.value(handle);
-
-    if (rc == 0 && ++_failed > 5) {
-        _failed = 0;
-        QTimer::singleShot(0, this, SLOT(notifyFailures()));
-    } else if (rc != 0) {
-        _failed = 0;
-    }
-
-    return rc != 0;
-}
-
-
-QStringList KWalletD::wallets() const {
-    QString path = KGlobal::dirs()->saveLocation("kwallet");
-    QDir dir(path, "*.kwl");
-    QStringList rc;
-
-    dir.setFilter(QDir::Files | QDir::Hidden);
-
-    foreach (const QFileInfo &fi, dir.entryInfoList()) {
-        QString fn = fi.fileName();
-        if (fn.endsWith(QLatin1String(".kwl"))) {
-                fn.truncate(fn.length()-4);
-        }
-        rc += fn;
-    }
-    return rc;
-}
-
-
-void KWalletD::sync(int handle, const QString& appid) {
-    KWallet::Backend *b;
-
-    // get the wallet and check if we have a password for it (safety measure)
-    if ((b = getWallet(appid, handle))) {
-        QString wallet = b->walletName();
-        b->sync(0);
-    }
-}
-
-void KWalletD::timedOutSync(int handle) {
-    _syncTimers.removeTimer(handle);
-    if (_wallets.contains(handle) && _wallets[handle]) {
-        _wallets[handle]->sync(0);
-    }
-}
-
-void KWalletD::doTransactionOpenCancelled(const QString& appid, const QString& wallet,
-                                          const QString& service) {
-
-    // there will only be one session left to remove - all others
-    // have already been removed in slotServiceOwnerChanged and all
-    // transactions for opening new sessions have been deleted.
-    if (!_sessions.hasSession(appid)) {
-        return;
-    }
-
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int handle = walletInfo.first;
-    KWallet::Backend *b = walletInfo.second;
-    if (handle != -1 && b) {
-        b->deref();
-        internalClose(b, handle, false);
-    }
-
-    // close the session in case the wallet hasn't been closed yet
-    _sessions.removeSession(appid, service, handle);
-}
-
-QStringList KWalletD::folderList(int handle, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        return b->folderList();
-    }
-
-    return QStringList();
-}
-
-
-bool KWalletD::hasFolder(int handle, const QString& f, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        return b->hasFolder(f);
-    }
-
-    return false;
-}
-
-
-bool KWalletD::removeFolder(int handle, const QString& f, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        bool rc = b->removeFolder(f);
-        initiateSync(handle);
-        emit folderListUpdated(b->walletName());
-        return rc;
-    }
-
-    return false;
-}
-
-
-bool KWalletD::createFolder(int handle, const QString& f, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        bool rc = b->createFolder(f);
-        initiateSync(handle);
-        emit folderListUpdated(b->walletName());
-        return rc;
-    }
-
-    return false;
-}
-
-
-QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry *e = b->readEntry(key);
-        if (e && e->type() == KWallet::Wallet::Map) {
-            return e->value();
-        }
-    }
-
-    return QByteArray();
-}
-
-
-QVariantMap KWalletD::readMapList(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        QVariantMap rc;
-        foreach (KWallet::Entry *entry, b->readEntryList(key)) {
-            if (entry->type() == KWallet::Wallet::Map) {
-                rc.insert(entry->key(), entry->value());
-            }
-        }
-        return rc;
-    }
-
-    return QVariantMap();
-}
-
-
-QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry *e = b->readEntry(key);
-        if (e) {
-            return e->value();
-        }
-    }
-
-    return QByteArray();
-}
-
-
-QVariantMap KWalletD::readEntryList(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        QVariantMap rc;
-        foreach (KWallet::Entry *entry, b->readEntryList(key)) {
-            rc.insert(entry->key(), entry->value());
-        }
-        return rc;
-    }
-
-    return QVariantMap();
-}
-
-
-QStringList KWalletD::entryList(int handle, const QString& folder, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        return b->entryList();
-    }
-
-    return QStringList();
-}
-
-
-QString KWalletD::readPassword(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry *e = b->readEntry(key);
-        if (e && e->type() == KWallet::Wallet::Password) {
-            return e->password();
-        }
-    }
-
-    return QString();
-}
-
-
-QVariantMap KWalletD::readPasswordList(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        QVariantMap rc;
-        foreach (KWallet::Entry *entry, b->readEntryList(key)) {
-            if (entry->type() == KWallet::Wallet::Password) {
-                rc.insert(entry->key(), entry->password());
-            }
-        }
-        return rc;
-    }
-
-    return QVariantMap();
-}
-
-
-int KWalletD::writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry e;
-        e.setKey(key);
-        e.setValue(value);
-        e.setType(KWallet::Wallet::Map);
-        b->writeEntry(&e);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return 0;
-    }
-
-    return -1;
-}
-
-
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry e;
-        e.setKey(key);
-        e.setValue(value);
-        e.setType(KWallet::Wallet::EntryType(entryType));
-        b->writeEntry(&e);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return 0;
-    }
-
-    return -1;
-}
-
-
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry e;
-        e.setKey(key);
-        e.setValue(value);
-        e.setType(KWallet::Wallet::Stream);
-        b->writeEntry(&e);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return 0;
-    }
-
-    return -1;
-}
-
-
-int KWalletD::writePassword(int handle, const QString& folder, const QString& key, const QString& value, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        KWallet::Entry e;
-        e.setKey(key);
-        e.setValue(value);
-        e.setType(KWallet::Wallet::Password);
-        b->writeEntry(&e);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return 0;
-    }
-
-    return -1;
-}
-
-
-int KWalletD::entryType(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        if (!b->hasFolder(folder)) {
-                return KWallet::Wallet::Unknown;
-        }
-        b->setFolder(folder);
-        if (b->hasEntry(key)) {
-                return b->readEntry(key)->type();
-        }
-    }
-
-    return KWallet::Wallet::Unknown;
-}
-
-
-bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        if (!b->hasFolder(folder)) {
-            return false;
-        }
-        b->setFolder(folder);
-        return b->hasEntry(key);
-    }
-
-    return false;
-}
-
-
-int KWalletD::removeEntry(int handle, const QString& folder, const QString& key, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        if (!b->hasFolder(folder)) {
-            return 0;
-        }
-        b->setFolder(folder);
-        bool rc = b->removeEntry(key);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return rc ? 0 : -3;
-    }
-
-    return -1;
-}
-
-
-void KWalletD::slotServiceOwnerChanged(const QString& name, const QString &oldOwner,
-                                       const QString& newOwner)
-{
-    Q_UNUSED(name);
-    kDebug() << "slotServiceOwnerChanged " << name << ", " << oldOwner << ", " << newOwner;
-
-    if (!newOwner.isEmpty()) {
-        return; // no application exit, don't care.
-    }
-
-    // as we don't have the application id we have to cycle
-    // all sessions. As an application can basically open wallets
-    // with several appids, we can't stop if we found one.
-    QString service(oldOwner);
-    QList<KWalletAppHandlePair> sessremove(_sessions.findSessions(service));
-    KWallet::Backend *b = 0;
-
-    // check all sessions for wallets to close
-    Q_FOREACH(const KWalletAppHandlePair &s, sessremove) {
-        b = getWallet(s.first, s.second);
-        if (b) {
-            b->deref();
-            internalClose(b, s.second, false);
-        }
-    }
-
-    // remove all the sessions in case they aren't gone yet
-    Q_FOREACH(const KWalletAppHandlePair &s, sessremove) {
-        _sessions.removeSession(s.first, service, s.second);
-    }
-
-    // cancel all open-transactions still running for the service
-    QList<KWalletTransaction*>::iterator tit;
-    for (tit = _transactions.begin(); tit != _transactions.end(); ++tit) {
-        if ((*tit)->tType == KWalletTransaction::Open && (*tit)->service == oldOwner) {
-            delete (*tit);
-            *tit = 0;
-        }
-    }
-    _transactions.removeAll(0);
-
-    // if there's currently an open-transaction being handled,
-    // mark it as cancelled.
-    if (_curtrans && _curtrans->tType == KWalletTransaction::Open &&
-        _curtrans->service == oldOwner) {
-        kDebug() << "Cancelling current transaction!";
-        _curtrans->cancelled = true;
-    }
-    _serviceWatcher.removeWatchedService(oldOwner);
-}
-
-KWallet::Backend *KWalletD::getWallet(const QString& appid, int handle) {
-    if (handle == 0) {
-        return 0L;
-    }
-
-    KWallet::Backend *w = _wallets.value(handle);
-
-    if (w) { // the handle is valid
-        if (_sessions.hasSession(appid, handle)) {
-            // the app owns this handle
-            _failed = 0;
-            if (_closeIdle) {
-                _closeTimers.resetTimer(handle, _idleTime);
-            }
-            return w;
-        }
-    }
-
-    if (++_failed > 5) {
-        _failed = 0;
-        QTimer::singleShot(0, this, SLOT(notifyFailures()));
-    }
-
-    return 0L;
-}
-
-
-void KWalletD::notifyFailures() {
-    if (!_showingFailureNotify) {
-        _showingFailureNotify = true;
-        KMessageBox::information(0, i18n("There have been repeated failed attempts to gain access to a wallet. An application may be misbehaving."), i18n("KDE Wallet Service"));
-        _showingFailureNotify = false;
-    }
-}
-
-
-void KWalletD::doCloseSignals(int handle, const QString& wallet) {
-    emit walletClosed(handle);
-    emit walletClosed(wallet);
-    if (_wallets.isEmpty()) {
-        emit allWalletsClosed();
-    }
-}
-
-
-int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName, const QString& appid) {
-    KWallet::Backend *b;
-
-    if ((b = getWallet(appid, handle))) {
-        b->setFolder(folder);
-        int rc = b->renameEntry(oldName, newName);
-        initiateSync(handle);
-        emitFolderUpdated(b->walletName(), folder);
-        return rc;
-    }
-
-    return -1;
-}
-
-
-QStringList KWalletD::users(const QString& wallet) const {
-    const QPair<int,KWallet::Backend*> walletInfo = findWallet(wallet);
-    return _sessions.getApplications(walletInfo.first);
-}
-
-
-bool KWalletD::disconnectApplication(const QString& wallet, const QString& application) {
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int handle = walletInfo.first;
-    KWallet::Backend* backend = walletInfo.second;
-
-    if (handle != -1 && _sessions.hasSession(application, handle)) {
-        int removed = _sessions.removeAllSessions(application, handle);
-
-        for (int i = 0; i < removed; ++i) {
-            backend->deref();
-        }
-        internalClose(backend, handle, false);
-
-        emit applicationDisconnected(wallet, application);
-        return true;
-    }
-
-    return false;
-}
-
-
-void KWalletD::emitFolderUpdated(const QString& wallet, const QString& folder) {
-    emit folderUpdated(wallet, folder);
-}
-
-
-void KWalletD::emitWalletListDirty() {
-    emit walletListDirty();
-}
-
-
-void KWalletD::reconfigure() {
-    KConfig cfg("kwalletrc");
-    KConfigGroup walletGroup(&cfg, "Wallet");
-    _firstUse = walletGroup.readEntry("First Use", true);
-    _enabled = walletGroup.readEntry("Enabled", true);
-    _launchManager = walletGroup.readEntry("Launch Manager", false);
-    _leaveOpen = walletGroup.readEntry("Leave Open", false);
-    bool idleSave = _closeIdle;
-    _closeIdle = walletGroup.readEntry("Close When Idle", false);
-    _openPrompt = walletGroup.readEntry("Prompt on Open", false);
-    int timeSave = _idleTime;
-    // in minutes!
-    _idleTime = walletGroup.readEntry("Idle Timeout", 10) * 60 * 1000;
-#ifdef Q_WS_X11
-    if (walletGroup.readEntry("Close on Screensaver", false)) {
-        // BUG 254273 : if kwalletd starts before the screen saver, then the connection fails and kwalletd never receives it's notifications
-        // To fix this, we use a timer and perform periodic connection attempts until connection succeeds
-        QTimer::singleShot(0, this, SLOT(connectToScreenSaver()));
-    } else {
-        if (screensaver && screensaver->isValid()) {
-            screensaver->disconnect(SIGNAL(ActiveChanged(bool)), this, SLOT(screenSaverChanged(bool)));
-            delete screensaver;
-            screensaver = 0;
-        }
-    }
-#endif
-    // Handle idle changes
-    if (_closeIdle) {
-        if (_idleTime != timeSave) { // Timer length changed
-            Wallets::const_iterator it = _wallets.constBegin();
-            const Wallets::const_iterator end = _wallets.constEnd();
-            for (; it != end; ++it) {
-                _closeTimers.resetTimer(it.key(), _idleTime);
-            }
-        }
-
-        if (!idleSave) { // add timers for all the wallets
-            Wallets::const_iterator it = _wallets.constBegin();
-            const Wallets::const_iterator end = _wallets.constEnd();
-            for (; it != end; ++it) {
-                _closeTimers.addTimer(it.key(), _idleTime);
-            }
-        }
-    } else {
-        _closeTimers.clear();
-    }
-
-    // Update the implicit allow stuff
-    _implicitAllowMap.clear();
-    const KConfigGroup autoAllowGroup(&cfg, "Auto Allow");
-    QStringList entries = autoAllowGroup.entryMap().keys();
-    for (QStringList::const_iterator i = entries.constBegin(); i != entries.constEnd(); ++i) {
-        _implicitAllowMap[*i] = autoAllowGroup.readEntry(*i, QStringList());
-    }
-
-    // Update the implicit allow stuff
-    _implicitDenyMap.clear();
-    const KConfigGroup autoDenyGroup(&cfg, "Auto Deny");
-    entries = autoDenyGroup.entryMap().keys();
-    for (QStringList::const_iterator i = entries.constBegin(); i != entries.constEnd(); ++i) {
-        _implicitDenyMap[*i] = autoDenyGroup.readEntry(*i, QStringList());
-    }
-
-    // Update if wallet was enabled/disabled
-    if (!_enabled) { // close all wallets
-        while (!_wallets.isEmpty()) {
-            Wallets::const_iterator it = _wallets.constBegin();
-            internalClose(it.value(), it.key(), true);
-        }
-        KUniqueApplication::exit(0);
-    }
-}
-
-
-bool KWalletD::isEnabled() const {
-    return _enabled;
-}
-
-
-bool KWalletD::folderDoesNotExist(const QString& wallet, const QString& folder) {
-    if (!wallets().contains(wallet)) {
-        return true;
-    }
-
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    if (walletInfo.second) {
-        return walletInfo.second->folderDoesNotExist(folder);
-    }
-
-    KWallet::Backend *b = new KWallet::Backend(wallet);
-    b->open(QByteArray());
-    bool rc = b->folderDoesNotExist(folder);
-    delete b;
-    return rc;
-}
-
-
-bool KWalletD::keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key) {
-    if (!wallets().contains(wallet)) {
-        return true;
-    }
-
-    const QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    if (walletInfo.second) {
-        return walletInfo.second->entryDoesNotExist(folder, key);
-    }
-
-    KWallet::Backend *b = new KWallet::Backend(wallet);
-    b->open(QByteArray());
-    bool rc = b->entryDoesNotExist(folder, key);
-    delete b;
-    return rc;
-}
-
-
-bool KWalletD::implicitAllow(const QString& wallet, const QString& app) {
-    return _implicitAllowMap[wallet].contains(app);
-}
-
-
-bool KWalletD::implicitDeny(const QString& wallet, const QString& app) {
-    return _implicitDenyMap[wallet].contains(app);
-}
-
-
-void KWalletD::timedOutClose(int id) {
-    KWallet::Backend *w = _wallets.value(id);
-    if (w) {
-        internalClose(w, id, true);
-    }
-}
-
-
-void KWalletD::closeAllWallets() {
-    Wallets walletsCopy = _wallets;
-
-    Wallets::const_iterator it = walletsCopy.constBegin();
-    const Wallets::const_iterator end = walletsCopy.constEnd();
-    for (; it != end; ++it) {
-        internalClose(it.value(), it.key(), true);
-    }
-
-    walletsCopy.clear();
-
-    // All of this should be basically noop.  Let's just be safe.
-    _wallets.clear();
-}
-
-
-QString KWalletD::networkWallet() {
-    return KWallet::Wallet::NetworkWallet();
-}
-
-
-QString KWalletD::localWallet() {
-    return KWallet::Wallet::LocalWallet();
-}
-
-void KWalletD::screenSaverChanged(bool s)
-{
-    if (s) {
-        closeAllWallets();
-    }
-}
-
-void KWalletD::activatePasswordDialog()
-{
-    checkActiveDialog();
-}
-
-int KWalletD::pamOpen(const QString &wallet, const QByteArray &passwordHash, int sessionTimeout)
-{
-    if (_processing) {
-        return -1;
-    }
-
-    if (!QRegExp("^[\\w\\^\\&\\'\\@\\{\\}\\[\\]\\,\\$\\=\\!\\-\\#\\(\\)\\%\\.\\+\\_\\s]+$").exactMatch(wallet)) {
-        return -1;
-    }
-
-    // check if the wallet is already open
-    QPair<int, KWallet::Backend*> walletInfo = findWallet(wallet);
-    int rc = walletInfo.first;
-    if (rc != -1) {
-        return rc;//Wallet already opened, return handle
-    }
-
-    KWallet::Backend *b = 0;
-    //If the wallet we want to open does not exists. create it and set pam hash
-    if (!wallets().contains(wallet)) {
-        b = new KWallet::Backend(wallet);
-        b->setCipherType(KWallet::BACKEND_CIPHER_BLOWFISH);
-    } else {
-        b = new KWallet::Backend(wallet);
-    }
-
-    if (_wallets.count() > 20) {
-        return -1;
-    }
-
-    int openrc = b->openPreHashed(passwordHash);
-    if (openrc != 0 || !b->isOpen()) {
-        return -1;
-    }
-
-    // opening the wallet was successful
-    int handle = generateHandle();
-    _wallets.insert(handle, b);
-    _syncTimers.addTimer(handle, _syncTime);
-
-    // don't reference the wallet or add a session so it
-    // can be reclosed easily.
-
-    if (sessionTimeout > 0) {
-        _closeTimers.addTimer(handle, sessionTimeout);
-    } else if (_closeIdle) {
-        _closeTimers.addTimer(handle, _idleTime);
-    }
-    emit walletOpened(wallet);
-
-    if (_wallets.count() == 1 && _launchManager) {
-        KToolInvocation::startServiceByDesktopName("kwalletmanager-kwalletd");
-    }
-
-    return handle;
-}
-
-#include "moc_kwalletd.cpp"
diff --git a/kwalletd/kwalletd.desktop b/kwalletd/kwalletd.desktop
deleted file mode 100644 (file)
index 436865a..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-[Desktop Entry]
-Type=Service
-Exec=kwalletd
-X-KDE-ServiceTypes=
-# It is a server
-X-DBUS-StartupType=Unique
-X-KDE-StartupNotify=false
-Name=Wallet Server
-Name[ar]=خادم المحفظة
-Name[as]=Wallet Server
-Name[ast]=Sirvidor monederu
-Name[bg]=Сървър "портфейл"
-Name[bn]=ওয়ালেট সার্ভার
-Name[bn_IN]=Wallet সার্ভার
-Name[bs]=Server novčanika
-Name[ca]=Servidor de carteres
-Name[ca@valencia]=Servidor de carteres
-Name[cs]=Server úschovny
-Name[csb]=Serwera Wallet
-Name[da]=Wallet-server
-Name[de]=Passwortspeicher-Server
-Name[el]=Εξυπηρετητής πορτοφολιού
-Name[en_GB]=Wallet Server
-Name[eo]=Servilo de portilo
-Name[es]=Servidor de carteras
-Name[et]=Turvalaeka server
-Name[eu]=Zorro-zerbitzaria
-Name[fa]=خادم کیف‌پول
-Name[fi]=Lompakkopalvelin
-Name[fr]=Serveur de portefeuilles
-Name[fy]=Slúf tsjinner
-Name[ga]=Freastalaí Sparáin
-Name[gl]=Servidor de carteira
-Name[gu]=વોલેટ સર્વર
-Name[he]=שרת ארנק
-Name[hi]=वालेट सर्वर
-Name[hne]=वालेट सर्वर
-Name[hr]=Poslužitelj novčanika
-Name[hsb]=Móšnjowy serwer
-Name[hu]=Jelszótároló szolgáltatás
-Name[ia]=Servitor de Portafolio
-Name[id]=Server Dompet
-Name[is]=Veskisþjónn
-Name[it]=Server portafoglio
-Name[ja]=ウォレットサーバ
-Name[kk]=Әмиян сервері
-Name[km]=ម៉ាស៊ីន​បម្រើ​កាបូប
-Name[kn]=ಹಸುಬೆಚೀಲ (ವಾಲೆಟ್) ಪರೀಚಾರಕ (ಸರ್ವರ್)
-Name[ko]=지갑 서버
-Name[ku]=Pêşkêşkera Wallet
-Name[lt]=Wallet serveris
-Name[lv]=Maka serveris
-Name[mai]=वालेट सर्वर
-Name[mk]=Сервер за паричници
-Name[ml]=വാലറ്റ് സര്‍വര്‍
-Name[mr]=पाकीट सर्व्हर
-Name[nb]=Lommebok-tjener
-Name[nds]=Knipp-Server
-Name[nl]=Portefeuilleserver
-Name[nn]=Lommeboktenar
-Name[or]=ୱାଲେଟ ସର୍ଭର
-Name[pa]=ਵਾਲਿਟ ਸਰਵਰ
-Name[pl]=Serwer Portfela
-Name[pt]=Servidor da Carteira
-Name[pt_BR]=Servidor de carteiras
-Name[ro]=Server de portofel
-Name[ru]=Wallet Server
-Name[si]=පසුම්බි ධාරකය
-Name[sk]=Wallet Server
-Name[sl]=Strežnik za listnico
-Name[sr]=Сервер новчаника
-Name[sr@ijekavian]=Сервер новчаника
-Name[sr@ijekavianlatin]=Server novčanika
-Name[sr@latin]=Server novčanika
-Name[sv]=Plånboksserver
-Name[ta]=Wallet Server
-Name[te]=వాలెట్ సెర్వర్
-Name[tg]=Сервери барномаи Ҳамён
-Name[th]=บริการกระเป๋าคุมข้อมูล
-Name[tr]=Cüzdan Sunucusu
-Name[ug]=ھەميان مۇلازىمېتىر
-Name[uk]=Сервер торбинки
-Name[vi]=Máy chủ Wallet
-Name[wa]=Sierveu poite-manoye
-Name[x-test]=xxWallet Serverxx
-Name[zh_CN]=钱包服务器
-Name[zh_TW]=錢包伺服器
-Comment=Wallet Server
-Comment[ar]=خادم المحفظة
-Comment[as]=Wallet Server
-Comment[ast]=Sirvidor monederu
-Comment[bg]=Сървър "портфейл" (Wallet)
-Comment[bn]=ওয়ালেট সার্ভার
-Comment[bn_IN]=Wallet সার্ভার
-Comment[bs]=Server novčanika
-Comment[ca]=Servidor de carteres
-Comment[ca@valencia]=Servidor de carteres
-Comment[cs]=Server úschovny
-Comment[csb]=Serwera Wallet
-Comment[da]=Wallet-server
-Comment[de]=Passwortspeicher-Server
-Comment[el]=Εξυπηρετητής πορτοφολιού
-Comment[en_GB]=Wallet Server
-Comment[eo]=Servilo de portilo
-Comment[es]=Servidor de carteras
-Comment[et]=Turvalaeka server
-Comment[eu]=Zorro-zerbitzaria
-Comment[fa]=خادم کیف‌پول
-Comment[fi]=Lompakkopalvelin
-Comment[fr]=Serveur de portefeuilles
-Comment[fy]=Slúf tsjinner
-Comment[ga]=Freastalaí Sparáin
-Comment[gl]=Servidor de carteira
-Comment[gu]=વોલેટ સર્વર
-Comment[he]=שרת ארנק
-Comment[hi]=वालेट सर्वर
-Comment[hne]=वालेट सर्वर
-Comment[hr]=Poslužitelj novčanika
-Comment[hsb]=Móšnjowy serwer
-Comment[hu]=Jelszótároló szolgáltatás
-Comment[ia]=Servitor de Portafolio
-Comment[id]=Server Dompet
-Comment[is]=Veskisþjónn
-Comment[it]=Server portafoglio
-Comment[ja]=ウォレットサーバ
-Comment[kk]=Әмиян сервері
-Comment[km]=ម៉ាស៊ីន​បម្រើ​កាបូប
-Comment[kn]=ಹಸುಬೆಚೀಲ (ವಾಲೆಟ್) ಪರೀಚಾರಕ (ಸರ್ವರ್)
-Comment[ko]=지갑 서버
-Comment[ku]=Pêşkêşkera Wallet
-Comment[lt]=Wallet serveris
-Comment[lv]=Maka serveris
-Comment[mai]=वालेट सर्वर
-Comment[mk]=Сервер за паричници
-Comment[ml]=വാലറ്റ് സര്‍വര്‍
-Comment[mr]=पाकीट सर्व्हर
-Comment[nb]=Lommebok-tjener
-Comment[nds]=Knipp-Server
-Comment[nl]=Portefeuilleserver
-Comment[nn]=Lommeboktenar
-Comment[or]=ୱାଲେଟ ସର୍ଭର
-Comment[pa]=ਵਾਲਿਟ ਸਰਵਰ
-Comment[pl]=Serwer Portfela
-Comment[pt]=Servidor da Carteira
-Comment[pt_BR]=Servidor de carteiras
-Comment[ro]=Server de portofel
-Comment[ru]=Служба бумажника
-Comment[si]=පසුම්බි ධාරකය
-Comment[sk]=Wallet Server
-Comment[sl]=Strežnik za listnico
-Comment[sr]=Сервер новчаника
-Comment[sr@ijekavian]=Сервер новчаника
-Comment[sr@ijekavianlatin]=Server novčanika
-Comment[sr@latin]=Server novčanika
-Comment[sv]=Plånboksserver
-Comment[ta]=Wallet Server
-Comment[te]=వాలెట్ సెర్వర్
-Comment[tg]=Сервери барномаи Ҳамён
-Comment[th]=บริการกระเป๋าคุมข้อมูล
-Comment[tr]=Cüzdan Sunucusu
-Comment[ug]=ھەميان مۇلازىمېتىر
-Comment[uk]=Сервер торбинки
-Comment[vi]=Máy chủ Wallet
-Comment[wa]=Sierveu poite-manoye (wallet)
-Comment[x-test]=xxWallet Serverxx
-Comment[zh_CN]=钱包服务器
-Comment[zh_TW]=錢包伺服器
diff --git a/kwalletd/kwalletd.h b/kwalletd/kwalletd.h
deleted file mode 100644 (file)
index b242e69..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2002-2004 George Staikos <staikos@kde.org>
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-#ifndef _KWALLETD_H_
-#define _KWALLETD_H_
-
-#include <QtCore/QHash>
-#include <QtCore/QPointer>
-#include <QtDBus/QDBusContext>
-#include <QtDBus/QDBusServiceWatcher>
-#include <QtDBus/QDBusInterface>
-
-#include "kwalletbackend.h"
-#include "ktimeout.h"
-#include "kwalletsessionstore.h"
-
-#include <time.h>
-#include <stdlib.h>
-
-class KDirWatch;
-class KTimeout;
-
-// @Private
-class KWalletTransaction;
-class KWalletSessionStore;
-
-class KWalletD : public QObject, protected QDBusContext
-{
-    Q_OBJECT
-
-public:
-    KWalletD();
-    virtual ~KWalletD();
-    
-public Q_SLOTS:
-    // Is the wallet enabled?  If not, all open() calls fail.
-    bool isEnabled() const;
-
-    // Open and unlock the wallet
-    int open(const QString& wallet, qlonglong wId, const QString& appid);
-
-    // Open and unlock the wallet with this path
-    int openPath(const QString& path, qlonglong wId, const QString& appid);
-
-    // Open the wallet asynchronously
-    int openAsync(const QString& wallet, qlonglong wId, const QString& appid,
-                    bool handleSession);
-
-    // Open and unlock the wallet with this path asynchronously
-    int openPathAsync(const QString& path, qlonglong wId, const QString& appid,
-                        bool handleSession);
-
-    // Close and lock the wallet
-    // If force = true, will close it for all users.  Behave.  This
-    // can break applications, and is generally intended for use by
-    // the wallet manager app only.
-    int close(const QString& wallet, bool force);
-    int close(int handle, bool force, const QString& appid);
-
-    // Save to disk but leave open
-    void sync(int handle, const QString& appid);
-
-    // Physically deletes the wallet from disk.
-    int deleteWallet(const QString& wallet);
-
-    // Returns true if the wallet is open
-    bool isOpen(const QString& wallet);
-    bool isOpen(int handle);
-
-    // List the users of this wallet
-    QStringList users(const QString& wallet) const;
-
-    // Change the password of this wallet
-    void changePassword(const QString& wallet, qlonglong wId, const QString& appid);
-
-    // A list of all wallets
-    QStringList wallets() const;
-
-    // A list of all folders in this wallet
-    QStringList folderList(int handle, const QString& appid);
-
-    // Does this wallet have this folder?
-    bool hasFolder(int handle, const QString& folder, const QString& appid);
-
-    // Create this folder
-    bool createFolder(int handle, const QString& folder, const QString& appid);
-
-    // Remove this folder
-    bool removeFolder(int handle, const QString& folder, const QString& appid);
-
-    // List of entries in this folder
-    QStringList entryList(int handle, const QString& folder, const QString& appid);
-
-    // Read an entry.  If the entry does not exist, it just
-    // returns an empty result.         It is your responsibility to check
-    // hasEntry() first.
-    QByteArray readEntry(int handle, const QString& folder, const QString& key, const QString& appid);
-    QByteArray readMap(int handle, const QString& folder, const QString& key, const QString& appid);
-    QString readPassword(int handle, const QString& folder, const QString& key, const QString& appid);
-    QVariantMap readEntryList(int handle, const QString& folder, const QString& key, const QString& appid);
-    QVariantMap readMapList(int handle, const QString& folder, const QString& key, const QString& appid);
-    QVariantMap readPasswordList(int handle, const QString& folder, const QString& key, const QString& appid);
-
-    // Rename an entry.         rc=0 on success.
-    int renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName, const QString& appid);
-
-    // Write an entry. rc=0 on success.
-    int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType, const QString& appid);
-    int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, const QString& appid);
-    int writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value, const QString& appid);
-    int writePassword(int handle, const QString& folder, const QString& key, const QString& value, const QString& appid);
-
-    // Does the entry exist?
-    bool hasEntry(int handle, const QString& folder, const QString& key, const QString& appid);
-
-    // What type is the entry?
-    int entryType(int handle, const QString& folder, const QString& key, const QString& appid);
-
-    // Remove an entry.         rc=0 on success.
-    int removeEntry(int handle, const QString& folder, const QString& key, const QString& appid);
-
-    // Disconnect an app from a wallet
-    bool disconnectApplication(const QString& wallet, const QString& application);
-
-    void reconfigure();
-
-    // Determine
-    bool folderDoesNotExist(const QString& wallet, const QString& folder);
-    bool keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key);
-
-    void closeAllWallets();
-
-    QString networkWallet();
-
-    QString localWallet();
-
-    void screenSaverChanged(bool);
-
-    // Open a wallet using a pre-hashed password. This is only useful in cooperation
-    // with the kwallet PAM module. It's also less secure than manually entering the
-    // password as the password hash is transmitted using D-Bus.
-    int pamOpen(const QString &wallet, const QByteArray &passwordHash, int sessionTimeout);
-
-Q_SIGNALS:
-    void walletAsyncOpened(int id, int handle); // used to notify KWallet::Wallet
-    void walletListDirty();
-    void walletCreated(const QString& wallet);
-    void walletOpened(const QString& wallet);
-    void walletDeleted(const QString& wallet);
-    void walletClosed(const QString& wallet);
-    void walletClosed(int handle);
-    void allWalletsClosed();
-    void folderListUpdated(const QString& wallet);
-    void folderUpdated(const QString&, const QString&);
-    void applicationDisconnected(const QString& wallet, const QString& application);
-
-private Q_SLOTS:
-    void slotServiceOwnerChanged(const QString& name, const QString &oldOwner,
-                                    const QString &newOwner);
-    void emitWalletListDirty();
-    void timedOutClose(int handle);
-    void timedOutSync(int handle);
-    void notifyFailures();
-    void processTransactions();
-    void activatePasswordDialog();
-    void connectToScreenSaver();
-
-private:
-    // Internal - open a wallet
-    int internalOpen(const QString& appid, const QString& wallet, bool isPath, WId w,
-                        bool modal, const QString& service);
-    // Internal - close this wallet.
-    int internalClose(KWallet::Backend *w, int handle, bool force);
-    
-    bool isAuthorizedApp(const QString& appid, const QString& wallet, WId w);
-    // This also validates the handle. May return NULL.
-    KWallet::Backend* getWallet(const QString& appid, int handle);
-    // Generate a new unique handle.
-    int generateHandle();
-    // Emit signals about closing wallets
-    void doCloseSignals(int,const QString&);
-    void emitFolderUpdated(const QString&, const QString&);
-    // Implicitly allow access for this application
-    bool implicitAllow(const QString& wallet, const QString& app);
-    bool implicitDeny(const QString& wallet, const QString& app);
-
-    void doTransactionChangePassword(const QString& appid, const QString& wallet, qlonglong wId);
-    void doTransactionOpenCancelled(const QString& appid, const QString& wallet,
-                                    const QString& service);
-    int doTransactionOpen(const QString& appid, const QString& wallet, bool isPath,
-                            qlonglong wId, bool modal, const QString& service);
-    void initiateSync(int handle);
-
-    void setupDialog( QWidget* dialog, WId wId, const QString& appid, bool modal );
-    void checkActiveDialog();
-
-    QPair<int, KWallet::Backend*> findWallet(const QString& walletName) const;
-
-    typedef QHash<int, KWallet::Backend *> Wallets;
-    Wallets _wallets;
-    KDirWatch *_dw;
-    int _failed;
-
-    // configuration values
-    bool _leaveOpen, _closeIdle, _launchManager, _enabled;
-    bool _openPrompt, _firstUse, _showingFailureNotify;
-    int _idleTime;
-    QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
-    KTimeout _closeTimers;
-    KTimeout _syncTimers;
-    const int _syncTime;
-    static bool _processing;
-
-    KWalletTransaction *_curtrans; // current transaction
-    QList<KWalletTransaction*> _transactions;
-    QPointer< QWidget > activeDialog;
-
-#ifdef Q_WS_X11
-    QDBusInterface *screensaver;
-#endif
-
-    // sessions
-    KWalletSessionStore _sessions;
-    QDBusServiceWatcher _serviceWatcher;
-};
-
-
-#endif
diff --git a/kwalletd/kwalletd.notifyrc b/kwalletd/kwalletd.notifyrc
deleted file mode 100644 (file)
index 2ec8ee1..0000000
+++ /dev/null
@@ -1,385 +0,0 @@
-[Global]
-IconName=kwalletmanager
-Comment=Wallet
-Comment[ar]=المحفظة
-Comment[ast]=Cartera
-Comment[bg]=Портфейл
-Comment[bn]=ওয়ালেট
-Comment[bs]=Novčanik
-Comment[ca]=Cartera
-Comment[ca@valencia]=Cartera
-Comment[cs]=Úschovna
-Comment[da]=Tegnebog
-Comment[de]=Passwortspeicher
-Comment[el]=Πορτοφόλι
-Comment[en_GB]=Wallet
-Comment[eo]=Portilo
-Comment[es]=Cartera
-Comment[et]=Turvalaegas
-Comment[eu]=Zorroa
-Comment[fa]=کیف‌پول
-Comment[fi]=Lompakko
-Comment[fr]=Portefeuille
-Comment[ga]=Sparán
-Comment[gl]=Carteira
-Comment[gu]=વોલેટ
-Comment[he]=ארנק
-Comment[hi]=बटुआ
-Comment[hr]=Novčanik
-Comment[hu]=Wallet
-Comment[ia]=Portafolio
-Comment[id]=Dompet
-Comment[is]=Veski
-Comment[it]=Portafoglio
-Comment[ja]=ウォレット
-Comment[kk]=Әмиян
-Comment[km]=ការបូប
-Comment[kn]=ವಾಲೆಟ್ (Wallet)
-Comment[ko]=지갑
-Comment[lt]=Piniginė
-Comment[lv]=Wallet
-Comment[mai]=वालेट
-Comment[ml]=വാലറ്റ്
-Comment[mr]=पाकीट
-Comment[nb]=Lommebok
-Comment[nds]=Knipp
-Comment[nl]=Portefeuille
-Comment[nn]=Lommebok
-Comment[pa]=ਵਾਲਿਟ
-Comment[pl]=Portfel
-Comment[pt]=Carteira
-Comment[pt_BR]=Carteira
-Comment[ro]=Portofel
-Comment[ru]=Бумажник
-Comment[si]=පසුම්බිය
-Comment[sk]=Wallet
-Comment[sl]=Listnica
-Comment[sr]=Новчаник
-Comment[sr@ijekavian]=Новчаник
-Comment[sr@ijekavianlatin]=Novčanik
-Comment[sr@latin]=Novčanik
-Comment[sv]=Plånbok
-Comment[tg]=Ҳамён
-Comment[th]=กระเป๋าคุมข้อมูล
-Comment[tr]=Cüzdan
-Comment[ug]=ھەميان
-Comment[uk]=Торбинка
-Comment[vi]=Wallet
-Comment[wa]=Poite-manoye
-Comment[x-test]=xxWalletxx
-Comment[zh_CN]=钱包
-Comment[zh_TW]=錢包
-Name=kwalletd
-Name[ar]=kwalletd
-Name[ast]=kwalletd
-Name[bg]=kwalletd
-Name[bn]=kwalletd
-Name[bs]=kwalletd
-Name[ca]=kwalletd
-Name[ca@valencia]=kwalletd
-Name[cs]=kwalletd
-Name[csb]=kwalletd
-Name[da]=kwalletd
-Name[de]=kwalletd
-Name[el]=kwalletd
-Name[en_GB]=kwalletd
-Name[eo]=kwalletd
-Name[es]=kwalletd
-Name[et]=kwalletd
-Name[eu]=kwalletd
-Name[fa]=kwalletd
-Name[fi]=kwalletd
-Name[fr]=kwalletd
-Name[fy]=kwalletd
-Name[ga]=kwalletd
-Name[gl]=kwalletd
-Name[gu]=kwalletd
-Name[he]=kwalletd
-Name[hi]=kwalletd
-Name[hr]=kwalletd
-Name[hu]=kwalletd
-Name[ia]=kwalletd
-Name[id]=kwalletd
-Name[is]=kwalletd
-Name[it]=kwalletd
-Name[ja]=kwalletd
-Name[kk]=kwalletd
-Name[km]=kwalletd
-Name[kn]=kwalletd
-Name[ko]=kwalletd
-Name[lt]=kwalletd
-Name[lv]=kwalletd
-Name[mai]=केवालेट्ड
-Name[mk]=kwalletd
-Name[ml]=കെവാലറ്റ്ഡി
-Name[mr]=के-वॉलेट-डि
-Name[nb]=kwalletd
-Name[nds]=KWalletd
-Name[nl]=kwalletd
-Name[nn]=kwalletd
-Name[pa]=kwalletd
-Name[pl]=kwalletd
-Name[pt]=kwalletd
-Name[pt_BR]=kwalletd
-Name[ro]=kwalletd
-Name[ru]=kwalletd
-Name[si]=kwalletd
-Name[sk]=kwalletd
-Name[sl]=kwalletd
-Name[sr]=kwalletd
-Name[sr@ijekavian]=kwalletd
-Name[sr@ijekavianlatin]=kwalletd
-Name[sr@latin]=kwalletd
-Name[sv]=kwalletd
-Name[tg]=kwalletd
-Name[th]=kwalletd
-Name[tr]=kwalletd
-Name[ug]=kwalletd
-Name[uk]=kwalletd
-Name[vi]=kwalletd
-Name[wa]=kwalletd
-Name[x-test]=xxkwalletdxx
-Name[zh_CN]=kwalletd
-Name[zh_TW]=kwalletd
-
-[Event/needsPassword]
-Name=Needs password
-Name[ar]=يحتاج كلمة السر
-Name[ast]=Necesita contraseña
-Name[bg]=Нужна е парола
-Name[bn]=পাসওয়ার্ড প্রয়োজন
-Name[bs]=Zahtjeva lozinku
-Name[ca]=Cal una contrasenya
-Name[ca@valencia]=Cal contrasenya
-Name[cs]=Je třeba heslo
-Name[csb]=Wëmôgô zjinaczi parolë
-Name[da]=Kræver adgangskode
-Name[de]=Passwort erforderlich
-Name[el]=Απαιτείται κωδικός πρόσβασης
-Name[en_GB]=Needs password
-Name[eo]=Ĝi postulas pasvorton
-Name[es]=Necesita contraseña
-Name[et]=Vajalik on parool
-Name[eu]=Pasahitza behar du
-Name[fa]=نیاز به اسم رمز
-Name[fi]=Kysyy salasanaa
-Name[fr]=Nécessite un mot de passe
-Name[fy]=Hat wachwurd nedich
-Name[ga]=Focal faire de dhíth
-Name[gl]=Precisa dun contrasinal
-Name[gu]=પાસવર્ડ જરૂરી છે
-Name[he]=דרושה סיסמא
-Name[hi]=पासवर्ड चाहिए
-Name[hr]=Potrebna zaproka
-Name[hu]=Jelszó megadása szükséges
-Name[ia]=Il necessita de un contrasigno
-Name[id]=Memerlukan sandi
-Name[is]=Þarf lykilorð
-Name[it]=Serve una password
-Name[ja]=パスワードが必要
-Name[kk]=Парольді қажет етеді
-Name[km]=ត្រូវការ​ពាក្យសម្ងាត់
-Name[kn]=ಗುಪ್ತಪದದ ಅಗತ್ಯವಿದೆ
-Name[ko]=암호 필요함
-Name[lt]=Reikia slaptažodžio
-Name[lv]=Nepieciešama parole
-Name[mai]=गुड़किल्लीकेँ जरूरत अछि
-Name[mk]=Потребна е лозинка
-Name[ml]=അടയാളവാക്ക് വേണം
-Name[mr]=गुप्तशब्द गरजेचा आहे
-Name[nb]=Trenger passord
-Name[nds]=Passwoort deit noot
-Name[nl]=Wachtwoord nodig
-Name[nn]=Passord er påkravd
-Name[pa]=ਪਾਸਵਰਡ ਚਾਹੀਦਾ ਹੈ
-Name[pl]=Potrzebne jest hasło
-Name[pt]=Necessita de senha
-Name[pt_BR]=Necessita senha
-Name[ro]=Necesită parolă
-Name[ru]=Требуется пароль
-Name[si]=රහස්පදය අවශ්‍ය වේ
-Name[sk]=Vyžaduje heslo
-Name[sl]=Potrebuje geslo
-Name[sr]=Захтева лозинку
-Name[sr@ijekavian]=Захтијева лозинку
-Name[sr@ijekavianlatin]=Zahtijeva lozinku
-Name[sr@latin]=Zahteva lozinku
-Name[sv]=Kräver lösenord
-Name[tg]=Парол лозим аст
-Name[th]=ต้องการรหัสผ่าน
-Name[tr]=Parola gerektirir
-Name[ug]=ئىم زۆرۈر
-Name[uk]=Потрібен пароль
-Name[vi]=Yêu cầu mật khẩu
-Name[wa]=Mezåjhe d' on scret
-Name[x-test]=xxNeeds passwordxx
-Name[zh_CN]=需要密码
-Name[zh_TW]=需要密碼
-Comment=The KDE Wallet Daemon requests a password
-Comment[ar]=مراقب محفظة كدي يطلب كلمة سر
-Comment[ast]=El degorriu del monederu de KDE requier una contraseña
-Comment[bg]=Услугата "портфейл" на KDE изисква парола
-Comment[bn]=কে.ডি.ই. ওয়ালেট ডিমন একটি পাসওয়ার্ড চাইছে
-Comment[bs]=KDE‑ov demon novčanika zahtjeva lozinku
-Comment[ca]=El dimoni de carteres del KDE demana una contrasenya
-Comment[ca@valencia]=El dimoni de carteres del KDE demana una contrasenya
-Comment[cs]=Démon úschovny KDE požaduje heslo
-Comment[csb]=Demóna KDE Wallet żądô parolë
-Comment[da]=Dæmonen for KDE's tegnebog anmoder om en adgangskode
-Comment[de]=Der Passwortspeicher benötigt ein Passwort
-Comment[el]=Ο δαίμονας πορτοφολιού του KDE απαιτεί έναν κωδικό πρόσβασης
-Comment[en_GB]=The KDE Wallet Dæmon requests a password
-Comment[eo]=la demono de portilo de KDE postulas pasvorton
-Comment[es]=El demonio de la cartera de KDE requiere una contraseña
-Comment[et]=KDE turvalaeka deemon nõuab parooli
-Comment[eu]=KDEren zorroaren daemon-ak pasahitza eskatzen du
-Comment[fa]=شبح Wallte کی‌دی‌ای رمزعبوری را درخواست میکند
-Comment[fi]=KDE:n Lompakkotaustaprosessi pyytää salasanaa
-Comment[fr]=Le démon du portefeuille de KDE demande un mot de passe
-Comment[fy]=The KDE slûf daemon fereasket in wachtwurd
-Comment[ga]=Tá Deamhan Sparáin KDE ag iarraidh focal faire
-Comment[gl]=O Daemon de carteiras de KDE pide un contrasinal
-Comment[gu]=KDE વોલેટ ડેમને પાસવર્ડની માંગ કરી છે
-Comment[he]=תהליך הרקע של הארנק של KDE מבקש סיסמא
-Comment[hi]=केडीई वॉलेट डेमॉन एक पासवर्ड का अनुरोध करता है
-Comment[hr]=KDE-ov novčanik daemon zahtijeva zaporku
-Comment[hu]=A KDE jelszótároló szolgáltatás jelszót kér
-Comment[ia]=Le Demone KDE Wallet exige un contrasigno
-Comment[id]=Jurik Dompet KDE meminta sandi
-Comment[is]=KDE Veskispúkinn biður um lykilorð
-Comment[it]=Il demone dei portafogli di KDE richiede una password
-Comment[ja]=KDE ウォレットデーモンがパスワードを要求しています
-Comment[kk]=KDE әмиян қызметі паролін қажет етеді
-Comment[km]=ដេមិន​កាបូប​របស់ KDE ស្នើ​ពាក្យសម្ងាត់
-Comment[kn]=ಕೆಡಿಇ ವಾಲೆಟ್‌ ಡೀಮನ್ ಗುಪ್ತಪದಕ್ಕಾಗಿ ಮನವಿ ಸಲ್ಲಿಸುತ್ತದೆ
-Comment[ko]=KDE 지갑 데몬에서 암호를 물어봅니다
-Comment[lt]=KDE slaptažodinių tarnyba prašo slaptažodžio
-Comment[lv]=KDE Maka dēmons pieprasa paroli
-Comment[mai]=KDE वालेट डेमान एकटा कूटशब्दकेँ आग्रह करैत अछि
-Comment[mk]=KDE даемонот за паричник побарува лозинка
-Comment[ml]=കെഡിയിലെ വാലറ്റ് നിരന്തരപ്രവൃത്തി ഒരു അടയാളവാക്കു് ചോദിയ്ക്കുന്നു
-Comment[mr]=केडीई पाकीट डीमनने गुप्तशब्दाची मागणी केली आहे.
-Comment[nb]=KDEs lommeboknisse ber om et passord
-Comment[nds]=De KDE-Knipp-Dämoon bruukt en Passwoort
-Comment[nl]=De KDE-portefeuille-daemon vereist een wachtwoord
-Comment[nn]=Lommeboktenesta i KDE treng eit passord
-Comment[pa]=KDE ਵਾਲਿਟ ਡੈਮਨ ਨੇ ਪਾਸਵਰਡ ਦੀ ਮੰਗ ਕੀਤੀ ਹੈ
-Comment[pl]=Demon Portfela KDE wymaga hasła
-Comment[pt]=O Servidor da Carteira do KDE está a pedir uma senha
-Comment[pt_BR]=O servidor de carteiras do KDE está solicitando uma senha
-Comment[ro]=Demonul de portofel KDE cere o parolă
-Comment[ru]=Бумажник KDE запрашивает пароль
-Comment[si]=The KDE පසුම්බි ඩීමනය මුරපදයක් ඉල්ලයි
-Comment[sk]=Démon KDE Wallet vyžaduje heslo
-Comment[sl]=Ozadnji program KDE-jeve Listnice zahteva geslo
-Comment[sr]=КДЕ‑ов демон новчаника захтева лозинку
-Comment[sr@ijekavian]=КДЕ‑ов демон новчаника захтијева лозинку
-Comment[sr@ijekavianlatin]=KDE‑ov demon novčanika zahtijeva lozinku
-Comment[sr@latin]=KDE‑ov demon novčanika zahteva lozinku
-Comment[sv]=KDE-plånboksdemonen begär ett lösenord
-Comment[tg]=Модули ҳамёни KDE паролро дархост мекунад
-Comment[th]=บริการกระเป๋าคุมข้อมูลของ KDE ร้องขอรหัสผ่าน
-Comment[tr]=KDE Cüzdan Servisi bir parola ister
-Comment[ug]=KDE ھەميان نازارەتچىسى ئىم سورايدۇ
-Comment[uk]=Фонова служба торбинок KDE надіслала запит на пароль
-Comment[vi]=Trình nền Wallet KDE yêu cầu một mật khẩu
-Comment[wa]=Li démon poite-manoye di KDE dimande on scret
-Comment[x-test]=xxThe KDE Wallet Daemon requests a passwordxx
-Comment[zh_CN]=KDE 钱包守护程序请求密码
-Comment[zh_TW]=KDE 錢包守護程式需要密碼
-Action=Popup
-
-[Event/syncFailed]
-Name=Sync Failed
-Name[ar]=فشل في المزامنة
-Name[bs]=Sinkronizacija nije uspjela
-Name[ca]=La sincronització ha fallat
-Name[ca@valencia]=La sincronització ha fallat
-Name[cs]=Synchronizace selhala
-Name[da]=Synkronisering mislykkedes
-Name[de]=Abgleich fehlgeschlagen
-Name[el]=Αποτυχία συγχρονισμού
-Name[en_GB]=Sync Failed
-Name[es]=Sincronización fallida
-Name[et]=Sünkroonimine nurjus
-Name[eu]=Sinkronizatzeak huts egin du
-Name[fa]=همگام‌سازی شکست خورد
-Name[fi]=Synkronointi epäonnistui
-Name[fr]=Échec de la synchronisation
-Name[gl]=Fallou a sincronización
-Name[hu]=A szinkronizálás meghiúsult
-Name[ia]=Il falleva synchronisar
-Name[id]=Sinkronisasi Gagal
-Name[is]=Samstilling mistókst
-Name[it]=Sincronizzazione non riuscita
-Name[kk]=Қадамдастыру жаңылды
-Name[ko]=동기화 실패
-Name[nb]=Synkronisering mislyktes
-Name[nds]=Synkroniseren is fehlslaan
-Name[nl]=Synchronisatie mislukt
-Name[nn]=Feil ved synkronisering
-Name[pa]=ਸਿੰਕ ਫੇਲ੍ਹ ਹੈ
-Name[pl]=Nieudana synchronizacja
-Name[pt]=A Sincronização Falhou
-Name[pt_BR]=Falha na sincronização
-Name[ro]=Sincronizare eșuată
-Name[ru]=Сбой записи
-Name[sk]=Synchronizácia zlyhala
-Name[sl]=Uskladitev spodletela
-Name[sr]=Синхронизација пропала
-Name[sr@ijekavian]=Синхронизација пропала
-Name[sr@ijekavianlatin]=Sinhronizacija propala
-Name[sr@latin]=Sinhronizacija propala
-Name[sv]=Synkronisering misslyckades
-Name[tr]=Eşitleme Başarısız
-Name[uk]=Спроба синхронізації зазнала невдачі
-Name[x-test]=xxSync Failedxx
-Name[zh_CN]=同步失败
-Name[zh_TW]=同步失敗
-Comment=KDE Wallet System failed to sync a wallet file to disk
-Comment[ar]=فشل نظام الحافظة في مزامنة ملف الحافظة إلى القرص
-Comment[bs]=Sistem KDE Wallet neuspio da sinhronizira datoteku novčanika s diskom
-Comment[ca]=El sistema de carteres del KDE ha fallat en sincronitzar un fitxer de cartera al disc
-Comment[ca@valencia]=El sistema de cartera del KDE ha fallat en sincronitzar un fitxer de cartera al disc
-Comment[cs]=Systému úschovny pro KDE selhala synchronizace úschovny na disk
-Comment[da]=KDE's tegnebogsystem kunne ikke synkronisere en tegnebogsfil til disken
-Comment[de]=Abgleich des KDE-Passwortspeicher mit einer Passwortspeicherdatei auf der Festplatte ist fehlgeschlagen.
-Comment[el]=Το σύστημα πορτοφολιού του KDE απέτυχε να συγχρονίσει ενός πορτοφολιού στον δίσκο
-Comment[en_GB]=KDE Wallet System failed to sync a wallet file to disk
-Comment[es]=El sistema de carteras de KDE ha fallado al sincronizar un archivo de cartera con el disco
-Comment[et]=KDE turvalaekasüsteem ei suutnud sünkroonida turvalaekafaili kettale
-Comment[eu]=KDE zorro-sistemak ezin izan du zorro bat diskora sinkronizatu
-Comment[fa]=سامانه کیف‌پول کی‌دی‌ای در همگام‌سازی  یک کیف‌پول در دیسک شکست خورد
-Comment[fi]=KDE:n lompakkojärjestelmä ei onnistunut tallentamaan lompakkotiedostoa levylle
-Comment[fr]=Le système du portefeuille de KDE n'a pas réussi à synchroniser un fichier de portefeuille sur le disque
-Comment[gl]=O sistema de carteiras de KDE non conseguiu sincronizar un ficheiro de carteira co disco
-Comment[hu]=A KDE jelszókezelő rendszer nem tudta szinkronizálni a jelszófájlt a lemezre
-Comment[ia]=Le sistema de portafolio de KDE (KDE Wallet System) falleva synchronisar un file de portafolio con le disco
-Comment[id]=Sistem Dompet KDE gagal sinkronisasi berkas dompet ke cakram
-Comment[is]=KDE Veskiskerfið náði ekki að samstilla veskisskrá á disk
-Comment[it]=Il sistema di portafogli di KDE non è riuscito a sincronizzare il file del portafogli sul disco
-Comment[kk]=KDE әмиян жүйесінің дискідегі әмиян файлымен қадамдастыру жаңылысы
-Comment[ko]=KDE 지갑 시스템과 디스크의 지갑 상태를 동기화할 수 없음
-Comment[nb]=KDE Wallet System klarte ikke å synkronisere en lommebokfil til disk
-Comment[nds]=Binnen KDE sien Knippsystem lett sik en Knipp nich mit de Datei op de Fastplaat synkroniseren
-Comment[nl]=Het lukte het KDE portefeuillesysteem niet om een portefeuillebestand naar schijf te synchroniseren
-Comment[nn]=Lommeboktenesta klarte ikkje synkronisera lommebokfila til disken
-Comment[pa]=KDE ਵਾਲਿਟ ਸਿਸਟਮ ਵਾਲਿਟ ਫਾਇਲ ਨੂੰ ਡਿਸਕ ਉੱਤੇ ਸਿੰਕ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ
-Comment[pl]=Nieudana synchronizacja pliku portfela przez System portfela KDE
-Comment[pt]=O sistema da Carteira do KDE não conseguiu sincronizar um ficheiro da carteira para o disco
-Comment[pt_BR]=O Sistema da Carteiras do KDE não conseguiu sincronizar um arquivo de carteira com o disco
-Comment[ro]=Sistemul de portofele KDE nu a putut sincroniza fișierul unui portofel cu discul
-Comment[ru]=Служба бумажника KDE не смогла записать файл бумажника на диск
-Comment[sk]=Systému KDE peňaženky sa nepodarilo synchronizovať súbor peňaženky na disk
-Comment[sl]=Sistem listnic za KDE ni uspel uskladiti datoteke z listnico na disku
-Comment[sr]=К‑новчаник не може да синхронизује фајл новчаника на диск
-Comment[sr@ijekavian]=К‑новчаник не може да синхронизује фајл новчаника на диск
-Comment[sr@ijekavianlatin]=K‑novčanik ne može da sinhronizuje fajl novčanika na disk
-Comment[sr@latin]=K‑novčanik ne može da sinhronizuje fajl novčanika na disk
-Comment[sv]=KDE:s plånbokssystem misslyckades synkronisera en plånboksfil till disk
-Comment[tr]=KDE Cüzdan Sistemi diske bir cüzdan dosyası eşitlerken başarısız oldu
-Comment[uk]=Система торбинок KDE не змогла синхронізувати дані файла торбинок з диском
-Comment[x-test]=xxKDE Wallet System failed to sync a wallet file to diskxx
-Comment[zh_CN]=KDE 钱包系统无法将钱包文件写入磁盘
-Comment[zh_TW]=KDE 錢包系統在將錢包檔同步到磁碟時失敗
-Action=Popup
diff --git a/kwalletd/kwalletsessionstore.cpp b/kwalletd/kwalletsessionstore.cpp
deleted file mode 100644 (file)
index 40559fb..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE Wallet Daemon
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "kwalletsessionstore.h"
-
-class KWalletSessionStore::Session
-{
-public:
-    QString m_service; // client dbus service (or empty)
-    int m_handle; // backend handle
-};
-
-KWalletSessionStore::KWalletSessionStore()
-{
-}
-
-KWalletSessionStore::~KWalletSessionStore()
-{
-    Q_FOREACH(const QList<Session*> &l, m_sessions) {
-        qDeleteAll(l);
-    }
-}
-
-void KWalletSessionStore::addSession(const QString &appid, const QString &service, int handle)
-{
-    Session *sess = new Session();
-    sess->m_service = service;
-    sess->m_handle = handle;
-    m_sessions[appid].append(sess);
-}
-
-bool KWalletSessionStore::hasSession(const QString &appid, int handle) const
-{
-    if (!m_sessions.contains(appid)) {
-        return false;
-    } else if (handle == -1) {
-        return true;
-    }
-    
-    QList<Session*>::const_iterator it;
-    QList<Session*>::const_iterator end = m_sessions[appid].constEnd();
-    for (it = m_sessions[appid].constBegin(); it != end; ++it) {
-        Q_ASSERT(*it);
-        if ((*it)->m_handle == handle) {
-            return true;
-        }
-    }
-    
-    return false;
-}
-
-QList<KWalletAppHandlePair> KWalletSessionStore::findSessions(const QString &service) const
-{
-    QList<KWalletAppHandlePair> rc;
-    QList<QString> sessionKeys(m_sessions.keys());
-    Q_FOREACH(const QString &appid, sessionKeys) {
-        Q_FOREACH(const Session *sess, m_sessions[appid]) {
-            Q_ASSERT(sess);
-            if (sess->m_service == service) {
-                rc.append(qMakePair(appid, sess->m_handle));
-            }
-        }
-    }
-    return rc;
-}
-
-bool KWalletSessionStore::removeSession(const QString &appid, const QString &service, int handle)
-{
-    if (!m_sessions.contains(appid)) {
-        return false;
-    }
-    
-    QList<Session*>::const_iterator it;
-    QList<Session*>::const_iterator end = m_sessions[appid].constEnd();
-    for (it = m_sessions[appid].constBegin(); it != end; ++it) {
-        Q_ASSERT(*it);
-        if ((*it)->m_service == service && (*it)->m_handle == handle) {
-            Session *sess = *it;
-            m_sessions[appid].removeAll(sess);
-            delete sess;
-            if (m_sessions[appid].isEmpty()) {
-                m_sessions.remove(appid);
-            }
-            return true;
-        }
-    }
-    
-    return false;
-}
-
-
-int KWalletSessionStore::removeAllSessions(const QString &appid, int handle)
-{
-    if (!m_sessions.contains(appid)) {
-        return false;
-    }
-    
-    QList<Session*>::iterator it;
-    QList<Session*>::iterator end = m_sessions[appid].end();
-    for (it = m_sessions[appid].begin(); it != end; ++it) {
-        Q_ASSERT(*it);
-        if ((*it)->m_handle == handle) {
-            delete *it;
-            *it = 0;
-        }
-    }
-    
-    int removed = m_sessions[appid].removeAll(0);
-    if (m_sessions[appid].isEmpty()) {
-        m_sessions.remove(appid);
-    }
-    
-    return removed;
-}
-
-int KWalletSessionStore::removeAllSessions(int handle) {
-    QList<QString> appremove;
-    int numrem = 0;
-    QList<QString> sessionKeys(m_sessions.keys());
-    Q_FOREACH(const QString &appid, sessionKeys) {
-        QList<Session*>::iterator it;
-        QList<Session*>::iterator end = m_sessions[appid].end();
-        for (it = m_sessions[appid].begin(); it != end; ++it) {
-            Q_ASSERT(*it);
-            if ((*it)->m_handle == handle) {
-                delete *it;
-                *it = 0;
-                numrem++;
-            }
-        }
-        // remove all zeroed sessions
-        m_sessions[appid].removeAll(0);
-        if (m_sessions[appid].isEmpty()) {
-            appremove.append(appid);
-        }
-    }
-    
-    // now remove all applications without sessions
-    Q_FOREACH(const QString &appid, appremove) {
-        m_sessions.remove(appid);
-    }
-    
-    return numrem;
-}
-
-QStringList KWalletSessionStore::getApplications(int handle) const {
-    QStringList rc;
-    Q_FOREACH(const QString &appid, m_sessions.uniqueKeys()) {
-        if (hasSession(appid, handle)) {
-            rc.append(appid);
-        }
-    }
-    return rc;
-}
diff --git a/kwalletd/kwalletsessionstore.h b/kwalletd/kwalletsessionstore.h
deleted file mode 100644 (file)
index 01b24fa..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE Wallet Daemon
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef _KWALLETSESSIONSTORE_H_
-#define _KWALLETSESSIONSTORE_H_
-
-#include <QPair>
-#include <QString>
-#include <QList>
-#include <QHash>
-#include <QStringList>
-
-typedef QPair<QString,int> KWalletAppHandlePair;
-
-class KWalletSessionStore
-{
-public:
-    KWalletSessionStore();
-    ~KWalletSessionStore();
-    
-    // add a new session
-    void addSession(const QString &appid, const QString &service, int handle);
-    // check if the application has a session using that handle
-    bool hasSession(const QString &appid, int handle = -1) const;
-    // find all sessions a service has
-    QList<KWalletAppHandlePair> findSessions(const QString &service) const;
-    // remove a specific session
-    bool removeSession(const QString &appid, const QString &service, int handle);
-    // remove all sessions an application has to a specific handle
-    int removeAllSessions(const QString &appid, int handle);
-    // remove all sessions related to a handle
-    int removeAllSessions(int handle);
-    // get all applications using a handle
-    QStringList getApplications(int handle) const;
-
-private:
-    class Session;
-    QHash< QString,QList<Session*> > m_sessions; // appid => session
-};
-
-#endif // _KWALLETSESSIONSTORE_H_
diff --git a/kwalletd/kwalletwizard.cpp b/kwalletd/kwalletwizard.cpp
deleted file mode 100644 (file)
index 39e14a2..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/* This file is part of the KDE libraries
-   Copyright (C) 2004 George Staikos <staikos@kde.org>
-
-   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; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#include "kwalletwizard.h"
-#include "moc_kwalletwizard.cpp"
-
-#include "ui_kwalletwizardpageexplanation.h"
-#include "ui_kwalletwizardpageintro.h"
-#include "ui_kwalletwizardpageoptions.h"
-#include "ui_kwalletwizardpagepassword.h"
-
-#include <QButtonGroup>
-
-#include <klocale.h>
-#include <kiconloader.h>
-
-class PageIntro : public QWizardPage
-{
-public:
-    PageIntro(QWidget *parent)
-        : QWizardPage(parent)
-    {
-        ui.setupUi(this);
-
-        ui.ktitlewidget->setText("<h1>" + i18n("KWallet") + "</h1>");
-
-        int iconSize = 3 * fontMetrics().height();
-        // round to multiple of 16
-        iconSize = (iconSize + 8) & ~15;
-        QPixmap pix = KIconLoader::global()->loadIcon("kwalletmanager", KIconLoader::Dialog, iconSize);
-        ui.ktitlewidget->setPixmap(pix);
-
-        bg = new QButtonGroup(this);
-        bg->setExclusive(true);
-        bg->addButton(ui._basic, 0);
-        bg->addButton(ui._advanced, 1);
-
-        // force the "basic" button to be selected
-        ui._basic->setChecked(true);
-    }
-
-    QButtonGroup *bg;
-
-private:
-    Ui::KWalletWizardPageIntro ui;
-};
-
-class PagePassword : public QWizardPage
-{
-public:
-    PagePassword(QWidget *parent)
-        : QWizardPage(parent)
-    {
-
-        ui.setupUi(this);
-
-        registerField("useWallet", ui._useWallet);
-        registerField("pass1", ui._pass1);
-        registerField("pass2", ui._pass2);
-
-        connect(ui._useWallet, SIGNAL(clicked()), parent, SLOT(passwordPageUpdate()));
-        connect(ui._pass1, SIGNAL(textChanged(QString)), parent, SLOT(passwordPageUpdate()));
-        connect(ui._pass2, SIGNAL(textChanged(QString)), parent, SLOT(passwordPageUpdate()));
-    }
-
-    virtual int nextId() const
-    {
-        return static_cast<KWalletWizard*>(wizard())->wizardType() == KWalletWizard::Basic ? -1 : KWalletWizard::PageOptionsId;
-    }
-
-    void setMatchLabelText(const QString &text)
-    {
-        ui._matchLabel->setText(text);
-    }
-
-private:
-    Ui::KWalletWizardPagePassword ui;
-};
-
-class PageOptions : public QWizardPage
-{
-public:
-    PageOptions(QWidget *parent)
-        : QWizardPage(parent)
-    {
-        ui.setupUi(this);
-
-        registerField("closeWhenIdle", ui._closeIdle);
-        registerField("networkWallet", ui._networkWallet);
-    }
-
-private:
-    Ui::KWalletWizardPageOptions ui;
-};
-
-
-class PageExplanation : public QWizardPage
-{
-public:
-    PageExplanation(QWidget *parent)
-        : QWizardPage(parent)
-    {
-        ui.setupUi(this);
-        setFinalPage(true);
-    }
-
-private:
-    Ui::KWalletWizardPageExplanation ui;
-};
-
-
-
-KWalletWizard::KWalletWizard( QWidget *parent )
-    : QWizard(parent)
-{
-    setOption(HaveFinishButtonOnEarlyPages);
-
-    m_pageIntro = new PageIntro(this);
-    setPage(PageIntroId, m_pageIntro);
-    m_pagePasswd = new PagePassword(this);
-    setPage(PagePasswordId, m_pagePasswd);
-    setPage(PageOptionsId, new PageOptions(this));
-    setPage(PageExplanationId, new PageExplanation(this));
-    
-    resize(500, 420);
-}
-
-void KWalletWizard::passwordPageUpdate()
-{
-    bool complete = true;
-    if (field("useWallet").toBool()) {
-        if (field("pass1").toString() == field("pass2").toString()) {
-            if (field("pass1").toString().isEmpty()) {
-                m_pagePasswd->setMatchLabelText(i18n("<qt>Password is empty.  <b>(WARNING: Insecure)</b></qt>"));
-            } else {
-                m_pagePasswd->setMatchLabelText(i18n("Passwords match."));
-            }
-        } else {
-            m_pagePasswd->setMatchLabelText(i18n("Passwords do not match."));
-            complete = false;
-        }
-    } else {
-        m_pagePasswd->setMatchLabelText(QString());
-    }
-    button(wizardType() == Basic ? FinishButton : NextButton)->setEnabled(complete);
-}
-
-KWalletWizard::WizardType KWalletWizard::wizardType() const
-{
-    return (KWalletWizard::WizardType)m_pageIntro->bg->checkedId();
-}
-
-void KWalletWizard::initializePage(int id)
-{
-    switch (id) {
-        case PagePasswordId: {
-            bool islast = m_pageIntro->bg->checkedId() == 0;
-            m_pagePasswd->setFinalPage(islast);
-            button(NextButton)->setVisible(!islast);
-            break;
-        }
-    }
-}
diff --git a/kwalletd/kwalletwizard.h b/kwalletd/kwalletwizard.h
deleted file mode 100644 (file)
index c5939dd..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This file is part of the KDE libraries
-   Copyright (C) 2004 George Staikos <staikos@kde.org>
-
-   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; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef KWALLETWIZARD_H
-#define KWALLETWIZARD_H
-
-#include <QWizard>
-
-class PagePassword;
-class PageIntro;
-
-class KWalletWizard : public QWizard
-{
-  Q_OBJECT
-public:
-
-    enum WizardType
-    {
-        Basic,
-        Advanced
-    };
-
-    static const int PageIntroId = 0;
-    static const int PagePasswordId = 1;
-    static const int PageOptionsId = 2;
-    static const int PageExplanationId = 3;
-
-    KWalletWizard( QWidget *parent = 0 );
-
-    WizardType wizardType() const;
-
-protected:
-    virtual void initializePage(int id);
-
-protected Q_SLOTS:
-    void passwordPageUpdate();
-
-private:
-    PageIntro *m_pageIntro;
-    PagePassword *m_pagePasswd;
-};
-
-#endif
diff --git a/kwalletd/kwalletwizardpageexplanation.ui b/kwalletd/kwalletwizardpageexplanation.ui
deleted file mode 100644 (file)
index aee7fc1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>KWalletWizardPageExplanation</class>
- <widget class="QWidget" name="KWalletWizardPageExplanation">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>478</width>
-    <height>215</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout">
-   <item>
-    <widget class="QLabel" name="textLabel2_3">
-     <property name="text">
-      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The KDE Wallet system stores your data in a &lt;span style=&quot; font-style:italic;&quot;&gt;wallet&lt;/span&gt; file on your local hard disk. The data is only written in the encrypted form of your choice - blowfish algorithm with your password as the key. When a wallet is opened, the wallet manager application will launch and display an icon in the system tray. You can use this application to manage all of your wallets. It even permits you to drag wallets and wallet contents, allowing you to easily copy a wallet to a remote system.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-     </property>
-     <property name="textFormat">
-      <enum>Qt::RichText</enum>
-     </property>
-     <property name="wordWrap">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/kwalletd/kwalletwizardpageintro.ui b/kwalletd/kwalletwizardpageintro.ui
deleted file mode 100644 (file)
index af8c218..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>KWalletWizardPageIntro</class>
- <widget class="QWidget" name="KWalletWizardPageIntro">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>449</width>
-    <height>327</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="KTitleWidget" name="ktitlewidget">
-     <property name="comment">
-      <string>The KDE Wallet System</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QLabel" name="textLabel2">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string>Welcome to KWallet, the KDE Wallet System.  KWallet allows you to store your passwords and other personal information on disk in an encrypted file, preventing others from viewing the information.  This wizard will tell you about KWallet and help you configure it for the first time.</string>
-     </property>
-     <property name="textFormat">
-      <enum>Qt::RichText</enum>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignVCenter</set>
-     </property>
-     <property name="wordWrap">
-      <bool>true</bool>
-     </property>
-     <property name="margin">
-      <number>12</number>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Fixed</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <layout class="QVBoxLayout">
-       <item>
-        <widget class="QRadioButton" name="_basic">
-         <property name="text">
-          <string>&amp;Basic setup (recommended)</string>
-         </property>
-         <property name="checked">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QRadioButton" name="_advanced">
-         <property name="text">
-          <string>&amp;Advanced setup</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>21</width>
-       <height>21</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KTitleWidget</class>
-   <extends>QWidget</extends>
-   <header>ktitlewidget.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/kwalletd/kwalletwizardpageoptions.ui b/kwalletd/kwalletwizardpageoptions.ui
deleted file mode 100644 (file)
index 0defc87..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<ui version="4.0" >
- <class>KWalletWizardPageOptions</class>
- <widget class="QWidget" name="KWalletWizardPageOptions" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>436</width>
-    <height>214</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" >
-   <item>
-    <widget class="QLabel" name="textLabel1_3" >
-     <property name="text" >
-      <string>The KDE Wallet system allows you to control the level of security of your personal data.  Some of these settings do impact usability.  While the default settings are generally acceptable for most users, you may wish to change some of them.  You may further tune these settings from the KWallet control module.</string>
-     </property>
-     <property name="textFormat" >
-      <enum>Qt::RichText</enum>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignVCenter</set>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::MinimumExpanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>21</width>
-       <height>10</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item>
-    <widget class="QCheckBox" name="_closeIdle" >
-     <property name="text" >
-      <string>Automatically close idle wallets</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QCheckBox" name="_networkWallet" >
-     <property name="text" >
-      <string>Store network passwords and local passwords in separate wallet files</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::MinimumExpanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>21</width>
-       <height>10</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/kwalletd/kwalletwizardpagepassword.ui b/kwalletd/kwalletwizardpagepassword.ui
deleted file mode 100644 (file)
index 3c45034..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-<ui version="4.0" >
- <class>KWalletWizardPagePassword</class>
- <widget class="QWidget" name="KWalletWizardPagePassword" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>526</width>
-    <height>401</height>
-   </rect>
-  </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" colspan="4" >
-    <widget class="QLabel" name="textLabel3" >
-     <property name="text" >
-      <string>Various applications may attempt to use the KDE wallet to store passwords or other information such as web form data and cookies.  If you would like these applications to use the wallet, you must enable it now and choose a password.  The password you choose &lt;i>cannot&lt;/i> be recovered if it is lost, and will allow anyone who knows it to obtain all the information contained in the wallet.</string>
-     </property>
-     <property name="textFormat" >
-      <enum>Qt::RichText</enum>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" colspan="4" >
-    <widget class="QCheckBox" name="_useWallet" >
-     <property name="text" >
-      <string>Yes, I wish to use the KDE wallet to store my personal information.</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" colspan="2" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>21</width>
-       <height>51</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="3" column="0" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>111</width>
-       <height>31</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="3" column="1" >
-    <layout class="QVBoxLayout" >
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <property name="leftMargin" >
-      <number>0</number>
-     </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="QLabel" name="textLabel1_3" >
-       <property name="enabled" >
-        <bool>false</bool>
-       </property>
-       <property name="text" >
-        <string>Enter a new password:</string>
-       </property>
-       <property name="alignment" >
-        <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
-       </property>
-       <property name="buddy" >
-        <cstring>_pass1</cstring>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="textLabel2_3" >
-       <property name="enabled" >
-        <bool>false</bool>
-       </property>
-       <property name="text" >
-        <string>Verify password:</string>
-       </property>
-       <property name="alignment" >
-        <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
-       </property>
-       <property name="buddy" >
-        <cstring>_pass2</cstring>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="3" column="2" >
-    <layout class="QVBoxLayout" >
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <property name="leftMargin" >
-      <number>0</number>
-     </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="KLineEdit" name="_pass1" >
-       <property name="enabled" >
-        <bool>false</bool>
-       </property>
-       <property name="echoMode" >
-        <enum>QLineEdit::Password</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="KLineEdit" name="_pass2" >
-       <property name="enabled" >
-        <bool>false</bool>
-       </property>
-       <property name="echoMode" >
-        <enum>QLineEdit::Password</enum>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="3" column="3" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>101</width>
-       <height>21</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="4" column="1" colspan="2" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>21</width>
-       <height>70</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="5" column="0" colspan="4" >
-    <widget class="QLabel" name="_matchLabel" >
-     <property name="text" >
-      <string/>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>_useWallet</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>textLabel1_3</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>108</x>
-     <y>119</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>217</x>
-     <y>226</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_useWallet</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_pass1</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>455</x>
-     <y>125</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>394</x>
-     <y>226</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_useWallet</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>textLabel2_3</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>60</x>
-     <y>120</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>131</x>
-     <y>257</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_useWallet</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_pass2</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>487</x>
-     <y>124</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>371</x>
-     <y>257</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_useWallet</sender>
-   <signal>clicked()</signal>
-   <receiver>_pass1</receiver>
-   <slot>setFocus()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>259</x>
-     <y>119</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>269</x>
-     <y>237</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/kwalletd/main.cpp b/kwalletd/main.cpp
deleted file mode 100644 (file)
index d073af3..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
-  * This file is part of the KDE project
-  * Copyright (C) 2008 Michael Leupold <lemma@confuego.org>
-  * Copyright (C) 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library 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
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#include <kuniqueapplication.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kconfig.h>
-#include <kconfiggroup.h>
-#include <klocale.h>
-#include <qplatformdefs.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <unistd.h>
-#include "kwalletd.h"
-#include "backend/kwalletbackend.h" // For the hash size
-
-#define BSIZE 1000
-
-static int pipefd = 0;
-static int socketfd = 0;
-
-static bool isWalletEnabled()
-{
-    KConfig cfg("kwalletrc");
-    KConfigGroup walletGroup(&cfg, "Wallet");
-    return walletGroup.readEntry("Enabled", true);
-}
-
-//Waits until the PAM_MODULE sends the hash
-static char *waitForHash()
-{
-    printf("kwalletd: Waiting for hash on %d-\n", pipefd);
-    int totalRead = 0;
-    int readBytes = 0;
-    int attemps = 0;
-    char *buf = (char*)malloc(sizeof(char) * KWALLET_SHA512_KEYSIZE);
-    memset(buf, '\0', KWALLET_SHA512_KEYSIZE);
-    while(totalRead != KWALLET_SHA512_KEYSIZE) {
-        readBytes = read(pipefd, buf + totalRead, KWALLET_SHA512_KEYSIZE - totalRead);
-        if (readBytes == -1 || attemps > 5) {
-            free(buf);
-            return NULL;
-        }
-        totalRead += readBytes;
-        ++attemps;
-    }
-
-    close(pipefd);
-    return buf;
-}
-
-//Waits until startkde sends the environment variables
-static int waitForEnvironment()
-{
-    printf("kwalletd: waitingForEnvironment on: %d\n", socketfd);
-
-    int s2;
-    struct sockaddr_un remote;
-    QT_SOCKLEN_T t = sizeof(remote);
-    if ((s2 = accept(socketfd, (struct sockaddr *)&remote, &t)) == -1) {
-        fprintf(stdout, "kwalletd: Couldn't accept incoming connection\n");
-        return -1;
-    }
-    printf("kwalletd: client connected\n");
-
-    char str[BSIZE];
-    memset(str, '\0', sizeof(char) * BSIZE);
-
-    int chop = 0;
-    FILE *s3 = fdopen(s2, "r");
-    while(!feof(s3)) {
-        if (fgets(str, BSIZE, s3)) {
-            chop = strlen(str) - 1;
-            str[chop] = '\0';
-            putenv(strdup(str));
-        }
-    }
-    printf("kwalletd: client disconnected\n");
-    close(socketfd);
-    return 1;
-}
-
-char* checkPamModule(int argc, char **argv)
-{
-    printf("Checking for pam module\n");
-    char *hash = NULL;
-    int x = 1;
-    for (; x < argc; ++x) {
-        if (strcmp(argv[x], "--pam-login") != 0) {
-            continue;
-        }
-        printf("Got pam-login\n");
-        argv[x] = NULL;
-        x++;
-        //We need at least 2 extra arguments after --pam-login
-        if (x + 1 > argc) {
-            printf("Invalid arguments (less than needed)\n");
-            return NULL;
-        }
-
-        //first socket for the hash, comes from a pipe
-        pipefd = atoi(argv[x]);
-        argv[x] = NULL;
-        x++;
-        //second socket for environemtn, comes from a localsock
-        socketfd = atoi(argv[x]);
-        argv[x] = NULL;
-        break;
-    }
-
-    if (!pipefd || !socketfd) {
-        printf("Lacking a socket, pipe: %d, env:%d\n", pipefd, socketfd);
-        return NULL;
-    }
-
-    hash = waitForHash();
-
-    if (hash == NULL || waitForEnvironment() == -1) {
-        printf("Hash or environment not received\n");
-        return NULL;
-    }
-
-    return hash;
-}
-
-int main(int argc, char **argv)
-{
-    // check if kwallet is disabled
-    const bool enabled = isWalletEnabled();
-    if (!enabled) {
-        kDebug() << "kwalletd is disabled!";
-    }
-
-    char *hash = NULL;
-    if (enabled && getenv("PAM_KWALLET_LOGIN")) {
-        hash = checkPamModule(argc, argv);
-    }
-
-    KAboutData aboutdata("kwalletd", 0, ki18n("KDE Wallet Service"),
-                         "0.3", ki18n("KDE Wallet Service"),
-                         KAboutData::License_LGPL, ki18n("(C) 2002-2008 George Staikos, Michael Leupold, Thiago Maceira, Valentin Rusu"));
-    aboutdata.addAuthor(ki18n("Michael Leupold"),ki18n("Maintainer"),"lemma@confuego.org");
-    aboutdata.addAuthor(ki18n("George Staikos"),ki18n("Former maintainer"),"staikos@kde.org");
-    aboutdata.addAuthor(ki18n("Thiago Maceira"),ki18n("D-Bus Interface"),"thiago@kde.org");
-
-    aboutdata.setProgramIconName("kwalletmanager");
-
-    KCmdLineArgs::init( argc, argv, &aboutdata );
-    KUniqueApplication::addCmdLineOptions();
-    KUniqueApplication app;
-
-    // This app is started automatically, no need for session management
-    app.disableSessionManagement();
-    app.setQuitOnLastWindowClosed( false );
-
-    if (!KUniqueApplication::start()) {
-        kDebug() << "kwalletd is already running!";
-        return (0);
-    }
-
-    kDebug() << "kwalletd started";
-    KWalletD walletd;
-    if (hash) {
-        kDebug() << "LOGIN INSIDE!";
-        QByteArray passHash(hash, KWALLET_SHA512_KEYSIZE);
-        int wallet = walletd.pamOpen(KWallet::Wallet::LocalWallet(), passHash, 0);
-        kDebug() << "Wallet handler: " << wallet;
-        free(hash);
-    } else {
-        kDebug() << "Not pam login";
-    }
-    return app.exec();
-}
diff --git a/kwalletd/org.kde.kwalletd.service.in b/kwalletd/org.kde.kwalletd.service.in
deleted file mode 100644 (file)
index f40fc71..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=org.kde.kwalletd
-Exec=@CMAKE_INSTALL_PREFIX@/bin/kwalletd
\ No newline at end of file
diff --git a/kwalletd/tests/CMakeLists.txt b/kwalletd/tests/CMakeLists.txt
deleted file mode 100644 (file)
index 4e13d33..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# Tests don't need to go into toplevel/bin, they are fine in the current dir.
-include_directories(
-   ${CMAKE_CURRENT_SOURCE_DIR}/..
-)
-
-set(kwalletwizardtest_SRCS
-   kwalletwizardtest.cpp
-   ../kwalletwizard.cpp
-   ../kbetterthankdialogbase.ui
-   ../kwalletwizardpageexplanation.ui
-   ../kwalletwizardpageintro.ui
-   ../kwalletwizardpageoptions.ui
-   ../kwalletwizardpagepassword.ui
-)
-
-kde4_add_manual_test(kwalletwizardtest ${kwalletwizardtest_SRCS})
-target_link_libraries(kwalletwizardtest ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY})
-
-include_directories( ${KDE4_KDEUI_INCLUDES} ) # for kwallet.h
-
-########### next target ###############
-
-set(kwalletasync_SRCS kwalletasync.cpp kwallettest.cpp )
-
-
-kde4_add_manual_test(kwalletasync ${kwalletasync_SRCS})
-
-target_link_libraries(kwalletasync ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletsync_SRCS kwalletsync.cpp )
-
-
-kde4_add_manual_test(kwalletsync ${kwalletsync_SRCS})
-
-target_link_libraries(kwalletsync  ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletpath_SRCS kwalletpath.cpp )
-
-
-kde4_add_manual_test(kwalletpath ${kwalletpath_SRCS})
-
-target_link_libraries(kwalletpath  ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletboth_SRCS kwalletboth.cpp kwallettest.cpp )
-
-
-kde4_add_manual_test(kwalletboth ${kwalletboth_SRCS})
-
-target_link_libraries(kwalletboth  ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletmany_SRCS kwalletmany.cpp)
-
-
-kde4_add_manual_test(kwalletmany ${kwalletmany_SRCS})
-
-target_link_libraries(kwalletmany  ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletautoclose_SRCS kwalletautoclose.cpp)
-
-
-kde4_add_manual_test(kwalletautoclose ${kwalletautoclose_SRCS})
-
-target_link_libraries(kwalletautoclose  ${KDE4_KDEUI_LIBS} )
-
-
-########### next target ###############
-
-set(kwalletnoautoclose_SRCS kwalletnoautoclose.cpp)
-
-
-kde4_add_manual_test(kwalletnoautoclose ${kwalletnoautoclose_SRCS})
-
-target_link_libraries(kwalletnoautoclose  ${KDE4_KDEUI_LIBS} )
-
-
-########### install files ###############
-
diff --git a/kwalletd/tests/README b/kwalletd/tests/README
deleted file mode 100644 (file)
index 73c3ad1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Tests for opening the wallet synchronously and asynchronously
-
-kwalletsync - open synchronously
-kwalletasync - open asynchronously
-kwalletboth - start opening asynchronously, then, during the async call, open synchronously
diff --git a/kwalletd/tests/kwalletasync.cpp b/kwalletd/tests/kwalletasync.cpp
deleted file mode 100644 (file)
index 8864fff..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <QtCore/QTextStream>
-#include <QApplication>
-#include <QtCore/QTimer>
-
-#include <kaboutdata.h>
-#include <kcomponentdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kglobal.h>
-#include <kstandarddirs.h>
-#include <kwallet.h>
-#include <QtDBus/QDBusConnectionInterface>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusReply>
-#include <klocale.h>
-
-#include "kwallettest.h"
-
-static QTextStream _out( stdout, QIODevice::WriteOnly );
-
-void openWallet()
-{
-    _out << "About to ask for wallet async" << endl;
-
-    // we have no wallet: ask for one.
-    KWallet::Wallet *wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Asynchronous );
-
-    WalletReceiver r;
-    r.connect( wallet, SIGNAL( walletOpened(bool) ), SLOT( walletOpened(bool) ) );
-
-    _out << "About to start 30 second event loop" << endl;
-
-    QTimer::singleShot( 30000, qApp, SLOT( quit() ) );
-    int ret = qApp->exec();
-
-    if ( ret == 0 ) {
-        _out << "Timed out!" << endl;
-    } else {
-        _out << "Success!" << endl;
-    }
-}
-
-void WalletReceiver::walletOpened( bool got )
-{
-    _out << "Got async wallet: " << got << endl;
-    qApp->exit( 1 );
-}
-
-int main( int argc, char *argv[] )
-{
-    KAboutData aboutData("kwalletasync", 0, ki18n("kwalletasync"), "version");
-    KComponentData componentData(&aboutData);
-    QApplication app( argc, argv );
-
-    // force name with D-BUS
-    QDBusReply<QDBusConnectionInterface::RegisterServiceReply> reply
-        = QDBusConnection::sessionBus().interface()->registerService( "org.kde.kwalletasync",
-                                                            QDBusConnectionInterface::ReplaceExistingService );
-
-    if ( !reply.isValid() ) {
-        _out << "D-BUS name request returned " << reply.error().name() << endl;
-    }
-
-    openWallet();
-
-    return 0;
-}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/kwalletd/tests/kwalletautoclose.cpp b/kwalletd/tests/kwalletautoclose.cpp
deleted file mode 100644 (file)
index 6aedd4a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#include <QTextStream>
-#include <KAboutData>
-#include <KApplication>
-#include <KCmdLineArgs>
-#include <QTimer>
-#include <KWallet/Wallet>
-#include <klocale.h>
-
-#include "kwalletautoclose.h"
-
-using namespace KWallet;
-
-static QTextStream _out(stdout, QIODevice::WriteOnly);
-
-KWalletAutoClose::KWalletAutoClose() : QObject()
-{
-}
-
-void KWalletAutoClose::openWallet()
-{
-    _out << "Opening wallet synchronously" << endl;
-    Wallet *wallet = Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Synchronous);
-    _out << "Exiting without closing. The wallet should autoclose." << endl;
-    Q_UNUSED(wallet);
-    kapp->exit(0);
-}
-
-int main(int argc, char *argv[]) 
-{
-    KAboutData aboutData("kwalletmany", 0, ki18n("kwalletmany"), "version");
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
-    KWalletAutoClose m;
-    
-    QTimer::singleShot(0, &m, SLOT(openWallet()));
-    
-    return app.exec();
-}
-
-#include "moc_kwalletautoclose.cpp"
diff --git a/kwalletd/tests/kwalletautoclose.h b/kwalletd/tests/kwalletautoclose.h
deleted file mode 100644 (file)
index 51c4390..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#ifndef KWALLETAUTOCLOSE_H
-#define KWALLETAUTOCLOSE_H
-
-#include <QObject>
-
-class KWalletAutoClose : public QObject
-{
-    Q_OBJECT
-
-public:
-    KWalletAutoClose();
-
-public Q_SLOTS:
-    void openWallet();
-};
-
-#endif // KWALLETAUTOCLOSE_H
diff --git a/kwalletd/tests/kwalletboth.cpp b/kwalletd/tests/kwalletboth.cpp
deleted file mode 100644 (file)
index 08fdfa0..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#include <QtCore/QTextStream>
-#include <QtCore/QTimer>
-#include <QtCore/QMap>
-#include <QApplication>
-
-#include <kaboutdata.h>
-#include <kcomponentdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kglobal.h>
-#include <kstandarddirs.h>
-#include <kwallet.h>
-#include <QtDBus/QDBusConnectionInterface>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusReply>
-#include <klocale.h>
-
-#include "kwallettest.h"
-
-static QTextStream _out( stdout, QIODevice::WriteOnly );
-
-void openWallet()
-{
-    _out << "About to ask for wallet async" << endl;
-
-    // we have no wallet: ask for one.
-    KWallet::Wallet *wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Asynchronous );
-
-    WalletReceiver r;
-    r.connect( wallet, SIGNAL( walletOpened(bool) ), SLOT( walletOpened(bool) ) );
-
-    _out << "About to ask for wallet sync" << endl;
-
-    wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Synchronous );
-
-    _out << "Got sync wallet: " << (wallet != 0) << endl;
-    _out << "About to start 30 second event loop" << endl;
-
-    QTimer::singleShot( 30000, qApp, SLOT( quit() ) );
-    int ret = qApp->exec();
-
-    if ( ret == 0 ) {
-        _out << "Timed out!" << endl;
-    } else {
-        _out << "Success!" << endl;
-    }
-
-    QMap<QString,QString> p;
-    ret = wallet->readPasswordList("*", p);
-    _out << "readPasswordList returned: " << ret << endl;
-    _out << "readPasswordList returned " << p.keys().count() << " entries" << endl;
-    QMap<QString, QMap<QString, QString> > q;
-    ret = wallet->readMapList("*", q);
-    _out << "readMapList returned: " << ret << endl;
-    _out << "readMapList returned " << q.keys().count() << " entries" << endl;
-
-    QMap<QString, QByteArray> s;
-    ret = wallet->readEntryList("*", s);
-    _out << "readEntryList returned: " << ret << endl;
-    _out << "readEntryList returned " << s.keys().count() << " entries" << endl;
-
-    delete wallet;
-}
-
-void WalletReceiver::walletOpened( bool got )
-{
-    _out << "Got async wallet: " << got << endl;
-    qApp->exit( 1 );
-}
-
-int main( int argc, char *argv[] )
-{
-    KAboutData aboutData("kwalletboth", 0, ki18n("kwalletboth"), "version");
-    KComponentData componentData(&aboutData);
-    QApplication app( argc, argv );
-
-    // force name with D-BUS
-    QDBusReply<QDBusConnectionInterface::RegisterServiceReply> reply
-        = QDBusConnection::sessionBus().interface()->registerService( "org.kde.kwalletboth",
-                                                            QDBusConnectionInterface::ReplaceExistingService );
-
-    if ( !reply.isValid() ) {
-        _out << "D-BUS name request returned " << reply.error().name() << endl;
-    }
-
-    openWallet();
-
-    return 0;
-}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/kwalletd/tests/kwalletmany.cpp b/kwalletd/tests/kwalletmany.cpp
deleted file mode 100644 (file)
index aa8c295..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#include <QTextStream>
-#include <QTimer>
-#include <QThread>
-#include <KAboutData>
-#include <KApplication>
-#include <KCmdLineArgs>
-#include <KWallet/Wallet>
-#include <klocale.h>
-
-#include "kwalletmany.h"
-
-#define NUMWALLETS 10
-
-using namespace KWallet;
-
-static QTextStream _out(stdout, QIODevice::WriteOnly);
-
-KWalletMany::KWalletMany() : QObject(), _pending(10)
-{
-}
-
-KWalletMany::~KWalletMany()
-{
-}
-
-void KWalletMany::walletOpened(bool open)
-{
-    _out << "Got async wallet: " << (open) << endl;
-    --_pending;
-    if (_pending == 0) {
-        quit();
-    }
-}
-
-void KWalletMany::quit()
-{
-    if (_pending == 0) {
-        _out << "Success!" << endl;
-    } else {
-        _out << "Failed: " << _pending << " requests were not handled!" << endl;
-    }
-    _loop.quit();
-}
-
-void KWalletMany::openWallet()
-{
-    QEventLoop waitLoop;
-    
-    // open plenty of wallets in synchronous and asynchronous mode
-    for (int i = 0; i < NUMWALLETS; ++i) {
-        // request asynchronous wallet
-        _out << "About to ask for wallet async" << endl;
-        Wallet *wallet;
-        wallet = Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Asynchronous);
-        connect(wallet, SIGNAL(walletOpened(bool)), SLOT(walletOpened(bool)));
-        _wallets.append(wallet);
-        
-        QTimer::singleShot(500, &waitLoop, SLOT(quit()));
-        waitLoop.exec();
-    }
-    
-    _loop.exec();
-    while (!_wallets.isEmpty()) {
-        delete _wallets.takeFirst();
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    KAboutData aboutData("kwalletmany", 0, ki18n("kwalletmany"), "version");
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
-    KWalletMany m;
-    
-    QTimer::singleShot(0, &m, SLOT(openWallet()));
-    QTimer::singleShot(30000, &m, SLOT(quit()));
-    
-    return app.exec();
-}
-
-#include "moc_kwalletmany.cpp"
diff --git a/kwalletd/tests/kwalletmany.h b/kwalletd/tests/kwalletmany.h
deleted file mode 100644 (file)
index 6fcaef4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#ifndef KWALLETMANY_H
-#define KWALLETMANY_H
-
-#include <QObject>
-#include <QList>
-#include <QEventLoop>
-#include <QWaitCondition>
-
-namespace KWallet { class Wallet; }
-
-class KWalletMany : public QObject
-{
-    Q_OBJECT
-    
-public:
-    KWalletMany();
-    ~KWalletMany();
-    
-public slots:
-    void openWallet();
-    void quit();
-    void walletOpened(bool open);
-    
-private:
-    QList<KWallet::Wallet*> _wallets;
-    int _pending;
-    QEventLoop _loop;
-};
-
-#endif // KWALLETMANY_H
diff --git a/kwalletd/tests/kwalletnoautoclose.cpp b/kwalletd/tests/kwalletnoautoclose.cpp
deleted file mode 100644 (file)
index e2acf4f..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-// -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
-/*
-   This file is part of the KDE libraries
-
-   Copyright (c) 2008 Michael Leupold <lemma@confuego.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-
-*/
-
-#include <QTextStream>
-#include <KAboutData>
-#include <KApplication>
-#include <KCmdLineArgs>
-#include <QEventLoop>
-#include <QtDBus>
-#include <klocale.h>
-
-static QTextStream _out(stdout, QIODevice::WriteOnly);
-static QString _kdewallet;
-
-int openAndClose()
-{
-    QDBusInterface service("org.kde.kwalletd", "/modules/kwalletd");
-    if (!service.isValid()) {
-        _out << "Constructed service is invalid!" << endl;
-        return 1;
-    }
-    
-    QDBusReply<int> h = service.call(QDBus::Block, "open", _kdewallet, (qlonglong)0, "kwalletnoautoclose");
-    if (!h.isValid() || h.value() < 0) {
-        _out << "Opening the wallet failed!" << endl;
-        _out << "Error: " << h.error().message() << endl;
-        return 1;
-    } else {
-        _out << "Wallet opened." << endl;
-    }
-
-    _out << "closing the wallet" << endl;
-    QDBusReply<int> r = service.call(QDBus::Block, "close", h.value(), false, "kwalletnoautoclose");
-    
-    return r;
-}
-
-int main(int argc, char *argv[])
-{
-    KAboutData aboutData("kwalletnoautoclose", 0, ki18n("kwalletnoautoclose"), "version");
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
-
-    QDBusInterface service("org.kde.kwalletd", "/modules/kwalletd");
-    if (!service.isValid()) {
-        _out << "Constructed service is invalid!" << endl;
-        return 1;
-    }
-    
-    QDBusReply<bool> r = service.call(QDBus::Block, "isEnabled");
-    if (!r.isValid() || !r) {
-        _out << "kwalletd is disabled or not running!" << endl;
-        return 1;
-    }
-    
-    QDBusReply<QString> kdewallet = service.call(QDBus::Block, "localWallet");
-    _kdewallet = kdewallet;
-    _out << "local wallet is " << _kdewallet << endl;
-    
-    QDBusReply<bool> open = service.call(QDBus::Block, "isOpen", _kdewallet);
-    if (open) {
-        _out << "wallet is already open. Please close to run this test." << endl;
-        return 1;
-    }
-    
-    int rc;
-    
-    _out << "Opening and closing the wallet properly." << endl;
-    rc = openAndClose();
-    if (rc != 0) {
-        _out << "FAILED!" << endl;
-        return rc;
-    }
-    
-    _out << "Opening and exiting." << endl;
-    QDBusReply<int> h = service.call(QDBus::Block, "open", _kdewallet, (qlonglong)0, "kwalletnoautoclose");
-    if (h < 0) {
-        _out << "Opening the wallet failed!" << endl;
-        return 1;
-    } else {
-        _out << "Wallet opened." << endl;
-    }
-    
-    _out << "Exiting. Wallet should stay open." << endl;
-    
-    return 0;
-}
diff --git a/kwalletd/tests/kwalletpath.cpp b/kwalletd/tests/kwalletpath.cpp
deleted file mode 100644 (file)
index dbc1f6b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <QtCore/QTextStream>
-#include <QtCore/QTimer>
-
-#include <kaboutdata.h>
-#include <kapplication.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kglobal.h>
-#include <kstandarddirs.h>
-#include <kwallet.h>
-#include <QtDBus/QDBusConnectionInterface>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusReply>
-#include <klocale.h>
-
-static QTextStream _out(stdout, QIODevice::WriteOnly);
-
-void openWallet()
-{
-    _out << "About to ask for wallet /tmp/test.kwl sync" << endl;
-
-    KWallet::Wallet *wallet = KWallet::Wallet::openWallet("/tmp/test.kwl", 0, KWallet::Wallet::Path);
-
-    _out << "Got path wallet: " << (wallet != 0) << endl;
-    
-    if (wallet) {
-        _out << "Closing wallet" << endl;
-        delete wallet;
-    }
-    
-    kapp->exit(0);
-}
-
-int main(int argc, char *argv[])
-{
-    KAboutData aboutData("kwalletpath", 0, ki18n("kwalletpath"), "version");
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
-
-    openWallet();
-
-    exit(0);
-}
diff --git a/kwalletd/tests/kwalletsync.cpp b/kwalletd/tests/kwalletsync.cpp
deleted file mode 100644 (file)
index ede0e4d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <QtCore/QTextStream>
-#include <QApplication>
-#include <QtCore/QTimer>
-
-#include <kaboutdata.h>
-#include <kcomponentdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kglobal.h>
-#include <kstandarddirs.h>
-#include <kwallet.h>
-#include <QtDBus/QDBusConnectionInterface>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusReply>
-#include <klocale.h>
-
-static QTextStream _out( stdout, QIODevice::WriteOnly );
-
-void openWallet()
-{
-    _out << "About to ask for wallet sync" << endl;
-
-    KWallet::Wallet *w = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Synchronous );
-
-    _out << "Got sync wallet: " << (w != 0) << endl;
-}
-
-int main( int argc, char *argv[] )
-{
-    KAboutData aboutData("kwalletsync", 0, ki18n("kwalletsync"), "version");
-    KComponentData componentData(&aboutData);
-    QApplication app( argc, argv );
-
-    // force name with D-BUS
-    QDBusReply<QDBusConnectionInterface::RegisterServiceReply> reply
-        = QDBusConnection::sessionBus().interface()->registerService( "org.kde.kwalletsync",
-                                                            QDBusConnectionInterface::ReplaceExistingService );
-
-    if ( !reply.isValid() ) {
-        _out << "D-BUS name request returned " << reply.error().name() << endl;
-    }
-
-    openWallet();
-
-    return 0;
-}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/kwalletd/tests/kwallettest.cpp b/kwalletd/tests/kwallettest.cpp
deleted file mode 100644 (file)
index 2a1c4f8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "kwallettest.h"
-#include "moc_kwallettest.cpp"
diff --git a/kwalletd/tests/kwallettest.h b/kwalletd/tests/kwallettest.h
deleted file mode 100644 (file)
index f6d9052..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef KWALLETASYNC_H
-#define KWALLETASYNC_H
-
-#include <QtCore/QObject>
-
-namespace KWallet { class Wallet; }
-
-class WalletReceiver : public QObject
-{
-       Q_OBJECT
-public Q_SLOTS:
-       void walletOpened( bool );
-};
-
-#endif
diff --git a/kwalletd/tests/kwalletwizardtest.cpp b/kwalletd/tests/kwalletwizardtest.cpp
deleted file mode 100644 (file)
index 3f2d400..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-   Copyright (c) 2007 Pino Toscano <pino@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include <QApplication>
-
-#include "kwalletwizard.h"
-
-int main(int argc, char **argv)
-{
-    QApplication app(argc, argv);
-
-    KWalletWizard wizard;
-    wizard.show();
-
-    int ret = app.exec();
-
-    return ret;
-}
-
diff --git a/kwalletmanager/CMakeLists.txt b/kwalletmanager/CMakeLists.txt
deleted file mode 100644 (file)
index 176e6b5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-project(kwallet)
-
-add_subdirectory( icons )
-add_subdirectory( src )
-
-########### install files ###############
-
-install(
-    PROGRAMS
-    kwalletmanager.desktop
-    kwalletmanager-kwalletd.desktop
-    DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR}
-)
diff --git a/kwalletmanager/COPYING b/kwalletmanager/COPYING
deleted file mode 100644 (file)
index 5185fd3..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-NOTE! The GPL below is copyrighted by the Free Software Foundation, but
-the instance of code that it refers to (the kde programs) are copyrighted
-by the authors who actually wrote it.
-
----------------------------------------------------------------------------
-                       
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-               51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-\f
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/kwalletmanager/COPYING.LIB b/kwalletmanager/COPYING.LIB
deleted file mode 100644 (file)
index 2d2d780..0000000
+++ /dev/null
@@ -1,510 +0,0 @@
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-\f
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard.  To achieve this, non-free programs must
-be allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-\f
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-\f
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-\f
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-\f
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at least
-    three years, to give the same user the materials specified in
-    Subsection 6a, above, for a charge no more than the cost of
-    performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-\f
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-\f
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-\f
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library 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
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James
-  Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/kwalletmanager/TODO b/kwalletmanager/TODO
deleted file mode 100644 (file)
index d1ef5c3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Things left:
-
-Backend:
-- test zSeries
-- refactor the hashes to make it efficient
-
-Integration:
-- Cookie jar
-
-Future ideas:
-- Make it a kpart
-
-GPG
-- Provide a backend conversion tool to help switching from blowfish to GPG or viceversa
diff --git a/kwalletmanager/icons/CMakeLists.txt b/kwalletmanager/icons/CMakeLists.txt
deleted file mode 100644 (file)
index b49dd1d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-kde4_install_icons( ${KDE4_DATA_INSTALL_DIR}/kwalletmanager/icons   )
diff --git a/kwalletmanager/icons/hi22-action-folder_closed.png b/kwalletmanager/icons/hi22-action-folder_closed.png
deleted file mode 100644 (file)
index d929c81..0000000
Binary files a/kwalletmanager/icons/hi22-action-folder_closed.png and /dev/null differ
diff --git a/kwalletmanager/icons/hi22-action-folder_open.png b/kwalletmanager/icons/hi22-action-folder_open.png
deleted file mode 100644 (file)
index c252264..0000000
Binary files a/kwalletmanager/icons/hi22-action-folder_open.png and /dev/null differ
diff --git a/kwalletmanager/kwalletmanager-kwalletd.desktop b/kwalletmanager/kwalletmanager-kwalletd.desktop
deleted file mode 100755 (executable)
index 9be520b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-[Desktop Entry]
-Name=Wallet Management Tool
-Name[ar]=أداة إدارة المحفظة
-Name[ast]=Ferramienta pa xestionar cartera
-Name[bg]=Инструмент за настройване на "Портфейл"
-Name[br]=Merour an doug-paperoù
-Name[bs]=Alatka za upravljanje novčanicima
-Name[ca]=Eina de gestió de carteres
-Name[ca@valencia]=Eina de gestió de carteres
-Name[cs]=Nástroj pro správu úschovny
-Name[cy]=Erfyn Rheoli Waled
-Name[da]=Håndteringsværktøj for tegnebog
-Name[de]=Passwortverwaltung
-Name[el]=Εργαλείο διαχείρισης πορτοφολιού
-Name[en_GB]=Wallet Management Tool
-Name[eo]=Paperuja administrilo
-Name[es]=Herramienta de gestión de cartera
-Name[et]=Turvalaeka haldur
-Name[eu]=Zorroa kudeatzeko tresna
-Name[fa]=ابزار مدیریت  Wallet
-Name[fi]=Lompakonhallinta
-Name[fr]=Outil de gestion de portefeuilles
-Name[ga]=Uirlis Bhainisteoireachta Wallet
-Name[gl]=Utilidade de xestión de carteiras
-Name[he]=כלי לניהול הארנק של KDE
-Name[hne]=बटुआ प्रबंधन औजार
-Name[hr]=Alat za upravljanje novčanikom
-Name[hu]=Jelszókezelő eszköz
-Name[ia]=Instrumento de gestion de portafolio
-Name[id]=Perkakas Manajemen Dompet
-Name[is]=Tól til að stýra eiginleikum veskisins
-Name[it]=Strumento per la gestione dei portafogli
-Name[ja]=ウォレット管理ツール
-Name[kk]=Әмиянын басқару құралы
-Name[km]=ឧបករណ៍​គ្រប់គ្រង​កាបូប
-Name[ko]=지갑 관리 도구
-Name[lt]=Spatažodinių tvarkymo įrankis
-Name[lv]=Maka pārvaldības rīks
-Name[mk]=Алатка за менаџирање на паричници
-Name[mr]=पाकीट व्यवस्थापन साधन
-Name[nb]=Wallet administrasjonsverktøy
-Name[nds]=Knippenpleger
-Name[ne]=वालेट व्यवस्थापन उपकरण
-Name[nl]=Portefeuillebeheer
-Name[nn]=Wallet-administrasjonsverktøy
-Name[pa]=ਵਾਲਿਟ ਪਰਬੰਧਨ ਟੂਲ
-Name[pl]=Narzędzie do zarządzania portfelem
-Name[pt]=Ferramenta de Gestão da Carteira
-Name[pt_BR]=Ferramenta de gerenciamento de carteiras
-Name[ro]=Administrare portofel
-Name[ru]=Управление бумажниками
-Name[sk]=Nástroj pre správu KDE Wallet
-Name[sl]=Orodje za upravljanje z listnicami
-Name[sq]=Mjet i Menaxhimit të Portofolit
-Name[sr]=Алатка за управљање новчаницима
-Name[sr@ijekavian]=Алатка за управљање новчаницима
-Name[sr@ijekavianlatin]=Alatka za upravljanje novčanicima
-Name[sr@latin]=Alatka za upravljanje novčanicima
-Name[sv]=Hanteringsverktyg för plånbok
-Name[ta]=வாலட் மேலாண்மை கருவி  
-Name[tg]=Асбоби Идоракунии Ҳамён
-Name[th]=เครื่องมือจัดการกระเป๋าคุมข้อมูล
-Name[tr]=Cüzdan Yönetim Aracı
-Name[ug]=ھەميان باشقۇرۇش قورالى
-Name[uk]=Засіб керування торбинками
-Name[uz]=Qopchiq boshqarish vositasi
-Name[uz@cyrillic]=Қопчиқ бошқариш воситаси
-Name[vi]=Công Cụ Quản Lý Ví
-Name[x-test]=xxWallet Management Toolxx
-Name[zh_CN]=钱包管理工具
-Name[zh_TW]=錢包管理工具
-Exec=kwalletmanager --kwalletd
-Icon=kwalletmanager
-Type=Application
-Terminal=false
-X-KDE-StartupNotify=false
-NoDisplay=true
-
diff --git a/kwalletmanager/kwalletmanager.desktop b/kwalletmanager/kwalletmanager.desktop
deleted file mode 100755 (executable)
index 780b34d..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-[Desktop Entry]
-Name=KWalletManager
-Name[ar]=KWalletManager
-Name[ast]=KWalletManager
-Name[bg]=KWalletManager
-Name[bs]=KWalletManager
-Name[ca]=KWalletManager
-Name[ca@valencia]=KWalletManager
-Name[cs]=KWalletManager
-Name[da]=KWalletManager
-Name[de]=KWalletManager
-Name[el]=KWalletManager
-Name[en_GB]=KWalletManager
-Name[es]=KWalletManager
-Name[et]=Turvalaeka haldur
-Name[eu]=KWalletManager
-Name[fi]=KWalletManager
-Name[fr]=KWalletManager
-Name[ga]=KWalletManager
-Name[gl]=KWalletManager
-Name[hne]=के-वालेट-मैनेजर
-Name[hr]=KWalletManager
-Name[hu]=KWalletManager
-Name[ia]=Gerente KWallet
-Name[id]=KWalletManager
-Name[it]=KWalletManager
-Name[ja]=KWalletManager
-Name[kk]=KWalletManager
-Name[km]=KWalletManager
-Name[ko]=KWalletManager
-Name[lt]=KWalletManager
-Name[lv]=KWalletManager
-Name[mr]=के-वॉलेट व्यवस्थापक
-Name[nb]=KWalletManager
-Name[nds]=KDE-Knippenpleger
-Name[nl]=KWalletManager
-Name[nn]=KWalletManager
-Name[pa]=ਕੇਵਾਲਿਟ-ਮੈਨੇਜਰ
-Name[pl]=Zarządzanie Portfelem
-Name[pt]=KWalletManager
-Name[pt_BR]=KWalletManager
-Name[ro]=KWalletManager
-Name[ru]=KWalletManager
-Name[sk]=KWalletManager
-Name[sl]=Upravljalnik Listnice za KDE
-Name[sq]=KWalletManager
-Name[sr]=Менаџер К‑новчаника
-Name[sr@ijekavian]=Менаџер К‑новчаника
-Name[sr@ijekavianlatin]=Menadžer K‑novčanika
-Name[sr@latin]=Menadžer K‑novčanika
-Name[sv]=Hanteringsverktyg för plånbok
-Name[th]=จัดการกระเป๋าคุมข้อมูล-K
-Name[tr]=KWallet Yönetim Aracı
-Name[ug]=KWalletManager
-Name[uk]=KWalletManager
-Name[x-test]=xxKWalletManagerxx
-Name[zh_CN]=KWalletManager
-Name[zh_TW]=KDE 錢包管理員
-GenericName=Wallet Management Tool
-GenericName[ar]=أداة إدارة المحفظة
-GenericName[ast]=Ferramienta pa xestionar cartera
-GenericName[bg]=Управление на "Портфейл"
-GenericName[bs]=Alatka za upravljanje novčanicima
-GenericName[ca]=Eina de gestió de carteres
-GenericName[ca@valencia]=Eina de gestió de carteres
-GenericName[cs]=Nástroj pro správu úschovny
-GenericName[da]=Værktøj til håndtering af tegnebog
-GenericName[de]=Passwortverwaltung
-GenericName[el]=Εργαλείο διαχείρισης πορτοφολιού
-GenericName[en_GB]=Wallet Management Tool
-GenericName[es]=Herramienta de gestión de carteras
-GenericName[et]=Turvalaeka haldur
-GenericName[eu]=Zorroa kudeatzeko tresna
-GenericName[fi]=Lompakonhallinta
-GenericName[fr]=Outil de gestion de portefeuilles
-GenericName[ga]=Uirlis Bhainisteoireachta Sparáin
-GenericName[gl]=Utilidade de xestión de carteiras
-GenericName[hne]=बटुआ प्रबंधन औजार
-GenericName[hr]=Alat za upravljanje novčanikom
-GenericName[hu]=Jelszókezelő eszköz
-GenericName[ia]=Instrumento de gestion de portafolio
-GenericName[id]=Perkakas Manajemen Dompet
-GenericName[it]=Strumento per la gestione dei portafogli
-GenericName[ja]=ウォレット管理ツール
-GenericName[kk]=Әмиянын басқару құралы
-GenericName[km]=ឧបករណ៍​គ្រប់គ្រង​កាបូប
-GenericName[ko]=지갑 관리 도구
-GenericName[lt]=Spatažodinių tvarkymo įrankis
-GenericName[lv]=Maka pārvaldības rīks
-GenericName[mr]=पाकीट व्यवस्थापन साधन
-GenericName[nb]=Wallet administrasjonsverktøy
-GenericName[nds]=Knippenpleger
-GenericName[nl]=Portefeuillebeheer
-GenericName[nn]=Wallet-administrasjonsverktøy
-GenericName[pa]=ਵਾਲਿਟ ਪਰਬੰਧਨ ਟੂਲ
-GenericName[pl]=Narzędzie do zarządzania Portfelem
-GenericName[pt]=Ferramenta de Gestão da Carteira
-GenericName[pt_BR]=Ferramenta de gerenciamento de carteiras
-GenericName[ro]=Administrare portofel
-GenericName[ru]=Управление бумажниками
-GenericName[sk]=Nástroj pre správu KDE Wallet
-GenericName[sl]=Orodje za upravljanje z listnicami
-GenericName[sq]=Mjet i Menaxhimit të Portofolit
-GenericName[sr]=Алатка за управљање новчаницима
-GenericName[sr@ijekavian]=Алатка за управљање новчаницима
-GenericName[sr@ijekavianlatin]=Alatka za upravljanje novčanicima
-GenericName[sr@latin]=Alatka za upravljanje novčanicima
-GenericName[sv]=Hanteringsverktyg för plånbok
-GenericName[th]=เครื่องมือจัดการกระเป๋าคุมข้อมูล
-GenericName[tr]=Cüzdan Yönetim Aracı
-GenericName[ug]=ھەميان باشقۇرۇش قورالى
-GenericName[uk]=Засіб керування торбинками
-GenericName[x-test]=xxWallet Management Toolxx
-GenericName[zh_CN]=钱包管理工具
-GenericName[zh_TW]=錢包管理工具
-Exec=kwalletmanager --icon '%i' --caption '%c' %u
-MimeType=application/x-kwallet;
-InitialPreference=6
-Icon=kwalletmanager
-Type=Application
-Terminal=false
-X-KDE-StartupNotify=false
-Categories=Qt;KDE;System;Security;
-X-DocPath=kwallet/index.html
diff --git a/kwalletmanager/src/CMakeLists.txt b/kwalletmanager/src/CMakeLists.txt
deleted file mode 100644 (file)
index bc9fa21..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-add_subdirectory(konfigurator)
-add_subdirectory(manager)
diff --git a/kwalletmanager/src/konfigurator/CMakeLists.txt b/kwalletmanager/src/konfigurator/CMakeLists.txt
deleted file mode 100644 (file)
index bf967ec..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-########### next target ###############
-
-set(kcm_kwallet_PART_SRCS konfigurator.cpp walletconfigwidget.ui)
-
-kde4_add_plugin(kcm_kwallet ${kcm_kwallet_PART_SRCS})
-
-
-target_link_libraries(kcm_kwallet ${KDE4_KDEUI_LIBS})
-
-install(TARGETS kcm_kwallet  DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
-
-########### install files ###############
-
-install( FILES kwalletconfig.desktop kwalletmanager_show.desktop  DESTINATION ${KDE4_SERVICES_INSTALL_DIR})
diff --git a/kwalletmanager/src/konfigurator/Messages.sh b/kwalletmanager/src/konfigurator/Messages.sh
deleted file mode 100644 (file)
index c31132d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-$EXTRACTRC *.ui >> rc.cpp
-$XGETTEXT *.cpp -o $podir/kcmkwallet.pot
diff --git a/kwalletmanager/src/konfigurator/konfigurator.cpp b/kwalletmanager/src/konfigurator/konfigurator.cpp
deleted file mode 100644 (file)
index 2dc0310..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
-   Copyright (C) 2003 George Staikos <staikos@kde.org>
-
-   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 "konfigurator.h"
-
-#include <QtDBus/QtDBus>
-#include <kaboutdata.h>
-#include <kapplication.h>
-#include <ksharedconfig.h>
-#include <kdialog.h>
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-#include <kinputdialog.h>
-#include <kmenu.h>
-#include <kwallet.h>
-#include <kdebug.h>
-
-#include <QCheckBox>
-#include <QPushButton>
-#include <QVBoxLayout>
-#include <QtCore/qfile.h>
-#include <ktoolinvocation.h>
-#include <kconfiggroup.h>
-#include <kmessagebox.h>
-#include <kstandarddirs.h>
-#define KWALLETMANAGERINTERFACE "org.kde.KWallet"
-
-K_PLUGIN_FACTORY(KWalletFactory, registerPlugin<KWalletConfig>();)
-K_EXPORT_PLUGIN(KWalletFactory("kcmkwallet"))
-
-
-KWalletConfig::KWalletConfig(QWidget *parent, const QVariantList& args)
-    : KCModule(KWalletFactory::componentData(), parent, args),
-    _cfg(KSharedConfig::openConfig(QLatin1String( "kwalletrc" ), KConfig::NoGlobals)) {
-
-    KAboutData *about = new KAboutData(I18N_NOOP("kcmkwallet"), 0,
-                        ki18n("KDE Wallet Control Module"),
-                        0, KLocalizedString(), KAboutData::License_GPL,
-                        ki18n("(c) 2003 George Staikos"));
-    about->addAuthor(ki18n("George Staikos"), KLocalizedString(), "staikos@kde.org");
-    setAboutData( about );
-
-    QVBoxLayout *vbox = new QVBoxLayout(this);
-    vbox->setSpacing(KDialog::spacingHint());
-    vbox->setMargin(0);
-    _wcw = new WalletConfigWidget(this);
-    vbox->addWidget(_wcw);
-
-    connect(_wcw->_enabled, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_launchManager, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_autocloseManager, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_autoclose, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_closeIdle, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_openPrompt, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_screensaverLock, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_localWalletSelected, SIGNAL(clicked()), this, SLOT(configChanged()));
-    connect(_wcw->_idleTime, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
-    connect(_wcw->_launch, SIGNAL(clicked()), this, SLOT(launchManager()));
-    connect(_wcw->_newWallet, SIGNAL(clicked()), this, SLOT(newNetworkWallet()));
-    connect(_wcw->_newLocalWallet, SIGNAL(clicked()), this, SLOT(newLocalWallet()));
-    connect(_wcw->_localWallet, SIGNAL(activated(int)), this, SLOT(configChanged()));
-    connect(_wcw->_defaultWallet, SIGNAL(activated(int)), this, SLOT(configChanged()));
-    connect(_wcw->_accessList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
-
-    _wcw->_accessList->setAllColumnsShowFocus(true);
-    _wcw->_accessList->setContextMenuPolicy(Qt::CustomContextMenu);
-    updateWalletLists();
-
-    if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String( "org.kde.kwalletmanager" ))) {
-        _wcw->_launch->hide();
-    }
-
-}
-
-
-KWalletConfig::~KWalletConfig() {
-}
-
-
-void KWalletConfig::updateWalletLists() {
-    const QString p1( _wcw->_localWallet->currentText() );
-    const QString p2( _wcw->_defaultWallet->currentText() );
-
-    _wcw->_localWallet->clear();
-    _wcw->_defaultWallet->clear();
-
-    const QStringList wl = KWallet::Wallet::walletList();
-    _wcw->_localWallet->addItems(wl);
-    _wcw->_defaultWallet->addItems(wl);
-
-    int index = wl.indexOf(p1);
-    if (index != -1) {
-        _wcw->_localWallet->setCurrentIndex(index);
-    }
-
-    index = wl.indexOf(p2);
-    if (index != -1) {
-        _wcw->_defaultWallet->setCurrentIndex(index);
-    }
-}
-
-
-QString KWalletConfig::newWallet() {
-    bool ok;
-
-    const QString n = KInputDialog::getText(i18n("New Wallet"),
-                    i18n("Please choose a name for the new wallet:"),
-                    QString(),
-                    &ok,
-                    this);
-
-    if (!ok) {
-        return QString();
-    }
-
-    KWallet::Wallet *w = KWallet::Wallet::openWallet(n, window()->winId());
-    if (!w) {
-        return QString();
-    }
-
-    delete w;
-    return n;
-}
-
-
-void KWalletConfig::newLocalWallet() {
-    const QString n = newWallet();
-    if (n.isEmpty()) {
-        return;
-    }
-
-    updateWalletLists();
-
-    _wcw->_localWallet->setCurrentIndex(_wcw->_localWallet->findText(n));
-
-    emit changed(true);
-}
-
-
-void KWalletConfig::newNetworkWallet() {
-    const QString n = newWallet();
-    if (n.isEmpty()) {
-        return;
-    }
-
-    updateWalletLists();
-
-    _wcw->_defaultWallet->setCurrentIndex(_wcw->_defaultWallet->findText(n));
-
-    emit changed(true);
-}
-
-
-void KWalletConfig::launchManager() {
-    if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String( "org.kde.kwalletmanager" ))) {
-        KToolInvocation::startServiceByDesktopName( QLatin1String( "kwalletmanager_show" ));
-    } else {
-        QDBusInterface kwalletd(QLatin1String( "org.kde.kwalletmanager" ), QLatin1String( "/kwalletmanager/MainWindow_1" ));
-        kwalletd.call( QLatin1String( "show" ));
-        kwalletd.call( QLatin1String( "raise" ) );
-    }
-}
-
-
-void KWalletConfig::configChanged() {
-    emit changed(true);
-}
-
-void KWalletConfig::load() {
-    KConfigGroup config(_cfg, "Wallet");
-    _wcw->_enabled->setChecked(config.readEntry("Enabled", true));
-    _wcw->_openPrompt->setChecked(config.readEntry("Prompt on Open", false));
-    _wcw->_launchManager->setChecked(config.readEntry("Launch Manager", false));
-    _wcw->_autocloseManager->setChecked(! config.readEntry("Leave Manager Open", false));
-    _wcw->_screensaverLock->setChecked(config.readEntry("Close on Screensaver", false));
-    _wcw->_autoclose->setChecked(!config.readEntry("Leave Open", false));
-    _wcw->_closeIdle->setChecked(config.readEntry("Close When Idle", false));
-    _wcw->_idleTime->setValue(config.readEntry("Idle Timeout", 10));
-    if (config.hasKey("Default Wallet")) {
-        int defaultWallet_idx = _wcw->_defaultWallet->findText(config.readEntry("Default Wallet"));
-        if (defaultWallet_idx != -1) {
-            _wcw->_defaultWallet->setCurrentIndex(defaultWallet_idx);
-        } else {
-            _wcw->_defaultWallet->setCurrentIndex(0);
-        }
-    } else {
-        _wcw->_defaultWallet->setCurrentIndex(0);
-    }
-    if (config.hasKey("Local Wallet")) {
-        _wcw->_localWalletSelected->setChecked( !config.readEntry("Use One Wallet", false) );
-        int localWallet_idx = _wcw->_localWallet->findText(config.readEntry("Local Wallet"));
-        if (localWallet_idx != -1) {
-            _wcw->_localWallet->setCurrentIndex(localWallet_idx);
-        } else {
-            _wcw->_localWallet->setCurrentIndex(0);
-        }
-    } else {
-        _wcw->_localWalletSelected->setChecked(false);
-    }
-    _wcw->_accessList->clear();
-    KConfigGroup ad(_cfg, "Auto Deny");
-    KConfigGroup aa(_cfg, "Auto Allow");
-    QStringList denykeys = ad.entryMap().keys();
-    const QStringList keys = aa.entryMap().keys();
-    for (QStringList::const_iterator i = keys.begin(); i != keys.end(); ++i) {
-        QString walletName = *i;
-        // perform cleanup in the kwalletrc file, by removing entries that correspond to non-existent
-        // (previously deleted, for example) wallets
-        QString path = KGlobal::dirs()->locateLocal("data", QString("kwallet/%1.kwl").arg(walletName));
-        if (!QFile::exists(path)) {
-            // if the wallet no longer exists, delete the entries from the configuration file and skip to next entry
-            KConfigGroup cfgAllow = KSharedConfig::openConfig("kwalletrc")->group("Auto Allow");
-            cfgAllow.deleteEntry(walletName);
-
-            KConfigGroup cfgDeny = KSharedConfig::openConfig("kwalletrc")->group("Auto Deny");
-            cfgDeny.deleteEntry(walletName);
-            continue;
-        }
-
-        const QStringList apps = aa.readEntry(*i,QStringList());
-        const QStringList denyapps = ad.readEntry(*i, QStringList());
-        denykeys.removeAll(walletName);
-        QTreeWidgetItem *twi = new QTreeWidgetItem(_wcw->_accessList, QStringList() << walletName);
-        for (QStringList::const_iterator j = apps.begin(); j != apps.end(); ++j) {
-            new QTreeWidgetItem(twi, QStringList() << QString() << *j << i18n("Always Allow"));
-        }
-        for (QStringList::const_iterator j = denyapps.begin(); j != denyapps.end(); ++j) {
-            new QTreeWidgetItem(twi, QStringList() << QString() << *j << i18n("Always Deny"));
-        }
-    }
-    for (QStringList::const_iterator i = denykeys.constBegin(); i != denykeys.constEnd(); ++i) {
-        const QStringList denyapps = ad.readEntry(*i,QStringList());
-        QTreeWidgetItem *twi = new QTreeWidgetItem(_wcw->_accessList, QStringList() << *i);
-        for (QStringList::const_iterator j = denyapps.begin(); j != denyapps.end(); ++j) {
-            new QTreeWidgetItem(twi, QStringList() << QString() << *j << i18n("Always Deny"));
-        }
-    }
-    _wcw->_accessList->header()->setResizeMode(QHeaderView::ResizeToContents);
-    emit changed(false);
-}
-
-
-void KWalletConfig::save() {
-    KConfigGroup config(_cfg, "Wallet");
-    config.writeEntry("Enabled", _wcw->_enabled->isChecked());
-    config.writeEntry("Launch Manager", _wcw->_launchManager->isChecked());
-    config.writeEntry("Leave Manager Open", !_wcw->_autocloseManager->isChecked());
-    config.writeEntry("Leave Open", !_wcw->_autoclose->isChecked());
-    config.writeEntry("Close When Idle", _wcw->_closeIdle->isChecked());
-    config.writeEntry("Idle Timeout", _wcw->_idleTime->value());
-    config.writeEntry("Prompt on Open", _wcw->_openPrompt->isChecked());
-    config.writeEntry("Close on Screensaver", _wcw->_screensaverLock->isChecked());
-
-    config.writeEntry("Use One Wallet", !_wcw->_localWalletSelected->isChecked());
-    if (_wcw->_localWalletSelected->isChecked()) {
-        config.writeEntry("Local Wallet", _wcw->_localWallet->currentText());
-    } else {
-        config.deleteEntry("Local Wallet");
-    }
-
-    if (_wcw->_defaultWallet->currentIndex() != -1) {
-        config.writeEntry("Default Wallet", _wcw->_defaultWallet->currentText());
-    } else {
-        config.deleteEntry("Default Wallet");
-    }
-
-    // FIXME: won't survive a language change
-    _cfg->deleteGroup("Auto Allow");
-    _cfg->deleteGroup("Auto Deny");
-    config  = _cfg->group("Auto Allow");
-    for (int i = 0; i < _wcw->_accessList->topLevelItemCount(); ++i) {
-        QTreeWidgetItem *parentItem = _wcw->_accessList->topLevelItem(i);
-        QStringList al;
-        for (int j = 0; j < parentItem->childCount(); ++j) {
-            QTreeWidgetItem *childItem = parentItem->child(j);
-            if (childItem->text(2) == i18n("Always Allow")) {
-                al << childItem->text(1);
-            }
-        }
-        config.writeEntry(parentItem->text(0), al);
-    }
-
-    config = _cfg->group("Auto Deny");
-    for (int i = 0; i < _wcw->_accessList->topLevelItemCount(); ++i) {
-        QTreeWidgetItem *parentItem = _wcw->_accessList->topLevelItem(i);
-        QStringList al;
-        for (int j = 0; j < parentItem->childCount(); ++j) {
-            QTreeWidgetItem *childItem = parentItem->child(j);
-            if (childItem->text(2) == i18n("Always Deny")) {
-                al << childItem->text(1);
-            }
-        }
-        config.writeEntry(parentItem->text(0), al);
-    }
-
-    _cfg->sync();
-
-    // this restarts kwalletd if necessary
-    if (KWallet::Wallet::isEnabled()) {
-        QDBusInterface kwalletd(QLatin1String( "org.kde.kwalletd" ), QLatin1String( "/modules/kwalletd" ),QLatin1String( KWALLETMANAGERINTERFACE ));
-        kwalletd.call( QLatin1String( "reconfigure" ) );
-    }
-    emit changed(false);
-}
-
-
-void KWalletConfig::defaults() {
-    _wcw->_enabled->setChecked(true);
-    _wcw->_openPrompt->setChecked(false);
-    _wcw->_launchManager->setChecked(false);
-    _wcw->_autocloseManager->setChecked(false);
-    _wcw->_screensaverLock->setChecked(false);
-    _wcw->_autoclose->setChecked(false);
-    _wcw->_closeIdle->setChecked(false);
-    _wcw->_idleTime->setValue(10);
-    _wcw->_defaultWallet->setCurrentIndex(0);
-    _wcw->_localWalletSelected->setChecked(false);
-    _wcw->_localWallet->setCurrentIndex( 0 );
-    _wcw->_accessList->clear();
-    emit changed(true);
-}
-
-
-QString KWalletConfig::quickHelp() const {
-    return i18n("This configuration module allows you to configure the KDE wallet system.");
-}
-
-
-void KWalletConfig::customContextMenuRequested(const QPoint& pos) {
-    QTreeWidgetItem *item = _wcw->_accessList->itemAt(pos);
-    if (item && item->parent()) {
-        KMenu *m = new KMenu(this);
-        m->addTitle(item->parent()->text(0));
-        m->addAction( i18n("&Delete" ), this, SLOT(deleteEntry()), Qt::Key_Delete);
-        m->exec(_wcw->_accessList->mapToGlobal(pos));
-        delete m;
-    }
-}
-
-
-void KWalletConfig::deleteEntry() {
-    QList<QTreeWidgetItem*> items = _wcw->_accessList->selectedItems();
-    if (items.count() == 1 && items[0] ) {
-        delete items[0];
-        emit changed(true);
-    }
-}
-
-#include "moc_konfigurator.cpp"
-
diff --git a/kwalletmanager/src/konfigurator/konfigurator.h b/kwalletmanager/src/konfigurator/konfigurator.h
deleted file mode 100644 (file)
index aea87e4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   Copyright (C) 2003 George Staikos <staikos@kde.org>
-
-   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 KWALLETKONFIGURATOR_H
-#define KWALLETKONFIGURATOR_H
-#include <kcmodule.h>
-#include <ksharedconfig.h>
-#include "ui_walletconfigwidget.h"
-
-class WalletConfigWidget : public QWidget, public Ui::WalletConfigWidget
-{
-public:
-  WalletConfigWidget( QWidget *parent ) : QWidget( parent ) {
-    setupUi( this );
-  }
-};
-
-
-class KWalletConfig : public KCModule {
-       Q_OBJECT
-       public:
-               explicit KWalletConfig(QWidget *parent = 0L, const QVariantList& = QVariantList());
-               virtual ~KWalletConfig();
-
-               void load();
-               void save();
-               void defaults();
-
-               QString quickHelp() const;
-
-       public slots:
-               void configChanged();
-               void launchManager();
-               void newLocalWallet();
-               void newNetworkWallet();
-               void updateWalletLists();
-               QString newWallet();
-               void deleteEntry();
-               void customContextMenuRequested(const QPoint& pos);
-
-       private:
-               WalletConfigWidget *_wcw;
-               KSharedConfig::Ptr _cfg;
-};
-
-#endif
diff --git a/kwalletmanager/src/konfigurator/kwalletconfig.desktop b/kwalletmanager/src/konfigurator/kwalletconfig.desktop
deleted file mode 100644 (file)
index 924b5c1..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-[Desktop Entry]
-Icon=kwalletmanager
-
-Type=Service
-X-KDE-ServiceTypes=KCModule
-
-Exec=kcmshell4 kwalletconfig
-X-DocPath=kwallet/index.html#kwallet-kcontrol-module
-X-KDE-Library=kcm_kwallet
-X-KDE-ParentApp=kcontrol
-X-KDE-System-Settings-Parent-Category=account-details
-
-Name=KDE Wallet
-Name[ar]=محفظة كدى
-Name[ast]=Cartera KDE
-Name[bg]=KDE Wallet
-Name[br]=Doug-paperoù KDE
-Name[bs]=KDE novčanik
-Name[ca]=Cartera del KDE
-Name[ca@valencia]=Cartera del KDE
-Name[cs]=Úschovna KDE
-Name[cy]=Waled KDE
-Name[da]=KDE's tegnebog
-Name[de]=KDE-Passwortspeicher
-Name[el]=Πορτοφόλι του KDE
-Name[en_GB]=KDE Wallet
-Name[eo]=KDE paperujo
-Name[es]=Cartera de KDE
-Name[et]=KDE turvalaegas
-Name[eu]=KDEren zorroa
-Name[fi]=KDE-lompakko
-Name[fr]=Portefeuille de KDE
-Name[ga]=KDE Wallet
-Name[gl]=KDE Wallet
-Name[he]=KDE Wallet
-Name[hne]=केडीई वालेट
-Name[hr]=KDE-ov novčanik
-Name[hu]=KDE Wallet
-Name[ia]=KDE Wallet (Portafolio de KDE)
-Name[id]=Dompet KDE
-Name[is]=KDE veskið
-Name[it]=Portafogli di KDE
-Name[ja]=KDE ウォレット
-Name[kk]=KDE әмияны
-Name[km]=កាបូប​របស់ KDE
-Name[ko]=KDE 지갑
-Name[lt]=KDE slaptažodinės
-Name[lv]=KDE Maks
-Name[mk]=KDE Паричник
-Name[mr]=केडीई पाकीट
-Name[nb]=KDE Wallet
-Name[nds]=KDE-Knipp
-Name[ne]=केडीई वालेट
-Name[nl]=KDE Portefeuillebeheer
-Name[nn]=KDE-lommebok
-Name[pa]=KDE ਵਾਲਿਟ
-Name[pl]=Portfel KDE
-Name[pt]=Carteira do KDE
-Name[pt_BR]=Carteira do KDE
-Name[ro]=Portofel KDE
-Name[ru]=Бумажник
-Name[sk]=KDE Wallet
-Name[sl]=Listnica KDE
-Name[sq]=KDE Portofoli
-Name[sr]=К‑новчаник
-Name[sr@ijekavian]=К‑новчаник
-Name[sr@ijekavianlatin]=K‑novčanik
-Name[sr@latin]=K‑novčanik
-Name[sv]=KDE-plånbok
-Name[ta]= கேடிஇ வாலட்
-Name[tg]=KDE Ҳамён
-Name[th]=กระเป๋าคุมข้อมูลของ KDE
-Name[tr]=KDE Cüzdanı
-Name[ug]=KDE ھەميان
-Name[uk]=Торбинки KDE
-Name[uz]=KDE qopchiq
-Name[uz@cyrillic]=KDE қопчиқ
-Name[vi]=Ví KDE
-Name[wa]=Poite-manoye KDE
-Name[x-test]=xxKDE Walletxx
-Name[zh_CN]=KDE 钱包
-Name[zh_TW]=KDE 錢包
-Comment=KDE Wallet Configuration
-Comment[ar]=إعداد محفظة كدى
-Comment[ast]=Configuración de la Cartera KDE
-Comment[bg]=Настройване на "Портфейл"
-Comment[br]=Kefluniadur Doug-paperoù KDE
-Comment[bs]=Podešavanje KDE novčanika
-Comment[ca]=Configuració de la cartera del KDE
-Comment[ca@valencia]=Configuració de la cartera del KDE
-Comment[cs]=Nastavení úschovny KDE
-Comment[cy]=Ffurfweddiad Waled KDE
-Comment[da]=Konfiguration af KDE's tegnebog
-Comment[de]=Einrichten des Passwortspeichers (KWallet)
-Comment[el]=Διαμόρφωση του πορτοφολιού του KDE
-Comment[en_GB]=KDE Wallet Configuration
-Comment[eo]=KDE paperuja agordo
-Comment[es]=Configuración de la cartera de KDE
-Comment[et]=KDE turvalaeka seadistamine
-Comment[eu]=KDEren zorroaren konfigurazioa
-Comment[fa]=KDE Wallet پیکربندی
-Comment[fi]=KDE-lompakon asetukset
-Comment[fr]=Configuration du portefeuille de KDE
-Comment[ga]=Cumraíocht KDE Wallet
-Comment[gl]=Configuración da carteira de KDE
-Comment[he]=KDE Wallet הגדרות
-Comment[hne]=केडीई वालेट कान्फिगरेसन
-Comment[hr]=Konfiguracija KDE-ovog novčanika
-Comment[hu]=KDE jelszókezelő beállítások
-Comment[ia]=Configuration de portafolio de KDE
-Comment[id]=Konfigurasi Dompet KDE
-Comment[is]=Stillingar veskisins
-Comment[it]=Configurazione portafogli di KDE
-Comment[ja]=KDE ウォレットの設定
-Comment[kk]=KDE әмиянның баптауы
-Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​កាបូប​របស់ KDE
-Comment[ko]=KDE 지갑 설정
-Comment[lt]=KDE slaptažodinių konfigūravimas
-Comment[lv]=KDE Maka konfigurācija
-Comment[mk]=Конфигурација на паричник во KDE
-Comment[mr]=केडीई पाकीट संयोजना
-Comment[nb]=Oppsett av KDE Wallet
-Comment[nds]=KDE-Knipp instellen
-Comment[ne]=केडीई वालेट कन्फिगरेसन
-Comment[nl]=KDE-portefeuille instellen
-Comment[nn]=Oppsett av KDE-lommeboka
-Comment[pa]=KDE ਵਾਲਿਟ ਸੰਰਚਨਾ
-Comment[pl]=Konfiguracja portfela KDE
-Comment[pt]=Configuração da Carteira do KDE
-Comment[pt_BR]=Configuração da carteira do KDE
-Comment[ro]=Configurează portofelul KDE
-Comment[ru]=Параметры бумажника
-Comment[sk]=Konfigurácia KDE Wallet
-Comment[sl]=Nastavitve Listnice KDE
-Comment[sq]=Konfigurim i Portofolit KDE
-Comment[sr]=Подешавање К‑новчаника
-Comment[sr@ijekavian]=Подешавање К‑новчаника
-Comment[sr@ijekavianlatin]=Podešavanje K‑novčanika
-Comment[sr@latin]=Podešavanje K‑novčanika
-Comment[sv]=Inställning av KDE-plånbok
-Comment[ta]=கேடிஇ வாலட் வடிவமைப்பு
-Comment[tg]=KDE Танзими Ҳамён
-Comment[th]=ปรับแต่งกระเป๋าคุมข้อมูลของ KDE
-Comment[tr]=KDE Cüzdan Yönetimi
-Comment[uk]=Налаштування KWallet
-Comment[uz]=KDE qopchiq xizmatini moslash
-Comment[uz@cyrillic]=KDE қопчиқ хизматини мослаш
-Comment[vi]=Cấu Hình Ví KDE
-Comment[x-test]=xxKDE Wallet Configurationxx
-Comment[zh_CN]=KDE 钱包配置
-Comment[zh_TW]=KDE 錢包設定
-X-KDE-Keywords=Wallet,Form Fill,Passwords,Form Data
-X-KDE-Keywords[bs]=Wallet,Form Fill,Passwords,Form Data;Novčanik;Lozinke;Formular
-X-KDE-Keywords[ca]=Cartera,Omplir formulari,Contrasenyes,Dades de formulari
-X-KDE-Keywords[ca@valencia]=Cartera,Omplir formulari,Contrasenyes,Dades de formulari
-X-KDE-Keywords[cs]=Úschovna,Vyplnění formuláře,Hesla,Data formuláře
-X-KDE-Keywords[da]=tegnebog,formularudfyldning,adgangskoder,formulardata
-X-KDE-Keywords[de]=Geheimfach,Formular,Passwort,Passwortspeicher,Formulardaten
-X-KDE-Keywords[el]=Πορτοφόλι,συμπλήρωση φόρμας,κωδικοί πρόσβασης,δεδομένα φόρμας
-X-KDE-Keywords[en_GB]=Wallet,Form Fill,Passwords,Form Data
-X-KDE-Keywords[es]=Cartera,Rellenar formulario,Contraseñas,Datos de formulario
-X-KDE-Keywords[et]=turvalaegas,vormide täitmine,paroolid,vormiandmed
-X-KDE-Keywords[eu]=Zorroa, formularioak betetzea, pasahitzak, formularioko datuak
-X-KDE-Keywords[fi]=Lompakko,Lomakkeen täydennys,Lomakkeen täydentäminen,Salasanat,Lomaketiedot,Lomakkeiden tiedot
-X-KDE-Keywords[fr]=Portefeuille,remplissage de formulaires,mots de passe,données de formulaires
-X-KDE-Keywords[ga]=Wallet,Líonadh Foirmeacha,Focal Faire,Sonraí foirme
-X-KDE-Keywords[gl]=Wallet,Form Fill,Passwords,Form Data,carteira,formulario,contrasinais
-X-KDE-Keywords[hu]=Jelszótároló,űrlapkitöltés,jelszavak,űrlapadat
-X-KDE-Keywords[ia]=Portafolio, Reimplemento de Formulario,Contrasignos,Datos de formulario
-X-KDE-Keywords[it]=Portafogli,compilazione moduli,password,dati moduli
-X-KDE-Keywords[kk]=Wallet,Form Fill,Passwords,Form Data
-X-KDE-Keywords[km]=កាបូប​ បំពេញ​សំណុំបែបបទ ពាក្យ​សម្ងាត់ ទិន្នន័យ​សំណុំ​បែបបទ
-X-KDE-Keywords[ko]=Wallet,Form Fill,Passwords,Form Data,지갑,암호,비밀번호,양식,폼
-X-KDE-Keywords[lt]=Piniginė,Formos užpildymas,Spaltažodžiai,Formos duomenys
-X-KDE-Keywords[mr]=पाकीट,रकाना भरा,गुप्तशब्द,रकाना माहिती
-X-KDE-Keywords[nb]=Lommebok,Skjema,Passord,Skjemadata
-X-KDE-Keywords[nds]=Knipp,Passwöör,Kiekwarkdaten,Formulordaten
-X-KDE-Keywords[nl]=Portefeuille,Formulier invullen,wachtwoorden,formuliergegevens
-X-KDE-Keywords[pa]=ਵਾਲਿਟ,ਫਾਰਮ ਭਰਨਾ,ਪਾਸਵਰਡ,ਫਾਰਮ ਡਾਟਾ
-X-KDE-Keywords[pl]=Portfel,Wypełnienie formularza,Hasła,Dane formularza
-X-KDE-Keywords[pt]=Carteira,Preenchimento de Formulários,Senhas,Dados de Formulários
-X-KDE-Keywords[pt_BR]=carteira,preencher formulário,senha,dados de formulário
-X-KDE-Keywords[ro]=portofel,completare formular,parole,date formular,formular
-X-KDE-Keywords[ru]=Wallet,Form Fill,Passwords,Form Data,бумажник,пароли,формы
-X-KDE-Keywords[sk]=Peňaženka,Vypĺňanie formulárov,Heslá,Dáta formulára
-X-KDE-Keywords[sl]=listnica,dopolnjevanje obrazcev,gesla,podatki obrazcev
-X-KDE-Keywords[sr]=Wallet,Form Fill,Passwords,Form Data,новчаник,попуњавање формулара,лозинка
-X-KDE-Keywords[sr@ijekavian]=Wallet,Form Fill,Passwords,Form Data,новчаник,попуњавање формулара,лозинка
-X-KDE-Keywords[sr@ijekavianlatin]=Wallet,Form Fill,Passwords,Form Data,novčanik,popunjavanje formulara,lozinka
-X-KDE-Keywords[sr@latin]=Wallet,Form Fill,Passwords,Form Data,novčanik,popunjavanje formulara,lozinka
-X-KDE-Keywords[sv]=Plånbok,Formulär,Lösenord,Formulärdata
-X-KDE-Keywords[tr]=Cüzdan,Form Doldurma,Parolalar,Form Verileri
-X-KDE-Keywords[uk]=кишеня;торбинка;форма;форми;заповнення форм;пароль;паролі;дані форми;реєстрація
-X-KDE-Keywords[x-test]=xxWallet,Form Fill,Passwords,Form Dataxx
-X-KDE-Keywords[zh_CN]=Wallet,Form Fill,Passwords,Form Data,钱包,表单填写,密码,表单数据
-X-KDE-Keywords[zh_TW]=Wallet,Form Fill,Passwords,Form Data
diff --git a/kwalletmanager/src/konfigurator/kwalletmanager_show.desktop b/kwalletmanager/src/konfigurator/kwalletmanager_show.desktop
deleted file mode 100644 (file)
index c18837f..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-[Desktop Entry]
-Name=Wallet Management Tool
-Name[ar]=أداة إدارة المحفظة
-Name[ast]=Ferramienta pa xestionar cartera
-Name[bg]=Инструмент за настройване на "Портфейл"
-Name[br]=Merour an doug-paperoù
-Name[bs]=Alatka za upravljanje novčanicima
-Name[ca]=Eina de gestió de carteres
-Name[ca@valencia]=Eina de gestió de carteres
-Name[cs]=Nástroj pro správu úschovny
-Name[cy]=Erfyn Rheoli Waled
-Name[da]=Håndteringsværktøj for tegnebog
-Name[de]=Passwortverwaltung
-Name[el]=Εργαλείο διαχείρισης πορτοφολιού
-Name[en_GB]=Wallet Management Tool
-Name[eo]=Paperuja administrilo
-Name[es]=Herramienta de gestión de cartera
-Name[et]=Turvalaeka haldur
-Name[eu]=Zorroa kudeatzeko tresna
-Name[fa]=ابزار مدیریت  Wallet
-Name[fi]=Lompakonhallinta
-Name[fr]=Outil de gestion de portefeuilles
-Name[ga]=Uirlis Bhainisteoireachta Wallet
-Name[gl]=Utilidade de xestión de carteiras
-Name[he]=כלי לניהול הארנק של KDE
-Name[hne]=बटुआ प्रबंधन औजार
-Name[hr]=Alat za upravljanje novčanikom
-Name[hu]=Jelszókezelő eszköz
-Name[ia]=Instrumento de gestion de portafolio
-Name[id]=Perkakas Manajemen Dompet
-Name[is]=Tól til að stýra eiginleikum veskisins
-Name[it]=Strumento per la gestione dei portafogli
-Name[ja]=ウォレット管理ツール
-Name[kk]=Әмиянын басқару құралы
-Name[km]=ឧបករណ៍​គ្រប់គ្រង​កាបូប
-Name[ko]=지갑 관리 도구
-Name[lt]=Spatažodinių tvarkymo įrankis
-Name[lv]=Maka pārvaldības rīks
-Name[mk]=Алатка за менаџирање на паричници
-Name[mr]=पाकीट व्यवस्थापन साधन
-Name[nb]=Wallet administrasjonsverktøy
-Name[nds]=Knippenpleger
-Name[ne]=वालेट व्यवस्थापन उपकरण
-Name[nl]=Portefeuillebeheer
-Name[nn]=Wallet-administrasjonsverktøy
-Name[pa]=ਵਾਲਿਟ ਪਰਬੰਧਨ ਟੂਲ
-Name[pl]=Narzędzie do zarządzania portfelem
-Name[pt]=Ferramenta de Gestão da Carteira
-Name[pt_BR]=Ferramenta de gerenciamento de carteiras
-Name[ro]=Administrare portofel
-Name[ru]=Управление бумажниками
-Name[sk]=Nástroj pre správu KDE Wallet
-Name[sl]=Orodje za upravljanje z listnicami
-Name[sq]=Mjet i Menaxhimit të Portofolit
-Name[sr]=Алатка за управљање новчаницима
-Name[sr@ijekavian]=Алатка за управљање новчаницима
-Name[sr@ijekavianlatin]=Alatka za upravljanje novčanicima
-Name[sr@latin]=Alatka za upravljanje novčanicima
-Name[sv]=Hanteringsverktyg för plånbok
-Name[ta]=வாலட் மேலாண்மை கருவி  
-Name[tg]=Асбоби Идоракунии Ҳамён
-Name[th]=เครื่องมือจัดการกระเป๋าคุมข้อมูล
-Name[tr]=Cüzdan Yönetim Aracı
-Name[ug]=ھەميان باشقۇرۇش قورالى
-Name[uk]=Засіб керування торбинками
-Name[uz]=Qopchiq boshqarish vositasi
-Name[uz@cyrillic]=Қопчиқ бошқариш воситаси
-Name[vi]=Công Cụ Quản Lý Ví
-Name[x-test]=xxWallet Management Toolxx
-Name[zh_CN]=钱包管理工具
-Name[zh_TW]=錢包管理工具
-Exec=kwalletmanager --show
-MimeType=application/x-kwallet;
-InitialPreference=6
-Icon=kwalletmanager
-Type=Service
-X-KDE-StartupNotify=true
diff --git a/kwalletmanager/src/konfigurator/walletconfigwidget.ui b/kwalletmanager/src/konfigurator/walletconfigwidget.ui
deleted file mode 100644 (file)
index 7df0411..0000000
+++ /dev/null
@@ -1,497 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>WalletConfigWidget</class>
- <widget class="QWidget" name="WalletConfigWidget">
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="margin">
-    <number>0</number>
-   </property>
-   <item>
-    <widget class="QTabWidget" name="tabWidget2">
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <widget class="QWidget" name="tab1">
-      <attribute name="title">
-       <string>Wallet Preferences</string>
-      </attribute>
-      <layout class="QVBoxLayout">
-       <item>
-        <widget class="QCheckBox" name="_enabled">
-         <property name="whatsThis">
-          <string>&lt;p&gt;The wallet subsystem provides a convenient and secure way to manage all your passwords. This option specifies whether or not you want to use it.&lt;/p&gt;</string>
-         </property>
-         <property name="text">
-          <string>&amp;Enable the KDE wallet subsystem</string>
-         </property>
-         <property name="checked">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBox2">
-         <property name="whatsThis">
-          <string>It is best to close your wallets when you are not using them to prevent others from viewing or using them.</string>
-         </property>
-         <property name="title">
-          <string>Close Wallet</string>
-         </property>
-         <layout class="QVBoxLayout">
-          <item>
-           <layout class="QHBoxLayout">
-            <item>
-             <widget class="QCheckBox" name="_closeIdle">
-              <property name="whatsThis">
-               <string>&lt;p&gt;&lt;b&gt;Close wallet after a period of inactivity.&lt;/b&gt;&lt;br&gt;When a wallet is closed the password is needed to access it again.&lt;/p&gt;</string>
-              </property>
-              <property name="text">
-               <string>Close when unused for:</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QSpinBox" name="_idleTime">
-              <property name="enabled">
-               <bool>false</bool>
-              </property>
-              <property name="whatsThis">
-               <string>&lt;p&gt;&lt;b&gt;Close wallet after a period of inactivity.&lt;/b&gt;&lt;br&gt;When a wallet is closed the password is needed to access it again.&lt;/p&gt;</string>
-              </property>
-              <property name="suffix">
-               <string> min</string>
-              </property>
-              <property name="minimum">
-               <number>1</number>
-              </property>
-              <property name="maximum">
-               <number>999</number>
-              </property>
-              <property name="singleStep">
-               <number>5</number>
-              </property>
-              <property name="value">
-               <number>10</number>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer>
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeType">
-               <enum>QSizePolicy::Expanding</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>20</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <widget class="QCheckBox" name="_screensaverLock">
-            <property name="whatsThis">
-             <string>&lt;p&gt;&lt;b&gt;Close wallet as soon as the screensaver starts.&lt;/b&gt;&lt;br&gt;When a wallet is closed the password is needed to access it again.&lt;/p&gt;</string>
-            </property>
-            <property name="text">
-             <string>Close when screensaver starts</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QCheckBox" name="_autoclose">
-            <property name="whatsThis">
-             <string>&lt;p&gt;&lt;b&gt;Close wallet as soon as applications that use it have stopped.&lt;/b&gt;&lt;br&gt;Note that your wallet will only be closed when all applications that use it have stopped.&lt;br&gt;When a wallet is closed the password is needed to access it again.&lt;/p&gt;</string>
-            </property>
-            <property name="text">
-             <string>Close when last application stops using it</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBox4">
-         <property name="title">
-          <string>Automatic Wallet Selection</string>
-         </property>
-         <layout class="QGridLayout">
-          <item row="0" column="0">
-           <widget class="QLabel" name="textLabel1_2">
-            <property name="text">
-             <string>Select wallet to use as default:</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1" rowspan="2">
-           <spacer>
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Expanding</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item row="0" column="2">
-           <widget class="QComboBox" name="_defaultWallet">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-              <horstretch>1</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="3">
-           <widget class="QPushButton" name="_newWallet">
-            <property name="text">
-             <string>New...</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0">
-           <widget class="QCheckBox" name="_localWalletSelected">
-            <property name="text">
-             <string>Different wallet for local passwords:</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="2">
-           <widget class="QComboBox" name="_localWallet">
-            <property name="enabled">
-             <bool>false</bool>
-            </property>
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-              <horstretch>1</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="3">
-           <widget class="QPushButton" name="_newLocalWallet">
-            <property name="enabled">
-             <bool>false</bool>
-            </property>
-            <property name="text">
-             <string>New...</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBox3">
-         <property name="title">
-          <string>Wallet Manager</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_3">
-          <item>
-           <widget class="QCheckBox" name="_launchManager">
-            <property name="text">
-             <string>Show manager in system tray</string>
-            </property>
-            <property name="checked">
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QHBoxLayout" name="horizontalLayout_2">
-            <item>
-             <spacer name="horizontalSpacer">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeType">
-               <enum>QSizePolicy::Fixed</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>20</width>
-                <height>0</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-            <item>
-             <widget class="QCheckBox" name="_autocloseManager">
-              <property name="text">
-               <string>Hide system tray icon when last wallet closes</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <spacer>
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Fixed</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>0</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab2">
-      <attribute name="title">
-       <string>Access Control</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QCheckBox" name="_openPrompt">
-         <property name="text">
-          <string>&amp;Prompt when an application accesses a wallet</string>
-         </property>
-         <property name="checked">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QTreeWidget" name="_accessList">
-         <property name="rootIsDecorated">
-          <bool>true</bool>
-         </property>
-         <column>
-          <property name="text">
-           <string>Wallet</string>
-          </property>
-          <property name="clickable">
-           <bool>true</bool>
-          </property>
-          <property name="resizable">
-           <bool>true</bool>
-          </property>
-         </column>
-         <column>
-          <property name="text">
-           <string>Application</string>
-          </property>
-          <property name="clickable">
-           <bool>true</bool>
-          </property>
-          <property name="resizable">
-           <bool>true</bool>
-          </property>
-         </column>
-         <column>
-          <property name="text">
-           <string>Policy</string>
-          </property>
-          <property name="clickable">
-           <bool>true</bool>
-          </property>
-          <property name="resizable">
-           <bool>true</bool>
-          </property>
-         </column>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>0</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="_launch">
-       <property name="text">
-        <string>&amp;Launch Wallet Manager</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>_localWalletSelected</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_newLocalWallet</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_localWalletSelected</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_localWallet</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_closeIdle</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_idleTime</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_enabled</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>groupBox2</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_enabled</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>groupBox4</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_enabled</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>groupBox3</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_closeIdle</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_idleTime</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_launchManager</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>_autocloseManager</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/kwalletmanager/src/manager/CMakeLists.txt b/kwalletmanager/src/manager/CMakeLists.txt
deleted file mode 100644 (file)
index b1456b2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-########### next target ###############
-
-set(kwalletmanager_SRCS 
-    kwalletmanager.cpp
-    kwalletmanagerwidget.cpp
-    kwalletmanagerwidgetitem.cpp
-    walletcontrolwidget.cpp
-    main.cpp
-    kwalletpopup.cpp
-    kwalleteditor.cpp
-    kwmapeditor.cpp
-    allyourbase.cpp
-    kbetterthankdialogbase.cpp
-    registercreateactionmethod.cpp
-    applicationsmanager.cpp
-    connectedapplicationstable.cpp
-    connectedappmodel.cpp
-    disconnectappbutton.cpp
-    authorizedappmodel.cpp
-    authorizedapplicationstable.cpp
-    revokeauthbutton.cpp
-    walletwidget.ui
-    kbetterthankdialogbase.ui
-    walletcontrolwidget.ui
-    applicationsmanager.ui
-)
-
-qt4_add_dbus_interface(kwalletmanager_SRCS ${KDE4_DBUS_INTERFACES_INSTALL_DIR}/org.kde.KWallet.xml kwallet_interface)
-
-add_executable(kwalletmanager ${kwalletmanager_SRCS})
-
-target_link_libraries(kwalletmanager ${KDE4_KIO_LIBS})
-
-install(TARGETS kwalletmanager  ${INSTALL_TARGETS_DEFAULT_ARGS} )
-install( FILES kwalletmanager.rc DESTINATION ${KDE4_DATA_INSTALL_DIR}/kwalletmanager)
-
-kde4_install_icons( ${KDE4_ICON_INSTALL_DIR} )
diff --git a/kwalletmanager/src/manager/Messages.sh b/kwalletmanager/src/manager/Messages.sh
deleted file mode 100644 (file)
index 54b8036..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-$EXTRACTRC `find . -name '*.ui' -or -name '*.rc'` >> rc.cpp || exit 11
-$XGETTEXT `find . -name '*.h' -o -name '*.cpp' | grep -v '/tests/'` -o $podir/kwalletmanager.pot
-rm -f rc.cpp
diff --git a/kwalletmanager/src/manager/allyourbase.cpp b/kwalletmanager/src/manager/allyourbase.cpp
deleted file mode 100644 (file)
index b7896e3..0000000
+++ /dev/null
@@ -1,680 +0,0 @@
-/*
-   Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
-   Copyright (C) 2005 Isaac Clerencia <isaac@warp.es>
-
-   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 "allyourbase.h"
-
-#include <kdebug.h>
-#include <kcomponentdata.h>
-#include <kglobal.h>
-#include <kio/netaccess.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kstandarddirs.h>
-#include <kurl.h>
-#include <kwallet.h>
-
-#include <QFile>
-#include <QApplication>
-//Added by qt3to4:
-#include <QPixmap>
-#include <QtGui/qevent.h>
-#include <QtGui/qevent.h>
-#include <QtGui/qevent.h>
-
-/****************
- *  KWalletFolderItem - ListView items to represent kwallet folders
- */
-KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, QTreeWidget* parent, const QString &name, int entries)
-: QTreeWidgetItem(parent, KWalletFolderItemClass),_wallet(w),_name(name),_entries(entries) {
-    setText(0, QString::fromLatin1("%1 (%2)").arg(_name).arg(_entries));
-    setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEnabled);
-    setIcon(0, getFolderIcon(KIconLoader::Small));
-}
-
-QPixmap KWalletFolderItem::getFolderIcon(KIconLoader::Group group){
-    KIconLoader *loader = KIconLoader::global();
-    QPixmap pix = loader->loadIcon( _name, group, 0,
-                    KIconLoader::DefaultState, QStringList(),0, true );
-    if (pix.isNull()) {
-        pix = loader->loadIcon( _name.toLower(), group, 0,
-                KIconLoader::DefaultState, QStringList(),0, true);
-    }
-    if (pix.isNull()) {
-        pix = loader->loadIcon( QLatin1String( "folder-red" ), group, 0,
-                KIconLoader::DefaultState, QStringList(),0, true);
-    }
-    return pix;
-}
-
-void KWalletFolderItem::refresh() {
-    const QString saveFolder = _wallet->currentFolder();
-    _wallet->setFolder(_name);
-    setText(0, QString::fromLatin1("%1 (%2)").arg(_name).arg(_wallet->entryList().count()));
-    _wallet->setFolder(saveFolder);
-}
-
-void KWalletFolderItem::refreshItemsCount()
-{
-    int visibleLeafCount =0;
-    for (int i=0; i < childCount(); i++) {
-        QTreeWidgetItem* wi = child(i);
-        if (wi->childCount()) {
-            for (int l=0; l < wi->childCount(); l++) {
-                QTreeWidgetItem* li = wi->child(l);
-                if (!li->isHidden())
-                    visibleLeafCount++;
-            }
-        }
-    }
-    setText(0, QString::fromLatin1("%1 (%2)").arg(_name).arg(visibleLeafCount));
-}
-
-KWalletContainerItem* KWalletFolderItem::getContainer(KWallet::Wallet::EntryType type) {
-    for (int i = 0; i < childCount(); ++i) {
-        KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(child(i));
-        if (!ci) {
-            continue;
-        }
-        if (ci->entryType() == type) {
-            return ci;
-        }
-    }
-    return 0;
-}
-
-bool KWalletFolderItem::contains(const QString& key) {
-    return (getItem(key) != 0);
-}
-
-QTreeWidgetItem* KWalletFolderItem::getItem(const QString& key) {
-    for (int i = 0; i < childCount(); ++i) {
-        KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(child(i));
-        if (!ci) {
-            continue;
-        }
-        QTreeWidgetItem *tmp = ci->getItem(key);
-        if (tmp) {
-            return tmp;
-        }
-    }
-    return 0;
-}
-
-bool KWalletFolderItem::acceptDrop(const QMimeData *mimedata) const {
-    return mimedata->hasFormat(QLatin1String("application/x-kwallet-entry")) ||
-        mimedata->hasFormat(QLatin1String("text/uri-list"));
-}
-
-QString KWalletFolderItem::name() const {
-    return _name;
-}
-
-KWalletFolderItem::~KWalletFolderItem() {
-}
-
-/****************
- *  KWalletContainerItem - ListView items to represent kwallet containers, i.e.
- *  passwords, maps, ...
- */
-KWalletContainerItem::KWalletContainerItem(QTreeWidgetItem* parent, const QString &name, KWallet::Wallet::EntryType entryType)
-    : QTreeWidgetItem(parent, QStringList() << name, KWalletContainerItemClass), _type(entryType) {
-    setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled);
-}
-
-KWalletContainerItem::~KWalletContainerItem() {
-}
-
-KWallet::Wallet::EntryType KWalletContainerItem::entryType() {
-    return _type;
-}
-
-bool KWalletContainerItem::contains(const QString& key) {
-    return getItem(key) != 0;
-}
-
-QTreeWidgetItem *KWalletContainerItem::getItem(const QString& key) {
-    for (int i = 0; i < childCount(); ++i) {
-        KWalletEntryItem* entryItem = dynamic_cast<KWalletEntryItem *>(child(i));
-        if (entryItem && entryItem->name() == key) {
-            return entryItem;
-        }
-    }
-    return 0;
-}
-
-/****************
- *  KWalletEntryItem - ListView items to represent kwallet entries
- */
-KWalletEntryItem::KWalletEntryItem(KWallet::Wallet *w, QTreeWidgetItem* parent, const QString& ename)
-    : QTreeWidgetItem(parent, QStringList() << ename, KWalletEntryItemClass), _wallet(w), m_name(ename) {
-    setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled);
-}
-
-KWalletEntryItem::~KWalletEntryItem() {
-}
-
-void KWalletEntryItem::setName(const QString& n)
-{
-    m_name = n;
-    QTreeWidgetItem::setText(0, n);
-}
-
-void KWalletEntryItem::restoreName()
-{
-    QTreeWidgetItem::setText(0, m_name);
-}
-
-
-/****************
- * KWalletItem - IconView items to represent wallets
- */
-KWalletItem::KWalletItem(QListWidget *parent, const QString& walletName)
-    : QListWidgetItem(DesktopIcon(QLatin1String( "wallet-closed" )), walletName, parent), _open(false) {
-    setFlags(flags() | Qt::ItemIsDropEnabled);
-}
-
-KWalletItem::~KWalletItem() {
-}
-
-void KWalletItem::setOpen(bool state) {
-    if (_open != state) {
-        _open = state;
-        if (_open) {
-            setIcon( DesktopIcon(QLatin1String( "wallet-open" )) );
-        } else {
-            setIcon( DesktopIcon(QLatin1String( "wallet-closed" )) );
-        }
-    }
-}
-
-static bool decodeEntry(KWallet::Wallet *_wallet, QDataStream& ds) {
-    quint32 magic;
-    ds >> magic;
-    if (magic != KWALLETENTRYMAGIC) {
-        kDebug() << "bad magic" ;
-        return false;
-    }
-    QString name;
-    QByteArray value;
-    KWallet::Wallet::EntryType et;
-    ds >> name;
-    if (_wallet->hasEntry(name)) {
-        int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?", name));
-        if (rc == KMessageBox::Cancel) {
-            return false;
-        }
-    }
-    qint32 l;
-    ds >> l;
-    et = KWallet::Wallet::EntryType(l);
-    ds >> value;
-    _wallet->writeEntry(name, value, et);
-    return true;
-}
-
-static bool decodeFolder(KWallet::Wallet *_wallet, QDataStream& ds) {
-    quint32 magic;
-    ds >> magic;
-    if (magic != KWALLETFOLDERMAGIC) {
-        kDebug() << "bad magic" ;
-        return false;
-    }
-    QString folder;
-    ds >> folder;
-    if (_wallet->hasFolder(folder)) {
-        int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists.  What would you like to do?", folder), QString(), KStandardGuiItem::cont(), KGuiItem(i18n("Replace")));
-        if (rc == KMessageBox::Cancel) {
-            return false;
-        }
-        if (rc == KMessageBox::No) {
-            _wallet->removeFolder(folder);
-            _wallet->createFolder(folder);
-        }
-    } else {
-        _wallet->createFolder(folder);
-    }
-
-    _wallet->setFolder(folder);
-    while (!ds.atEnd()) {
-        QString name;
-        QByteArray value;
-        KWallet::Wallet::EntryType et;
-        ds >> name;
-        qint32 l;
-        ds >> l;
-        et = KWallet::Wallet::EntryType(l);
-        ds >> value;
-        _wallet->writeEntry(name, value, et);
-    }
-    return true;
-}
-
-void KWalletItem::processDropEvent(QDropEvent *e) {
-        const QMimeData *em = e->mimeData();
-    if (em->hasFormat(QLatin1String("application/x-kwallet-folder")) ||
-        em->hasFormat(QLatin1String("text/uri-list"))) {
-        // FIXME: don't allow the drop if the wallet name is the same
-        KWallet::Wallet *_wallet = KWallet::Wallet::openWallet(text(), listWidget()->window()->winId());
-        if (!_wallet) {
-            e->ignore();
-            return;
-        }
-
-        const QString saveFolder = _wallet->currentFolder();
-
-        QDataStream *ds = 0L;
-
-        if (em->hasFormat(QLatin1String("application/x-kwallet-folder"))) {
-            QByteArray edata = em->data(QLatin1String("application/x-kwallet-folder"));
-            if (!edata.isEmpty()) {
-                ds = new QDataStream(&edata, QIODevice::ReadOnly);
-            }
-        } else { // text/uri-list
-            const QList<QUrl> urls = e->mimeData()->urls();
-            if (urls.isEmpty()) {
-                e->ignore();
-                return;
-            }
-
-            KUrl u(urls.first());
-            if (u.fileName().isEmpty()) {
-                e->ignore();
-                return;
-            }
-            QString tmpFile;
-            if (KIO::NetAccess::download(u, tmpFile, 0L)) {
-                QFile file;
-                file.setFileName(tmpFile);
-                file.open(QIODevice::ReadOnly);
-                ds = new QDataStream(&file);
-                KIO::NetAccess::removeTempFile(tmpFile);
-            } else {
-                KMessageBox::error(listWidget(), KIO::NetAccess::lastErrorString());
-            }
-        }
-        if (ds) {
-            decodeFolder(_wallet, *ds);
-            delete ds;
-        }
-        _wallet->setFolder(saveFolder);
-        delete _wallet;
-
-        //delete the folder from the source if we were moving
-        Qt::MouseButtons state = QApplication::mouseButtons();
-        if (e->source() && e->source()->parent() &&
-            !strcmp(e->source()->parent()->metaObject()->className(), "KWalletEntryList") &&
-            !(state & Qt::ControlModifier)) {
-
-            KWalletEntryList *el = dynamic_cast<KWalletEntryList*>(e->source()->parent());
-            if (el) {
-                KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem*>(el->currentItem());
-                if (fi) {
-                    el->_wallet->removeFolder(fi->name());
-                }
-            }
-        }
-        e->accept();
-    } else {
-        e->ignore();
-        return;
-    }
-}
-
-/****************
- *  KWalletEntryList - A listview to store wallet entries
- */
-KWalletEntryList::KWalletEntryList(QWidget *parent, const char *name)
-    : QTreeWidget(parent),
-    _wallet(0) {
-    setObjectName( QLatin1String( name ) );
-    setColumnCount(1);
-    setHeaderLabel(i18n("Folders"));
-    setRootIsDecorated(true);
-    setDragEnabled(true);
-    setAcceptDrops(true);
-    setDragDropMode(DragDrop);
-    setSelectionMode(SingleSelection);
-}
-
-KWalletEntryList::~KWalletEntryList() {
-}
-
-//returns true if the item has been dropped successfully
-void KWalletEntryList::itemDropped(QDropEvent *e, QTreeWidgetItem *item) {
-    bool ok = true;
-    bool isEntry;
-    QFile file;
-    QDataStream *ds;
-
-    KWalletEntryList *el = 0L;
-    QTreeWidgetItem *sel = 0L;
-
-    //detect if we are dragging from kwallet itself
-    kDebug() << e->source() << e->source()->metaObject()->className();
-    if (e->source() && !strcmp(e->source()->metaObject()->className(), "KWalletEntryList")) {
-        el = dynamic_cast<KWalletEntryList*>(e->source());
-        if (!el) {
-            KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the item"));
-        } else
-            sel = el->currentItem();
-    }
-
-    const QMimeData *em = e->mimeData();
-    if (em->hasFormat(QLatin1String("application/x-kwallet-entry"))) {
-        //do nothing if we are in the same folder
-        if (sel && sel->parent()->parent() == KWalletEntryList::getItemFolder(item)) {
-            e->ignore();
-            return;
-        }
-        isEntry = true;
-        QByteArray data = em->data(QLatin1String("application/x-kwallet-entry"));
-        if (data.isEmpty()) {
-            e->ignore();
-            return;
-        }
-        ds = new QDataStream(&data, QIODevice::ReadOnly);
-    } else if (em->hasFormat(QLatin1String("application/x-kwallet-folder"))) {
-        //do nothing if we are in the same wallet
-        if (this == el) {
-            e->ignore();
-            return;
-        }
-        isEntry = false;
-        QByteArray data = em->data(QLatin1String("application/x-kwallet-folder"));
-        if (data.isEmpty()) {
-            e->ignore();
-            return;
-        }
-        ds = new QDataStream(&data, QIODevice::ReadOnly);
-    } else if (em->hasFormat(QLatin1String("text/uri-list"))) {
-        const QList<QUrl> urls = e->mimeData()->urls();
-        if (urls.isEmpty()) {
-            e->ignore();
-            return;
-        }
-        KUrl u(urls.first());
-        if (u.fileName().isEmpty()) {
-            e->ignore();
-            return;
-        }
-        QString tmpFile;
-        if (KIO::NetAccess::download(u, tmpFile, 0L)) {
-            file.setFileName(tmpFile);
-            file.open(QIODevice::ReadOnly);
-            ds = new QDataStream(&file);
-            //check magic to discover mime type
-            quint32 magic;
-            (*ds) >> magic;
-            delete ds;
-            if (magic == KWALLETENTRYMAGIC) {
-                isEntry = true;
-            } else if (magic == KWALLETFOLDERMAGIC) {
-                isEntry = false;
-            } else {
-                kDebug() << "bad magic" ;
-                e->ignore();
-                return;
-            }
-            //set the file back to the beginning
-            file.reset();
-            ds = new QDataStream(&file);
-            KIO::NetAccess::removeTempFile(tmpFile);
-        } else {
-            KMessageBox::error(this, KIO::NetAccess::lastErrorString());
-            return;
-        }
-    } else {
-        e->ignore();
-        return;
-    }
-    Qt::MouseButtons state = QApplication::mouseButtons();
-    if (isEntry) {
-        if (!item) {
-            e->ignore();
-            delete(ds);
-            return;
-        }
-        KWalletFolderItem *fi = KWalletEntryList::getItemFolder(item);
-        if (!fi) {
-            KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the entry"));
-            delete(ds);
-            e->accept();
-            return;
-        }
-        QString saveFolder = _wallet->currentFolder();
-        _wallet->setFolder(fi->name());
-        ok = decodeEntry(_wallet, *ds);
-        _wallet->setFolder(saveFolder);
-        fi->refresh();
-        delete(ds);
-        //delete source if we were moving, i.e., we are dragging
-        //from kwalletmanager and Control is not pressed
-        if (ok && el && !(state & Qt::ControlModifier) && sel) {
-            el->_wallet->removeEntry(sel->text(0));
-            delete sel;
-        }
-        e->accept();
-    } else {
-        ok = decodeFolder(_wallet, *ds);
-        delete ds;
-        //delete source if we were moving, i.e., we are dragging
-        //from kwalletmanager and Control is not pressed
-        if (ok && el && !(state & Qt::ControlModifier) && sel) {
-            KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(sel);
-            if (fi) {
-                el->_wallet->removeFolder(fi->name());
-                delete sel;
-            } else {
-                KMessageBox::error(this, i18n("An unexpected error occurred trying to delete the original folder, but the folder has been copied successfully"));
-            }
-        }
-        e->accept();
-    }
-}
-
-void KWalletEntryList::setWallet(KWallet::Wallet *w) {
-    _wallet = w;
-}
-
-bool KWalletEntryList::existsFolder(const QString& name) {
-    for (int i = 0; i < topLevelItemCount(); ++i) {
-        KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(topLevelItem(i));
-        if (!fi) {
-            continue;
-        }
-        if (name == fi->name()) {
-            return true;
-        }
-    }
-    return false;
-}
-
-QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const {
-    QMimeData *sd = 0L;
-    if (i->type() == KWalletEntryItemClass) {
-        const KWalletEntryItem *ei = dynamic_cast<const KWalletEntryItem*>(i);
-        if (!ei) {
-            return 0L;
-        }
-        KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(ei->parent());
-        if (!ci) {
-            return 0L;
-        }
-        sd = new QMimeData();
-        QByteArray a;
-        QDataStream ds(&a, QIODevice::WriteOnly);
-
-        ds.setVersion(QDataStream::Qt_4_8);
-        ds << KWALLETENTRYMAGIC;
-        ds << ei->text(0);
-        ds << ci->entryType();
-        QByteArray value;
-        ei->_wallet->readEntry(i->text(0), value);
-        ds << value;
-        sd->setData("application/x-kwallet-entry", a);
-    } else if (i->type() == KWalletFolderItemClass) {
-        const KWalletFolderItem *fi = dynamic_cast<const KWalletFolderItem*>(i);
-        if (!fi) {
-            return 0L;
-        }
-        sd = new QMimeData();
-        QByteArray a;
-        QDataStream ds(&a, QIODevice::WriteOnly);
-
-        ds.setVersion(QDataStream::Qt_4_8);
-
-        ds << KWALLETFOLDERMAGIC;
-        ds << *fi;
-        sd->setData("application/x-kwallet-folder", a);
-    }
-    return sd;
-}
-
-void KWalletEntryList::mousePressEvent(QMouseEvent *e) {
-    if (e->button() == Qt::LeftButton) {
-        _mousePos = e->pos();
-    }
-    QTreeWidget::mousePressEvent( e );
-}
-
-void KWalletEntryList::mouseMoveEvent(QMouseEvent *e) {
-    if (!(e->buttons() & Qt::LeftButton)) {
-        return;
-    }
-    if ((e->pos() - _mousePos).manhattanLength() < QApplication::startDragDistance()) {
-        return;
-    }
-    
-    const QTreeWidgetItem *item = itemAt(_mousePos);
-    if (!item || !item->isSelected()) {
-        return;
-    }
-    
-    QMimeData *mimeData = itemMimeData(item);
-    if (mimeData) {
-        QDrag *drag = new QDrag(this);
-        drag->setMimeData(mimeData);
-        drag->setHotSpot(QPoint(0,0));
-        drag->exec();
-    }
-}
-
-void KWalletEntryList::dropEvent(QDropEvent *e) {
-    QTreeWidgetItem *i = itemAt(e->pos());
-    itemDropped(e, i);
-}
-
-void KWalletEntryList::dragEnterEvent(QDragEnterEvent *e) {
-    e->accept();
-}
-
-void KWalletEntryList::dragMoveEvent(QDragMoveEvent *e) {
-    QTreeWidgetItem *i = itemAt(e->pos());
-    e->ignore();
-    const QMimeData *em = e->mimeData();
-    if (i) {
-        if (em->hasFormat(QLatin1String("application/x-kwallet-entry")) ||
-            em->hasFormat(QLatin1String("text/uri-list"))) {
-            e->accept();
-        }
-    }
-    if ((em->hasFormat(QLatin1String("application/x-kwallet-folder")) &&
-        e->source() != viewport()) ||
-        em->hasFormat(QLatin1String("text/uri-list"))) {
-        e->accept();
-    }
-}
-
-KWalletFolderItem* KWalletEntryList::getFolder(const QString& name) {
-    for (int i = 0; i < topLevelItemCount(); ++i) {
-        KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(topLevelItem(i));
-        if (!fi) {
-            continue;
-        }
-        if (name == fi->name()) {
-            return fi;
-        }
-    }
-    return 0;
-}
-
-KWalletFolderItem *KWalletEntryList::getItemFolder(QTreeWidgetItem *item) {
-    switch (item->type()) {
-        case KWalletFolderItemClass:
-            return dynamic_cast<KWalletFolderItem *>(item);
-        case KWalletContainerItemClass:
-            return dynamic_cast<KWalletFolderItem *>(item->parent());
-        case KWalletEntryItemClass:
-            return dynamic_cast<KWalletFolderItem *>(item->parent()->parent());
-    }
-    return 0;
-}
-
-void KWalletEntryList::selectFirstVisible()
-{
-    QTreeWidgetItemIterator it(this);
-    while (*it) {
-        QTreeWidgetItem *item = *it++;
-        if (!item->isHidden()) {
-            // if it's a leaf, then select it and quit
-            if (item->childCount() ==0) {
-                // kDebug() << "selecting " << item->text(0);
-                setCurrentItem(item);
-                break;
-            }
-        }
-    }
-}
-
-void KWalletEntryList::refreshItemsCount()
-{
-    QTreeWidgetItemIterator it(this);
-    while (*it) {
-        QTreeWidgetItem *item = *it++;
-        KWalletFolderItem *fi = dynamic_cast< KWalletFolderItem* >(item);
-        if (fi) {
-            fi->refreshItemsCount();
-        }
-    }
-}
-
-class ReturnPressedFilter : public QObject
-{
-public:
-    ReturnPressedFilter(KListWidget *parent) : QObject(parent)
-    {
-        parent->installEventFilter(this);
-    }
-
-    bool eventFilter(QObject * /*watched*/, QEvent *event)
-    {
-        if (event->type () == QEvent::KeyPress) {
-            QKeyEvent *ke = static_cast<QKeyEvent *>(event);
-            if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) {
-                KListWidget *p = static_cast<KListWidget*>(parent());
-                QMetaObject::invokeMethod(p, "executed", Q_ARG(QListWidgetItem*, p->currentItem()));
-                return true;
-            }
-        }
-        return false;
-    }
-};
-
-#include "moc_allyourbase.cpp"
diff --git a/kwalletmanager/src/manager/allyourbase.h b/kwalletmanager/src/manager/allyourbase.h
deleted file mode 100644 (file)
index 6585f64..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-   Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
-   Copyright (C) 2005 Isaac Clerencia <isaac@warp.es>
-
-   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 ALLYOURBASE_H
-#define ALLYOURBASE_H
-
-#include <kwallet.h>
-#include <kiconloader.h>
-#include <kicontheme.h>
-#include <klistwidget.h>
-#include <QPixmap>
-#include <QtGui/qevent.h>
-#include <QtGui/qevent.h>
-#include <QtGui/qevent.h>
-#include <QTreeWidget>
-
-#define KWALLETENTRYMAGIC ((quint32) 0x6B776C65)
-#define KWALLETFOLDERMAGIC ((quint32) 0x6B776C66)
-
-
-enum KWalletListItemClasses {
-    KWalletFolderItemClass = QTreeWidgetItem::UserType,
-    KWalletContainerItemClass,
-    KWalletEntryItemClass,
-    KWalletUnknownClass
-};
-
-class KWalletEntryItem : public QTreeWidgetItem {
-public:
-    KWalletEntryItem(KWallet::Wallet *w, QTreeWidgetItem* parent, const QString& ename);
-    virtual ~KWalletEntryItem();
-
-    const QString& name() const { return m_name; }
-    void setName(const QString& n);
-    // Cancel renaming
-    void restoreName();
-
-public:
-    KWallet::Wallet *_wallet;
-
-private:
-    void setText(int, const QString&) {} // forbidden
-    QString m_name;
-};
-
-class KWalletContainerItem : public QTreeWidgetItem {
-public:
-    KWalletContainerItem(QTreeWidgetItem* parent, const QString& name, KWallet::Wallet::EntryType entryType);
-    virtual ~KWalletContainerItem();
-
-public:
-    KWallet::Wallet::EntryType entryType();
-    bool contains(const QString& itemKey);
-    QTreeWidgetItem* getItem(const QString& itemKey);
-
-private:
-    KWallet::Wallet::EntryType _type;
-};
-
-class KWalletFolderItem : public QTreeWidgetItem {
-public:
-    KWalletFolderItem(KWallet::Wallet *w, QTreeWidget* parent, const QString& name, int entries);
-    virtual ~KWalletFolderItem();
-
-    virtual bool acceptDrop(const QMimeData *mimedata) const;
-
-    QString name() const;
-    void refresh();
-    KWalletContainerItem* getContainer(KWallet::Wallet::EntryType type);
-    QPixmap getFolderIcon(KIconLoader::Group group);
-    bool contains(const QString& itemKey);
-    QTreeWidgetItem* getItem(const QString& itemKey);
-    void refreshItemsCount();
-
-public:
-    KWallet::Wallet *_wallet;
-
-private:
-    QString _name;
-    int _entries;
-};
-
-class KWalletEntryList : public QTreeWidget {
-Q_OBJECT
-
-public:
-    explicit KWalletEntryList(QWidget *parent, const char *name = 0L);
-    virtual ~KWalletEntryList();
-
-    bool existsFolder(const QString& name);
-    KWalletFolderItem* getFolder(const QString& name);
-    void setWallet(KWallet::Wallet *w);
-
-protected:
-    virtual void dragEnterEvent(QDragEnterEvent *e);
-    virtual void dragMoveEvent(QDragMoveEvent *e);
-    virtual void dropEvent(QDropEvent *e);
-    virtual void mousePressEvent(QMouseEvent *e);
-    virtual void mouseMoveEvent(QMouseEvent *e);
-    
-    void itemDropped(QDropEvent *e, QTreeWidgetItem *item);
-
-private:
-    static KWalletFolderItem *getItemFolder(QTreeWidgetItem *item);
-    QMimeData *itemMimeData(const QTreeWidgetItem *i) const;
-
-public:
-    KWallet::Wallet *_wallet;
-    QPoint _mousePos;
-
-public Q_SLOTS:
-    void selectFirstVisible();
-    void refreshItemsCount();
-};
-
-class KWalletItem : public QListWidgetItem {
-public:
-    KWalletItem(QListWidget *parent, const QString& walletName);
-    virtual ~KWalletItem();
-
-    void setOpen(bool state);
-    
-    void processDropEvent(QDropEvent *e);
-
-private:
-    bool _open;
-};
-
-inline QDataStream& operator<<(QDataStream& str, const KWalletEntryItem& w) {
-    QString name = w.text(0);
-    str << name;
-    KWallet::Wallet::EntryType et = w._wallet->entryType(name);
-    str << qint64(et);
-    QByteArray a;
-    w._wallet->readEntry(name, a);
-    str << a;
-    return str;
-}
-
-inline QDataStream& operator<<(QDataStream& str, const KWalletFolderItem& w) {
-    QString oldFolder = w._wallet->currentFolder();
-    str << w.name();
-    w._wallet->setFolder(w.name());
-    QStringList entries = w._wallet->entryList();
-    foreach (const QString &entry, entries) {
-        str << entry;
-        KWallet::Wallet::EntryType et = w._wallet->entryType(entry);
-        str << (qint32)et;
-        QByteArray a;
-        w._wallet->readEntry(entry, a);
-        str << a;
-    }
-    w._wallet->setFolder(oldFolder);
-    return str;
-}
-
-#endif
diff --git a/kwalletmanager/src/manager/applicationsmanager.cpp b/kwalletmanager/src/manager/applicationsmanager.cpp
deleted file mode 100644 (file)
index 93972d5..0000000
+++ /dev/null
@@ -1,60 +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 "applicationsmanager.h"
-#include "connectedappmodel.h"
-#include "authorizedappmodel.h"
-#include "kwallet.h"
-
-#include <QStyledItemDelegate>
-#include <QPainter>
-#include <QStandardItemModel>
-#include <kdebug.h>
-
-ApplicationsManager::ApplicationsManager(QWidget* parent):
-    QWidget(parent),
-    _wallet(0),
-    _connectedAppsModel(0),
-    _authorizedAppModel(0)
-{
-    setupUi(this);
-}
-
-ApplicationsManager::~ApplicationsManager()
-{
-    delete _connectedAppsModel;
-    delete _authorizedAppModel;
-}
-
-void ApplicationsManager::setWallet(KWallet::Wallet* wallet)
-{
-    Q_ASSERT(wallet != 0);
-    _wallet = wallet;
-
-    // create the disconnect widget menu
-    _connectedAppsModel = new ConnectedAppModel(_wallet);
-    _connectedApps->setWallet(_wallet);
-    _connectedApps->setModel(_connectedAppsModel);
-
-    _authorizedAppModel = new AuthorizedAppModel(_wallet);
-    _authorizedApps->setWallet(_wallet);
-    _authorizedApps->setModel(_authorizedAppModel);
-}
-
-#include "moc_applicationsmanager.cpp"
diff --git a/kwalletmanager/src/manager/applicationsmanager.h b/kwalletmanager/src/manager/applicationsmanager.h
deleted file mode 100644 (file)
index 4311233..0000000
+++ /dev/null
@@ -1,48 +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 APPLICATIONSMANAGER_H
-#define APPLICATIONSMANAGER_H
-
-#include "ui_applicationsmanager.h"
-#include <QWidget>
-
-class AuthorizedAppModel;
-class ConnectedAppModel;
-namespace KWallet {
-class Wallet;
-}
-
-
-class ApplicationsManager : public QWidget, public Ui::ApplicationsManager
-{
-    Q_OBJECT
-public:
-    ApplicationsManager(QWidget *parent);
-    virtual ~ApplicationsManager();
-
-    void setWallet(KWallet::Wallet *wallet);
-
-private:
-    KWallet::Wallet     *_wallet;
-    ConnectedAppModel   *_connectedAppsModel;
-    AuthorizedAppModel  *_authorizedAppModel;
-};
-
-#endif // APPLICATIONSMANAGER_H
diff --git a/kwalletmanager/src/manager/applicationsmanager.ui b/kwalletmanager/src/manager/applicationsmanager.ui
deleted file mode 100644 (file)
index bba76f5..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ApplicationsManager</class>
- <widget class="QWidget" name="ApplicationsManager">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>620</width>
-    <height>458</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>These applications are currently connected to this wallet:</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="ConnectedApplicationsTable" name="_connectedApps">
-     <property name="horizontalScrollBarPolicy">
-      <enum>Qt::ScrollBarAlwaysOff</enum>
-     </property>
-     <property name="showDropIndicator" stdset="0">
-      <bool>false</bool>
-     </property>
-     <property name="dragDropOverwriteMode">
-      <bool>false</bool>
-     </property>
-     <property name="alternatingRowColors">
-      <bool>true</bool>
-     </property>
-     <property name="selectionMode">
-      <enum>QAbstractItemView::SingleSelection</enum>
-     </property>
-     <property name="selectionBehavior">
-      <enum>QAbstractItemView::SelectRows</enum>
-     </property>
-     <property name="showGrid">
-      <bool>false</bool>
-     </property>
-     <property name="wordWrap">
-      <bool>false</bool>
-     </property>
-     <attribute name="horizontalHeaderVisible">
-      <bool>false</bool>
-     </attribute>
-     <attribute name="horizontalHeaderStretchLastSection">
-      <bool>true</bool>
-     </attribute>
-     <attribute name="verticalHeaderVisible">
-      <bool>false</bool>
-     </attribute>
-     <attribute name="verticalHeaderStretchLastSection">
-      <bool>false</bool>
-     </attribute>
-    </widget>
-   </item>
-   <item>
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>These applications are authorized to access this wallet:</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="AuthorizedApplicationsTable" name="_authorizedApps">
-     <property name="showDropIndicator" stdset="0">
-      <bool>false</bool>
-     </property>
-     <property name="dragDropOverwriteMode">
-      <bool>false</bool>
-     </property>
-     <property name="alternatingRowColors">
-      <bool>true</bool>
-     </property>
-     <property name="selectionMode">
-      <enum>QAbstractItemView::SingleSelection</enum>
-     </property>
-     <property name="selectionBehavior">
-      <enum>QAbstractItemView::SelectRows</enum>
-     </property>
-     <property name="showGrid">
-      <bool>false</bool>
-     </property>
-     <attribute name="horizontalHeaderVisible">
-      <bool>false</bool>
-     </attribute>
-     <attribute name="horizontalHeaderStretchLastSection">
-      <bool>true</bool>
-     </attribute>
-     <attribute name="verticalHeaderVisible">
-      <bool>false</bool>
-     </attribute>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>ConnectedApplicationsTable</class>
-   <extends>QTableView</extends>
-   <header>connectedapplicationstable.h</header>
-  </customwidget>
-  <customwidget>
-   <class>AuthorizedApplicationsTable</class>
-   <extends>QTableView</extends>
-   <header>authorizedapplicationstable.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/kwalletmanager/src/manager/authorizedapplicationstable.cpp b/kwalletmanager/src/manager/authorizedapplicationstable.cpp
deleted file mode 100644 (file)
index 32c4d22..0000000
+++ /dev/null
@@ -1,62 +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 "authorizedapplicationstable.h"
-#include "authorizedappmodel.h"
-#include "revokeauthbutton.h"
-
-AuthorizedApplicationsTable::AuthorizedApplicationsTable(QWidget* parent) :
-    QTableView(parent),
-    _wallet(0)
-{
-}
-
-void AuthorizedApplicationsTable::setWallet(KWallet::Wallet* wallet)
-{
-    _wallet = wallet;
-}
-
-void AuthorizedApplicationsTable::setModel(QAbstractItemModel* model)
-{
-    Q_ASSERT(_wallet != 0);
-
-    AuthorizedAppModel *appModel = qobject_cast<AuthorizedAppModel*>(model);
-    Q_ASSERT(appModel != 0);
-
-    QTableView::setModel(model);
-    for (int row =0; row < model->rowCount(); row++) {
-        RevokeAuthButton *btn = new RevokeAuthButton( model->index(row, 0).data().toString() , _wallet);
-        btn->setFixedHeight(btn->sizeHint().height());
-        setRowHeight(row, btn->height());
-        setIndexWidget( model->index(row, 1), btn);
-        connect(btn, SIGNAL(appRevoked(QString)), appModel, SLOT(removeApp(QString)));
-    }
-}
-
-void AuthorizedApplicationsTable::resizeEvent(QResizeEvent* resizeEvent)
-{
-    // this will keep disconnect buttons column at it's minimum size and
-    // make the application names take the reminder of the horizontal space
-    resizeColumnsToContents();
-    int appColumnSize = contentsRect().width() - columnWidth(1) - 50;
-    setColumnWidth(0, appColumnSize);
-    QAbstractItemView::resizeEvent(resizeEvent);
-}
-
-#include "moc_authorizedapplicationstable.cpp"
diff --git a/kwalletmanager/src/manager/authorizedapplicationstable.h b/kwalletmanager/src/manager/authorizedapplicationstable.h
deleted file mode 100644 (file)
index 05b3e42..0000000
+++ /dev/null
@@ -1,46 +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 AUTHORIZEDAPPLICATIONSTABLE_H
-#define AUTHORIZEDAPPLICATIONSTABLE_H
-
-#include <QTableView>
-
-namespace KWallet {
-class Wallet;
-}
-
-class AuthorizedApplicationsTable : public QTableView
-{
-    Q_OBJECT
-public:
-    explicit AuthorizedApplicationsTable(QWidget* parent);
-
-    virtual void setModel(QAbstractItemModel *model);
-    void setWallet(KWallet::Wallet *wallet);
-
-protected:
-    virtual void resizeEvent(QResizeEvent *resizeEvent);
-
-private:
-    KWallet::Wallet     *_wallet;
-};
-
-#endif // AUTHORIZEDAPPLICATIONSTABLE_H
diff --git a/kwalletmanager/src/manager/authorizedappmodel.cpp b/kwalletmanager/src/manager/authorizedappmodel.cpp
deleted file mode 100644 (file)
index 16a39e5..0000000
+++ /dev/null
@@ -1,80 +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 "authorizedappmodel.h"
-
-#include <kconfiggroup.h>
-#include <kwallet.h>
-#include <kdebug.h>
-#include <QTimer>
-
-AuthorizedAppModel::AuthorizedAppModel(KWallet::Wallet* wallet): 
-    QStandardItemModel(),
-    _cfg(KSharedConfig::openConfig(QLatin1String( "kwalletrc" ), KConfig::NoGlobals)),
-    _wallet(wallet)
-{
-    // TODO: handle "Auto Deny" applications
-    // KConfigGroup ad(_cfg, "Auto Deny");
-
-    KConfigGroup aa(_cfg, "Auto Allow");
-    QString walletName = _wallet->walletName();
-    const QStringList keys = aa.entryMap().keys();
-    Q_FOREACH(QString cfgWalletName, keys) {
-        if (cfgWalletName == walletName) {
-            const QStringList apps = aa.readEntry(cfgWalletName, QStringList());
-            int row = 0;
-            Q_FOREACH(QString appName, apps) {
-                setItem(row, 0, new QStandardItem(appName));
-                setItem(row, 1, new QStandardItem("dummy")); // this item will be hidden by the disconnect button, see below setIndexWidget call
-                _authorizedAppsIndexMap.insert(appName, QPersistentModelIndex(index(row, 0)));
-                row++;
-            }
-        }
-    }
-}
-
-void AuthorizedAppModel::removeApp(QString appName)
-{
-    if (_authorizedAppsIndexMap.contains(appName)) {
-        QPersistentModelIndex idx = _authorizedAppsIndexMap[appName];
-        if (idx.isValid()) {
-            if (!removeRow(idx.row())) {
-                kDebug() << "Remove row failed for app " << appName;
-            }
-        }
-    } else {
-        kDebug() << "Attempting to remove unknown application " << appName;
-    }
-    QTimer::singleShot(0, this, SLOT(saveConfig()));
-}
-
-void AuthorizedAppModel::saveConfig()
-{
-    QStringList appList;
-    for (int r=0; r <rowCount(); r++) {
-        appList << item(r)->text();
-    }
-    QString walletName = _wallet->walletName();
-    KConfigGroup config(_cfg, "Auto Allow");
-    config.deleteEntry(walletName);
-    config.writeEntry(_wallet->walletName(), appList);
-    _cfg->sync();
-}
-
-#include "moc_authorizedappmodel.cpp"
diff --git a/kwalletmanager/src/manager/authorizedappmodel.h b/kwalletmanager/src/manager/authorizedappmodel.h
deleted file mode 100644 (file)
index 186c9bf..0000000
+++ /dev/null
@@ -1,48 +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 AUTHORIZEDAPPMODEL_H
-#define AUTHORIZEDAPPMODEL_H
-
-#include <QStandardItemModel>
-#include <ksharedconfig.h>
-
-namespace KWallet {
-class Wallet;
-}
-
-class AuthorizedAppModel : public QStandardItemModel
-{
-    Q_OBJECT
-public:
-    explicit AuthorizedAppModel(KWallet::Wallet *wallet);
-
-public Q_SLOTS:
-    void removeApp(QString);
-
-private Q_SLOTS:
-    void saveConfig();
-
-private:
-    KSharedConfig::Ptr                      _cfg;
-    KWallet::Wallet                         *_wallet;
-    QMap<QString, QPersistentModelIndex>    _authorizedAppsIndexMap;
-};
-
-#endif // AUTHORIZEDAPPMODEL_H
diff --git a/kwalletmanager/src/manager/connectedapplicationstable.cpp b/kwalletmanager/src/manager/connectedapplicationstable.cpp
deleted file mode 100644 (file)
index e6e1a7f..0000000
+++ /dev/null
@@ -1,66 +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 "connectedapplicationstable.h"
-#include "disconnectappbutton.h"
-#include "connectedappmodel.h"
-
-#include <klocalizedstring.h>
-#include <QPushButton>
-
-ConnectedApplicationsTable::ConnectedApplicationsTable(QWidget* parent):
-    QTableView(parent),
-    _wallet(0)
-{
-}
-
-void ConnectedApplicationsTable::setWallet(KWallet::Wallet* wallet)
-{
-    _wallet = wallet;
-}
-
-void ConnectedApplicationsTable::setModel(QAbstractItemModel* model)
-{
-    Q_ASSERT(_wallet != 0);
-
-    ConnectedAppModel *appModel = qobject_cast<ConnectedAppModel*>(model);
-    Q_ASSERT(appModel != 0);
-
-    QTableView::setModel(model);
-    for (int row =0; row < model->rowCount(); row++) {
-        DisconnectAppButton *btn = new DisconnectAppButton( model->index(row, 0).data().toString() , _wallet);
-        btn->setFixedHeight(btn->sizeHint().height());
-        setRowHeight(row, btn->height());
-        setIndexWidget( model->index(row, 1), btn);
-        connect(btn, SIGNAL(appDisconnected(QString)), appModel, SLOT(removeApp(QString)));
-    }
-}
-
-void ConnectedApplicationsTable::resizeEvent(QResizeEvent* resizeEvent)
-{
-    // this will keep disconnect buttons column at it's minimum size and
-    // make the application names take the reminder of the horizontal space
-    resizeColumnsToContents();
-    int appColumnSize = contentsRect().width() - columnWidth(1) - 50;
-    setColumnWidth(0, appColumnSize);
-    QAbstractItemView::resizeEvent(resizeEvent);
-}
-
-#include "moc_connectedapplicationstable.cpp"
diff --git a/kwalletmanager/src/manager/connectedapplicationstable.h b/kwalletmanager/src/manager/connectedapplicationstable.h
deleted file mode 100644 (file)
index 6c42886..0000000
+++ /dev/null
@@ -1,42 +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 CONNECTEDAPPLICATIONSTABLE_H
-#define CONNECTEDAPPLICATIONSTABLE_H
-
-#include <kwallet.h>
-#include <QTableView>
-
-class ConnectedApplicationsTable : public QTableView
-{
-    Q_OBJECT
-public:
-    explicit ConnectedApplicationsTable(QWidget *parent);
-
-    virtual void setModel(QAbstractItemModel *model);
-    void setWallet(KWallet::Wallet *wallet);
-
-protected:
-    virtual void resizeEvent(QResizeEvent *resizeEvent);
-
-private:
-    KWallet::Wallet     *_wallet;
-};
-
-#endif // CONNECTEDAPPLICATIONSTABLE_H
diff --git a/kwalletmanager/src/manager/connectedappmodel.cpp b/kwalletmanager/src/manager/connectedappmodel.cpp
deleted file mode 100644 (file)
index e15d1f0..0000000
+++ /dev/null
@@ -1,70 +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 "connectedappmodel.h"
-
-#include <kwallet.h>
-#include <kdebug.h>
-
-
-ConnectedAppModel::ConnectedAppModel(KWallet::Wallet* wallet):
-    QStandardItemModel(),
-    _wallet(wallet)
-{
-    refresh();
-}
-
-void ConnectedAppModel::refresh()
-{
-    clear();
-    _connectedAppsIndexMap.clear();
-
-    _connectedApps = KWallet::Wallet::users(_wallet->walletName());
-    int row =0;
-    Q_FOREACH(QString appName, _connectedApps ) {
-        // for un unknown reason, kwalletd returs empty strings so lets avoid inserting them
-        // FIXME: find out why kwalletd returns empty strings here
-        if (appName.length()>0) {
-            QStandardItem *item = new QStandardItem(appName);
-            item->setEditable(false);
-            setItem(row, 0, item);
-            // this item will be hidden by the disconnect button, see below setIndexWidget call
-            setItem(row, 1, new QStandardItem("dummy"));
-            _connectedAppsIndexMap.insert(appName, QPersistentModelIndex(index(row, 0)));
-            row++;
-        }
-    }
-}
-
-void ConnectedAppModel::removeApp(QString appName)
-{
-    if (_connectedAppsIndexMap.contains(appName)) {
-        QPersistentModelIndex idx = _connectedAppsIndexMap[appName];
-        if (idx.isValid()) {
-            if (!removeRow(idx.row())) {
-                kDebug() << "Remove row failed for app " << appName;
-            }
-        }
-    } else {
-        kDebug() << "Attempting to remove unknown application " << appName;
-    }
-}
-
-
-#include "moc_connectedappmodel.cpp"
diff --git a/kwalletmanager/src/manager/connectedappmodel.h b/kwalletmanager/src/manager/connectedappmodel.h
deleted file mode 100644 (file)
index 00429ba..0000000
+++ /dev/null
@@ -1,46 +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 CONNECTEDAPPMODEL_H
-#define CONNECTEDAPPMODEL_H
-
-#include <QStandardItemModel>
-
-namespace KWallet {
-class Wallet;
-}
-
-class ConnectedAppModel : public QStandardItemModel
-{
-    Q_OBJECT
-public:
-    explicit ConnectedAppModel(KWallet::Wallet *wallet);
-
-public Q_SLOTS:
-    void refresh();
-    void removeApp(QString);
-
-private:
-    KWallet::Wallet                         *_wallet;
-    QStringList                             _connectedApps;
-    QMap<QString, QPersistentModelIndex>    _connectedAppsIndexMap;
-};
-
-
-#endif // CONNECTEDAPPMODEL_H
diff --git a/kwalletmanager/src/manager/disconnectappbutton.cpp b/kwalletmanager/src/manager/disconnectappbutton.cpp
deleted file mode 100644 (file)
index 11c3954..0000000
+++ /dev/null
@@ -1,40 +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 "disconnectappbutton.h"
-
-#include <klocalizedstring.h>
-#include <kwallet.h>
-
-DisconnectAppButton::DisconnectAppButton(const QString& appName, KWallet::Wallet* wallet) :
-        _appName(appName), _wallet(wallet) 
-{
-    setObjectName(QString("Disconnect_%1").arg(appName));
-    setText(i18n("Disconnect"));
-    connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked()));
-}
-
-void DisconnectAppButton::onClicked()
-{
-    if (_wallet->disconnectApplication(_wallet->walletName(), _appName)) {
-        emit appDisconnected(_appName);
-    }
-}
-
-#include "moc_disconnectappbutton.cpp"
diff --git a/kwalletmanager/src/manager/disconnectappbutton.h b/kwalletmanager/src/manager/disconnectappbutton.h
deleted file mode 100644 (file)
index 0b5df67..0000000
+++ /dev/null
@@ -1,47 +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 DISCONNECTAPPBUTTON_H
-#define DISCONNECTAPPBUTTON_H
-
-#include <QPushButton>
-
-namespace KWallet {
-    class Wallet;
-}
-
-class DisconnectAppButton : public QPushButton {
-    Q_OBJECT
-public:
-    DisconnectAppButton(const QString& appName, KWallet::Wallet *wallet);
-
-Q_SIGNALS:
-    void appDisconnected(QString);
-
-private Q_SLOTS:
-    void onClicked();
-
-private:
-    QString             _appName;
-    KWallet::Wallet     *_wallet;
-};
-
-
-
-#endif // DISCONNECTAPPBUTTON_H
diff --git a/kwalletmanager/src/manager/hi128-app-kwalletmanager.png b/kwalletmanager/src/manager/hi128-app-kwalletmanager.png
deleted file mode 100644 (file)
index 7790d7c..0000000
Binary files a/kwalletmanager/src/manager/hi128-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi128-app-kwalletmanager2.png b/kwalletmanager/src/manager/hi128-app-kwalletmanager2.png
deleted file mode 100644 (file)
index 14ae5c1..0000000
Binary files a/kwalletmanager/src/manager/hi128-app-kwalletmanager2.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi16-app-kwalletmanager.png b/kwalletmanager/src/manager/hi16-app-kwalletmanager.png
deleted file mode 100644 (file)
index aa2a193..0000000
Binary files a/kwalletmanager/src/manager/hi16-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi16-app-kwalletmanager2.png b/kwalletmanager/src/manager/hi16-app-kwalletmanager2.png
deleted file mode 100644 (file)
index 9bee4c4..0000000
Binary files a/kwalletmanager/src/manager/hi16-app-kwalletmanager2.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi22-app-kwalletmanager.png b/kwalletmanager/src/manager/hi22-app-kwalletmanager.png
deleted file mode 100644 (file)
index b074f36..0000000
Binary files a/kwalletmanager/src/manager/hi22-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi32-app-kwalletmanager.png b/kwalletmanager/src/manager/hi32-app-kwalletmanager.png
deleted file mode 100644 (file)
index b65163f..0000000
Binary files a/kwalletmanager/src/manager/hi32-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi32-app-kwalletmanager2.png b/kwalletmanager/src/manager/hi32-app-kwalletmanager2.png
deleted file mode 100644 (file)
index 63f1ca3..0000000
Binary files a/kwalletmanager/src/manager/hi32-app-kwalletmanager2.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi48-app-kwalletmanager.png b/kwalletmanager/src/manager/hi48-app-kwalletmanager.png
deleted file mode 100644 (file)
index a78433f..0000000
Binary files a/kwalletmanager/src/manager/hi48-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi48-app-kwalletmanager2.png b/kwalletmanager/src/manager/hi48-app-kwalletmanager2.png
deleted file mode 100644 (file)
index 01a7dbb..0000000
Binary files a/kwalletmanager/src/manager/hi48-app-kwalletmanager2.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi64-app-kwalletmanager.png b/kwalletmanager/src/manager/hi64-app-kwalletmanager.png
deleted file mode 100644 (file)
index c9dcee1..0000000
Binary files a/kwalletmanager/src/manager/hi64-app-kwalletmanager.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/hi64-app-kwalletmanager2.png b/kwalletmanager/src/manager/hi64-app-kwalletmanager2.png
deleted file mode 100644 (file)
index a0c7138..0000000
Binary files a/kwalletmanager/src/manager/hi64-app-kwalletmanager2.png and /dev/null differ
diff --git a/kwalletmanager/src/manager/kbetterthankdialogbase.cpp b/kwalletmanager/src/manager/kbetterthankdialogbase.cpp
deleted file mode 100644 (file)
index 347882b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * This file is part of the KDE project.
- * Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License version 2 as published by the Free Software Foundation.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#include "kbetterthankdialogbase.h"
-
-void KBetterThanKDialogBase::clicked()
-{
-    if (sender() == _allowOnce) {
-       done(3);
-    } else if (sender() == _allowAlways) {
-       done(1);
-    } else if (sender() == _deny) {
-       done(4);
-    } else if (sender() == _denyForever) {
-       done(2);
-    }
-}
-
-
-void KBetterThanKDialogBase::setLabel( const QString & label )
-{
-    _label->setText(label);
-}
-
-
-KBetterThanKDialogBase::KBetterThanKDialogBase( QWidget* parent )
-    : QDialog( parent ), Ui_KBetterThanKDialogBase()
-{
-    setupUi( this );
-    connect(_allowOnce, SIGNAL(clicked()), this, SLOT(clicked()));
-    connect(_allowAlways, SIGNAL(clicked()), this, SLOT(clicked()));
-    connect(_deny,SIGNAL(clicked()), this, SLOT(clicked()));
-    connect(_denyForever,SIGNAL(clicked()), this, SLOT(clicked()));
-    _allowOnce->setFocus();
-}
-
-
-void KBetterThanKDialogBase::accept()
-{
-    setResult(3);
-}
-
-
-void KBetterThanKDialogBase::reject()
-{
-    QDialog::reject();
-    setResult(4);
-}
-#include "moc_kbetterthankdialogbase.cpp"
diff --git a/kwalletmanager/src/manager/kbetterthankdialogbase.h b/kwalletmanager/src/manager/kbetterthankdialogbase.h
deleted file mode 100644 (file)
index eaa9fa2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * This file is part of the KDE project.
- * Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License version 2 as published by the Free Software Foundation.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef KBETTERTHANKDIALOGBASE_H
-#define KBETTERTHANKDIALOGBASE_H
-
-#include "ui_kbetterthankdialogbase.h"
-
-
-class KBetterThanKDialogBase : public QDialog, private Ui_KBetterThanKDialogBase
-{
-    Q_OBJECT
-
-public:
-    KBetterThanKDialogBase( QWidget* parent = 0 );
-    
-
-public slots:
-    virtual void setLabel( const QString & label );
-    virtual void accept();
-    virtual void reject();
-
-private slots:
-    virtual void clicked();
-};
-
-#endif
diff --git a/kwalletmanager/src/manager/kbetterthankdialogbase.ui b/kwalletmanager/src/manager/kbetterthankdialogbase.ui
deleted file mode 100644 (file)
index 4702d09..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<ui version="4.0" stdsetdef="1" >
-  <class>KBetterThanKDialogBase</class>
-  <widget class="QDialog" name="KBetterThanKDialogBase" >
-    <property name="geometry" >
-      <rect>
-        <x>0</x>
-        <y>0</y>
-        <width>479</width>
-        <height>109</height>
-      </rect>
-    </property>
-    <layout class="QGridLayout" >
-      <property name="sizeConstraint" >
-        <enum>SetFixedSize</enum>
-      </property>
-      <item rowspan="1" row="0" column="0" colspan="3" >
-        <widget class="QLabel" name="_label" />
-      </item>
-      <item row="1" column="2" >
-        <spacer name="spacer1" >
-          <property name="sizeHint" >
-            <size>
-              <width>41</width>
-              <height>21</height>
-            </size>
-          </property>
-          <property name="sizeType" >
-            <enum>Expanding</enum>
-          </property>
-          <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-          </property>
-        </spacer>
-      </item>
-      <item row="1" column="1" >
-        <layout class="QHBoxLayout" >
-          <property name="margin" >
-            <number>0</number>
-          </property>
-          <item>
-            <widget class="QPushButton" name="_allowOnce" >
-              <property name="text" >
-                <string>&amp;Replace</string>
-              </property>
-              <property name="default" >
-                <bool>true</bool>
-              </property>
-            </widget>
-          </item>
-          <item>
-            <widget class="QPushButton" name="_allowAlways" >
-              <property name="text" >
-                <string>Replace &amp;All</string>
-              </property>
-            </widget>
-          </item>
-          <item>
-            <widget class="QPushButton" name="_deny" >
-              <property name="text" >
-                <string>&amp;Skip</string>
-              </property>
-            </widget>
-          </item>
-          <item>
-            <widget class="QPushButton" name="_denyForever" >
-              <property name="text" >
-                <string>Skip A&amp;ll</string>
-              </property>
-            </widget>
-          </item>
-        </layout>
-      </item>
-      <item row="1" column="0" >
-        <spacer name="spacer2" >
-          <property name="sizeHint" >
-            <size>
-              <width>61</width>
-              <height>21</height>
-            </size>
-          </property>
-          <property name="sizeType" >
-            <enum>Expanding</enum>
-          </property>
-          <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-          </property>
-        </spacer>
-      </item>
-    </layout>
-  </widget>
-</ui>
diff --git a/kwalletmanager/src/manager/kwalleteditor.cpp b/kwalletmanager/src/manager/kwalleteditor.cpp
deleted file mode 100644 (file)
index 7992a37..0000000
+++ /dev/null
@@ -1,1338 +0,0 @@
-/*
-   Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
-   Copyright (C) 2005 Isaac Clerencia <isaac@warp.es>
-
-   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 "kwalleteditor.h"
-#include "kbetterthankdialogbase.h"
-#include "kwmapeditor.h"
-#include "allyourbase.h"
-
-#include <stdlib.h>
-#include <QtXml/qdom.h>
-#include <QXmlStreamWriter>
-#include <kaction.h>
-#include <kdebug.h>
-#include <kdialog.h>
-#include <kfiledialog.h>
-#include <kinputdialog.h>
-#include <kio/netaccess.h>
-#include <kactioncollection.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kmenu.h>
-#include <ksqueezedtextlabel.h>
-#include <kstandarddirs.h>
-#include <kstandardaction.h>
-
-#include <ktemporaryfile.h>
-#include <kxmlguifactory.h>
-#include <QCheckBox>
-#include <QClipboard>
-#include <QPushButton>
-#include <QTimer>
-#include <QSet>
-#include <QTextStream>
-#include <QList>
-#include <QVBoxLayout>
-#include <QStack>
-#include <QToolButton>
-
-#include <assert.h>
-#include <ktoolbar.h>
-#include <kicon.h>
-#include <KAction>
-#include <KTreeWidgetSearchLine>
-
-QAction *KWalletEditor::_newFolderAction =0;
-QAction *KWalletEditor::_deleteFolderAction =0;
-QAction *KWalletEditor::_exportAction =0;
-QAction *KWalletEditor::_saveAsAction =0;
-QAction *KWalletEditor::_mergeAction =0;
-QAction *KWalletEditor::_importAction =0;
-KAction *KWalletEditor::_newEntryAction =0;
-KAction *KWalletEditor::_renameEntryAction =0;
-KAction *KWalletEditor::_deleteEntryAction =0;
-KAction *KWalletEditor::_copyPassAction =0;
-QAction *KWalletEditor::_alwaysShowContentsAction =0;
-QAction *KWalletEditor::_alwaysHideContentsAction =0;
-
-RegisterCreateActionsMethod KWalletEditor::_registerCreateActionMethod(&KWalletEditor::createActions);
-
-
-KWalletEditor::KWalletEditor(QWidget* parent, const char *name)
-    : QWidget(parent), _displayedItem(0), _actionCollection(0), _alwaysShowContents(false) {
-    setupUi( this );
-    setObjectName( QLatin1String( name ) );
-    _newWallet = false;
-    _splitter->setStretchFactor(0, 1);
-    _splitter->setStretchFactor(1, 2);
-    _contextMenu = new KMenu(this);
-
-    _undoChanges->setIcon(KIcon( QLatin1String( "edit-undo" )));
-    _saveChanges->setIcon(KIcon( QLatin1String( "document-save" )));
-
-    QVBoxLayout *box = new QVBoxLayout(_entryListFrame);
-    box->setMargin(0);
-    _entryList = new KWalletEntryList(_entryListFrame, "Wallet Entry List");
-    _entryList->setContextMenuPolicy(Qt::CustomContextMenu);
-    _searchLine = new KTreeWidgetSearchLine(_entryListFrame, _entryList);
-    _searchLine->setClickMessage(i18n("Search"));
-    connect(_searchLine, SIGNAL(textChanged(QString)), this, SLOT(onSearchTextChanged(QString)));
-    box->addWidget(_searchLine);
-    box->addWidget(_entryList);
-
-    _entryStack->setEnabled(true);
-
-    box = new QVBoxLayout(_entryStack->widget(2));
-    box->setMargin(0);
-    _mapEditorShowHide = new QCheckBox(i18n("&Show values"), _entryStack->widget(2));
-    connect(_mapEditorShowHide, SIGNAL(toggled(bool)), this, SLOT(showHideMapEditorValue(bool)));
-    _mapEditor = new KWMapEditor(_currentMap, _entryStack->widget(2));
-    box->addWidget(_mapEditorShowHide);
-    box->addWidget(_mapEditor);
-
-    // load splitter size
-    KConfigGroup cg(KGlobal::config(), "WalletEditor");
-    QList<int> splitterSize = cg.readEntry("SplitterSize", QList<int>());
-    if (splitterSize.size() != 2) {
-        splitterSize.clear();
-        splitterSize.append(_splitter->width()/2);
-        splitterSize.append(_splitter->width()/2);
-    }
-    _splitter->setSizes(splitterSize);
-    _alwaysShowContents = cg.readEntry("AlwaysShowContents", false);
-
-    _searchLine->setFocus();
-
-    connect(_entryList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
-            this, SLOT(entrySelectionChanged(QTreeWidgetItem*)));
-    connect(_entryList,
-            SIGNAL(customContextMenuRequested(QPoint)),
-            this,
-            SLOT(listContextMenuRequested(QPoint)));
-    connect(_entryList,
-            SIGNAL(itemChanged(QTreeWidgetItem*,int)),
-            this,
-            SLOT(listItemChanged(QTreeWidgetItem*,int)));
-
-    connect(_passwordValue, SIGNAL(textChanged()),
-            this, SLOT(entryEditted()));
-    connect(_mapEditor, SIGNAL(dirty()),
-            this, SLOT(entryEditted()));
-
-    connect(_undoChanges, SIGNAL(clicked()),
-            this, SLOT(restoreEntry()));
-    connect(_saveChanges, SIGNAL(clicked()),
-            this, SLOT(saveEntry()));
-
-    connect(_showContents, SIGNAL(clicked()),
-            this, SLOT(showPasswordContents()));
-    connect(_hideContents, SIGNAL(clicked()),
-            this, SLOT(hidePasswordContents()));
-
-    createActions(actionCollection());
-    // TODO: remove kwalleteditor.rc file
-}
-
-KWalletEditor::~KWalletEditor() {
-    emit enableFolderActions(false);
-    emit enableWalletActions(false);
-    emit enableContextFolderActions(false);
-    // save splitter size
-    KConfigGroup cg(KGlobal::config(), "WalletEditor");
-    cg.writeEntry("SplitterSize", _splitter->sizes());
-    cg.writeEntry("AlwaysShowContents", _alwaysShowContents);
-    cg.sync();
-
-    delete _w;
-    _w = 0L;
-    if (_nonLocal) {
-        KWallet::Wallet::closeWallet(_walletName, true);
-    }
-    delete _contextMenu;
-    _contextMenu = NULL;
-}
-
-void KWalletEditor::setWallet(KWallet::Wallet* wallet, bool isPath)
-{
-    Q_ASSERT(wallet != 0);
-    _walletName = wallet->walletName();
-    _nonLocal = isPath;
-
-    _w = wallet;
-    _entryList->setWallet(_w);
-    connect(_w, SIGNAL(walletOpened(bool)), this, SLOT(walletOpened(bool)));
-    connect(_w, SIGNAL(walletClosed()), this, SLOT(walletClosed()));
-    connect(_w, SIGNAL(folderUpdated(QString)), this, SLOT(updateEntries(QString)));
-    connect(_w, SIGNAL(folderListUpdated()), this, SLOT(updateFolderList()));
-    updateFolderList();
-
-    emit enableFolderActions(true);
-    emit enableWalletActions(true);
-    emit enableContextFolderActions(true);
-
-    _mapEditorShowHide->setChecked(false);
-    showHideMapEditorValue(false);
-
-    setFocus();
-    _searchLine->setFocus();
-}
-
-KActionCollection* KWalletEditor::actionCollection()
-{
-    if (_actionCollection == 0) {
-        _actionCollection = new KActionCollection(this);
-    }
-    return _actionCollection;
-}
-
-void KWalletEditor::createActions(KActionCollection* actionCollection) {
-    _newFolderAction = actionCollection->addAction( QLatin1String( "create_folder" ));
-    _newFolderAction->setText( i18n("&New Folder...") );
-    _newFolderAction->setIcon( KIcon( QLatin1String( "folder-new" )) );
-
-    _deleteFolderAction = actionCollection->addAction( QLatin1String( "delete_folder" ) );
-    _deleteFolderAction->setText( i18n("&Delete Folder") );
-
-    _mergeAction = actionCollection->addAction( QLatin1String(  "wallet_merge" ));
-    _mergeAction->setText( i18n("&Import Wallet...") );
-
-    _importAction= actionCollection->addAction( QLatin1String(  "wallet_import" ) );
-    _importAction->setText( i18n("&Import XML...") );
-
-    _exportAction = actionCollection->addAction( QLatin1String(  "wallet_export" ) );
-    _exportAction->setText( i18n("&Export as XML...") );
-
-    _saveAsAction = KStandardAction::saveAs(0, 0, actionCollection);
-
-    _copyPassAction = actionCollection->addAction( QLatin1String( "copy_action" ) );
-    _copyPassAction->setText( i18n("&Copy") );
-    _copyPassAction->setShortcut( Qt::Key_C + Qt::CTRL );
-    _copyPassAction->setEnabled(false);
-
-    _newEntryAction = actionCollection->addAction( QLatin1String(  "new_entry" ) );
-    _newEntryAction->setText( i18n( "&New..." ) );
-    _newEntryAction->setShortcut( Qt::Key_Insert );
-    _newEntryAction->setEnabled(false);
-
-    _renameEntryAction = actionCollection->addAction( QLatin1String(  "rename_entry" ) );
-    _renameEntryAction->setText( i18n( "&Rename" ) );
-    _renameEntryAction->setShortcut( Qt::Key_F2 );
-    _renameEntryAction->setEnabled(false);
-
-    _deleteEntryAction = actionCollection->addAction( QLatin1String(  "delete_entry" ) );
-    _deleteEntryAction->setText( i18n( "&Delete" ) );
-    _deleteEntryAction->setShortcut( Qt::Key_Delete );
-    _deleteEntryAction->setEnabled(false);
-
-    _alwaysShowContentsAction = actionCollection->addAction( QLatin1String( "always_show_contents" ));
-    _alwaysShowContentsAction->setText( i18n("Always show contents") );
-    _alwaysShowContentsAction->setCheckable(true);
-
-    _alwaysHideContentsAction = actionCollection->addAction( QLatin1String( "always_hide_contents") );
-    _alwaysHideContentsAction->setText( i18n("Always hide contents") );
-    _alwaysHideContentsAction->setCheckable(true);
-}
-
-void KWalletEditor::connectActions()
-{
-    connect(_newFolderAction, SIGNAL(triggered(bool)), SLOT(createFolder()));
-    connect(this, SIGNAL(enableFolderActions(bool)), _newFolderAction, SLOT(setEnabled(bool)));
-
-    connect(_deleteFolderAction, SIGNAL(triggered(bool)), SLOT(deleteFolder()));
-    connect(this, SIGNAL(enableContextFolderActions(bool)), _deleteFolderAction, SLOT(setEnabled(bool)));
-    connect(this, SIGNAL(enableFolderActions(bool)), _deleteFolderAction, SLOT(setEnabled(bool)));
-
-    connect(_mergeAction, SIGNAL(triggered(bool)), SLOT(importWallet()));
-    connect(this, SIGNAL(enableWalletActions(bool)), _mergeAction, SLOT(setEnabled(bool)));
-
-    connect(_importAction, SIGNAL(triggered(bool)), SLOT(importXML()));
-    connect(this, SIGNAL(enableWalletActions(bool)), _importAction, SLOT(setEnabled(bool)));
-
-    connect(_exportAction, SIGNAL(triggered(bool)), SLOT(exportXML()));
-    connect(this, SIGNAL(enableWalletActions(bool)), _exportAction, SLOT(setEnabled(bool)));
-
-    connect(_saveAsAction, SIGNAL(triggered(bool)), SLOT(saveAs()));
-    connect(this, SIGNAL(enableWalletActions(bool)), _saveAsAction, SLOT(setEnabled(bool)));
-
-    connect(_newEntryAction, SIGNAL(triggered(bool)), SLOT(newEntry()));
-
-    connect(_renameEntryAction, SIGNAL(triggered(bool)), SLOT(renameEntry()));
-
-    connect(_deleteEntryAction, SIGNAL(triggered(bool)), SLOT(deleteEntry()));
-
-    connect(_copyPassAction, SIGNAL(triggered(bool)), SLOT(copyPassword()));
-    connect(this, SIGNAL(enableWalletActions(bool)), _copyPassAction, SLOT(setEnabled(bool)));
-
-    _showContents->addAction(_alwaysShowContentsAction);
-    _alwaysShowContentsAction->setChecked(_alwaysShowContents);
-    connect(_alwaysShowContentsAction, SIGNAL(triggered(bool)), SLOT(onAlwaysShowContents(bool)));
-
-    _hideContents->addAction(_alwaysHideContentsAction);
-    _alwaysHideContentsAction->setChecked(!_alwaysShowContents);
-    connect(_alwaysHideContentsAction, SIGNAL(triggered(bool)), SLOT(onAlwaysHideContents(bool)));
-}
-
-void KWalletEditor::disconnectActions()
-{
-    disconnect(_newFolderAction, SIGNAL(triggered(bool)), this, SLOT(createFolder()));
-    disconnect(this, SIGNAL(enableFolderActions(bool)), _newFolderAction, SLOT(setEnabled(bool)));
-
-    disconnect(_deleteFolderAction, SIGNAL(triggered(bool)), this, SLOT(deleteFolder()));
-    disconnect(this, SIGNAL(enableContextFolderActions(bool)), _deleteFolderAction, SLOT(setEnabled(bool)));
-    disconnect(this, SIGNAL(enableFolderActions(bool)), _deleteFolderAction, SLOT(setEnabled(bool)));
-
-    disconnect(_mergeAction, SIGNAL(triggered(bool)), this, SLOT(importWallet()));
-    disconnect(this, SIGNAL(enableWalletActions(bool)), _mergeAction, SLOT(setEnabled(bool)));
-
-    disconnect(_importAction, SIGNAL(triggered(bool)), this, SLOT(importXML()));
-    disconnect(this, SIGNAL(enableWalletActions(bool)), _importAction, SLOT(setEnabled(bool)));
-
-    disconnect(_exportAction, SIGNAL(triggered(bool)), this, SLOT(exportXML()));
-    disconnect(this, SIGNAL(enableWalletActions(bool)), _exportAction, SLOT(setEnabled(bool)));
-
-    disconnect(_saveAsAction, SIGNAL(triggered(bool)), this, SLOT(saveAs()));
-    disconnect(this, SIGNAL(enableWalletActions(bool)), _saveAsAction, SLOT(setEnabled(bool)));
-
-    disconnect(_newEntryAction, SIGNAL(triggered(bool)), this, SLOT(newEntry()));
-
-    disconnect(_renameEntryAction, SIGNAL(triggered(bool)), this, SLOT(renameEntry()));
-
-    disconnect(_deleteEntryAction, SIGNAL(triggered(bool)), this, SLOT(deleteEntry()));
-
-    disconnect(_copyPassAction, SIGNAL(triggered(bool)), this, SLOT(copyPassword()));
-    disconnect(this, SIGNAL(enableWalletActions(bool)), _copyPassAction, SLOT(setEnabled(bool)));
-
-    disconnect(_alwaysShowContentsAction, SIGNAL(triggered(bool)), this, SLOT(onAlwaysShowContents(bool)));
-    disconnect(_alwaysHideContentsAction, SIGNAL(triggered(bool)), this, SLOT(onAlwaysHideContents(bool)));
-}
-
-void KWalletEditor::walletClosed() {
-    _w = 0L;
-    setEnabled(false);
-    emit enableWalletActions(false);
-    emit enableFolderActions(false);
-}
-
-
-void KWalletEditor::updateFolderList(bool checkEntries) {
-    const QStringList fl = _w->folderList();
-    QStack<QTreeWidgetItem*> trash;
-
-    for (int i = 0; i < _entryList->topLevelItemCount(); ++i) {
-        KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(_entryList->topLevelItem(i));
-        if (!fi) {
-            continue;
-        }
-        if (!fl.contains(fi->name())) {
-            trash.push(fi);
-        }
-    }
-
-    qDeleteAll(trash);
-    trash.clear();
-
-    for (QStringList::const_iterator i = fl.begin(); i != fl.end(); ++i) {
-        if (_entryList->existsFolder(*i)) {
-            if (checkEntries) {
-                updateEntries(*i);
-            }
-            continue;
-        }
-
-        _w->setFolder(*i);
-        const QStringList entries = _w->entryList();
-        KWalletFolderItem *item = new KWalletFolderItem(_w,_entryList, *i, entries.count());
-
-        KWalletContainerItem *pi = new KWalletContainerItem(item, i18n("Passwords"),KWallet::Wallet::Password);
-        KWalletContainerItem *mi = new KWalletContainerItem(item, i18n("Maps"),KWallet::Wallet::Map);
-        KWalletContainerItem *bi = new KWalletContainerItem(item, i18n("Binary Data"),KWallet::Wallet::Stream);
-        KWalletContainerItem *ui = new KWalletContainerItem(item, i18n("Unknown"),KWallet::Wallet::Unknown);
-
-        for (QStringList::const_iterator j = entries.begin(); j != entries.end(); ++j) {
-            switch (_w->entryType(*j)) {
-                case KWallet::Wallet::Password:
-                    new KWalletEntryItem(_w, pi, *j);
-                    break;
-                case KWallet::Wallet::Stream:
-                    new KWalletEntryItem(_w, bi, *j);
-                    break;
-                case KWallet::Wallet::Map:
-                    new KWalletEntryItem(_w, mi, *j);
-                    break;
-                case KWallet::Wallet::Unknown:
-                default:
-                    new QTreeWidgetItem(ui, QStringList() << *j);
-                    break;
-            }
-        }
-        _entryList->setEnabled(true);
-    }
-
-    //check if the current folder has been removed
-    if (!fl.contains(_currentFolder)) {
-        _currentFolder.clear();
-        _entryTitle->clear();
-        _iconTitle->clear();
-    }
-}
-
-void KWalletEditor::deleteFolder() {
-    if (_w) {
-        QTreeWidgetItem *i = _entryList->currentItem();
-        if (i) {
-            KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(i);
-            if (!fi) {
-                return;
-            }
-
-            int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the folder '%1' from the wallet?", fi->name()),QString(),KStandardGuiItem::del());
-            if (rc == KMessageBox::Continue) {
-                bool rc = _w->removeFolder(fi->name());
-                if (!rc) {
-                    KMessageBox::sorry(this, i18n("Error deleting folder."));
-                    return;
-                }
-                _currentFolder.clear();
-                _entryTitle->clear();
-                _iconTitle->clear();
-                updateFolderList();
-            }
-        }
-    }
-}
-
-
-void KWalletEditor::createFolder() {
-    if (_w) {
-        QString n;
-        bool ok;
-
-        do {
-            n = KInputDialog::getText(i18n("New Folder"),
-                                     i18n("Please choose a name for the new folder:"),
-                                     QString(),
-                                     &ok,
-                                     this);
-
-            if (!ok) {
-                return;
-            }
-
-            if (_entryList->existsFolder(n)) {
-                int rc = KMessageBox::questionYesNo(this,
-                                                    i18n("Sorry, that folder name is in use. Try again?"),
-                                                    QString(), KGuiItem(i18n("Try Again")), KGuiItem(i18n("Do Not Try")));
-                if (rc == KMessageBox::Yes) {
-                    continue;
-                }
-                n.clear();
-            }
-            break;
-        } while (true);
-
-        _w->createFolder(n);
-        updateFolderList();
-    }
-}
-
-void KWalletEditor::saveEntry() {
-    int rc = 1;
-    QTreeWidgetItem *item = _displayedItem; //  _entryList->currentItem();
-    _saveChanges->setEnabled(false);
-    _undoChanges->setEnabled(false);
-
-    if (item && _w && item->parent()) {
-        KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->parent());
-        if (ci) {
-            if (ci->entryType() == KWallet::Wallet::Password) {
-                rc = _w->writePassword(item->text(0), _passwordValue->toPlainText());
-            } else if (ci->entryType() == KWallet::Wallet::Map) {
-                _mapEditor->saveMap();
-                rc = _w->writeMap(item->text(0), _currentMap);
-            } else {
-                return;
-            }
-
-            if (rc == 0) {
-                return;
-            }
-        }
-    }
-
-    KMessageBox::sorry(this, i18n("Error saving entry. Error code: %1", rc));
-}
-
-
-void KWalletEditor::restoreEntry() {
-    entrySelectionChanged(_entryList->currentItem());
-}
-
-
-void KWalletEditor::entryEditted() {
-    _saveChanges->setEnabled(true);
-    _undoChanges->setEnabled(true);
-}
-
-
-void KWalletEditor::entrySelectionChanged(QTreeWidgetItem *item) {
-    // do not forget to save changes
-    if ( _saveChanges->isEnabled() && _displayedItem && (_displayedItem != item) ){
-        if ( KMessageBox::Yes ==  KMessageBox::questionYesNo(this, 
-                                            i18n("The contents of the current item has changed.\nDo you want to save changes?"))) {
-            saveEntry();
-        } else {
-            _saveChanges->setEnabled(false);
-            _undoChanges->setEnabled(false);
-        }
-    }
-    KWalletContainerItem *ci = 0L;
-    KWalletFolderItem *fi = 0L;
-
-    // clear the context menu
-    _contextMenu->clear();
-    _contextMenu->setEnabled(true);
-    // disable the entry actions (reenable them on adding)
-    _newEntryAction->setEnabled(false);
-    _renameEntryAction->setEnabled(false);
-    _deleteEntryAction->setEnabled(false);
-
-    if (item) {
-        // set the context menu's title
-        _contextMenu->addTitle(_contextMenu->fontMetrics().elidedText(
-                item->text(0), Qt::ElideMiddle, 200 ) );
-
-        // TODO rtti
-        switch (item->type()) {
-            case KWalletEntryItemClass: {
-                ci = dynamic_cast<KWalletContainerItem*>(item->parent());
-                if (!ci) {
-                    return;
-                }
-                fi = dynamic_cast<KWalletFolderItem*>(ci->parent());
-                if (!fi) {
-                    return;
-                }
-                _w->setFolder(fi->name());
-                _deleteFolderAction->setEnabled(false);
-
-                // add standard menu items
-                _contextMenu->addAction( _newEntryAction );
-                _contextMenu->addAction( _renameEntryAction );
-                _contextMenu->addAction( _deleteEntryAction );
-                _newEntryAction->setEnabled(true);
-                _renameEntryAction->setEnabled(true);
-                _deleteEntryAction->setEnabled(true);
-
-                if (ci->entryType() == KWallet::Wallet::Password) {
-                    QString pass;
-                    if (_w->readPassword(item->text(0), pass) == 0) {
-                        _entryStack->setCurrentIndex(4);
-                        _entryName->setText(i18n("Password: %1",
-                                        item->text(0)));
-                        _passwordValue->setText(pass);
-                        _saveChanges->setEnabled(false);
-                        _undoChanges->setEnabled(false);
-                    }
-                    // add a context-menu action for copying passwords
-                    _contextMenu->addSeparator();
-                    _contextMenu->addAction( _copyPassAction );
-                    if(_alwaysShowContents) {
-                        QTimer::singleShot(0, this, SLOT(showPasswordContents()));
-                    }
-                } else if (ci->entryType() == KWallet::Wallet::Map) {
-                    _entryStack->setCurrentIndex(2);
-                    if (_w->readMap(item->text(0), _currentMap) == 0) {
-                        _mapEditor->reload();
-                        _entryName->setText(i18n("Name-Value Map: %1", item->text(0)));
-                        _saveChanges->setEnabled(false);
-                        _undoChanges->setEnabled(false);
-                        showHideMapEditorValue(_mapEditorShowHide->isChecked());
-                    }
-                } else if (ci->entryType() == KWallet::Wallet::Stream) {
-                    _entryStack->setCurrentIndex(3);
-                    QByteArray ba;
-                    if (_w->readEntry(item->text(0), ba) == 0) {
-                        _entryName->setText(i18n("Binary Data: %1", item->text(0)));
-                        _saveChanges->setEnabled(false);
-                        _undoChanges->setEnabled(false);
-                    }
-                }
-                break;
-            }
-
-            case KWalletContainerItemClass: {
-                ci = dynamic_cast<KWalletContainerItem*>(item);
-                if (!ci) {
-                    return;
-                }
-                if (ci->entryType() == KWallet::Wallet::Unknown) {
-                    // disable context menu on unknown items
-                    _contextMenu->setEnabled(false);
-                } else {
-                    // add the context menu action
-                    _contextMenu->addAction( _newEntryAction );
-                    _newEntryAction->setEnabled(true);
-                }
-
-                fi = dynamic_cast<KWalletFolderItem*>(item->parent());
-                if (!fi) {
-                    return;
-                }
-                _w->setFolder(fi->name());
-                _deleteFolderAction->setEnabled(false);
-                _entryName->clear();
-                _entryStack->setCurrentIndex(0);
-                break;
-            }
-
-            case KWalletFolderItemClass: {
-                // add the context menu actions
-                _contextMenu->addAction( _newFolderAction );
-                _contextMenu->addAction( _deleteFolderAction );
-
-                fi = dynamic_cast<KWalletFolderItem*>(item);
-                if (!fi) {
-                    return;
-                }
-                _w->setFolder(fi->name());
-                _deleteFolderAction->setEnabled(true);
-                _entryName->clear();
-                _entryStack->setCurrentIndex(0);
-                break;
-            }
-
-            default: {
-                // all items but Unknown entries return have their
-                // rtti set. Unknown items can only be deleted.
-                _contextMenu->addAction( _deleteEntryAction );
-                _deleteEntryAction->setEnabled(true);
-                break;
-            }
-        }
-    } else {
-        // no item selected. add the "new folder" action to the context menu
-        _contextMenu->addAction( _newFolderAction );
-    }
-
-    if (fi) {
-        _currentFolder = fi->name();
-        _entryTitle->setText(QString::fromLatin1("<font size=\"+1\">%1</font>").arg(fi->text(0)));
-        _iconTitle->setPixmap(fi->getFolderIcon(KIconLoader::Toolbar));
-    }
-    
-    _displayedItem = item;
-}
-
-void KWalletEditor::updateEntries(const QString& folder) {
-    QStack<QTreeWidgetItem*> trash;
-
-    _w->setFolder(folder);
-    const QStringList entries = _w->entryList();
-
-    KWalletFolderItem *fi = _entryList->getFolder(folder);
-
-    if (!fi) {
-        return;
-    }
-
-    KWalletContainerItem *pi = fi->getContainer(KWallet::Wallet::Password);
-    KWalletContainerItem *mi = fi->getContainer(KWallet::Wallet::Map);
-    KWalletContainerItem *bi = fi->getContainer(KWallet::Wallet::Stream);
-    KWalletContainerItem *ui = fi->getContainer(KWallet::Wallet::Unknown);
-
-    // Remove deleted entries
-    for (int i = 0; i < pi->childCount(); ++i) {
-        QTreeWidgetItem *twi = pi->child(i);
-        if (!entries.contains(twi->text(0))) {
-            if (twi == _entryList->currentItem()) {
-                entrySelectionChanged(0L);
-            }
-            trash.push(twi);
-        }
-    }
-
-    for (int i = 0; i < mi->childCount(); ++i) {
-        QTreeWidgetItem *twi = mi->child(i);
-        if (!entries.contains(twi->text(0))) {
-            if (twi == _entryList->currentItem()) {
-                entrySelectionChanged(0L);
-            }
-            trash.push(twi);
-        }
-    }
-
-    for (int i = 0; i < bi->childCount(); ++i) {
-        QTreeWidgetItem *twi = bi->child(i);
-        if (!entries.contains(twi->text(0))) {
-            if (twi == _entryList->currentItem()) {
-                entrySelectionChanged(0L);
-            }
-            trash.push(twi);
-        }
-    }
-
-    for (int i = 0; i < ui->childCount(); ++i) {
-        QTreeWidgetItem *twi = ui->child(i);
-        if (!entries.contains(twi->text(0))) {
-            if (twi == _entryList->currentItem()) {
-                entrySelectionChanged(0L);
-            }
-            trash.push(twi);
-        }
-    }
-
-    qDeleteAll(trash);
-    trash.clear();
-
-    // Add new entries
-    for (QStringList::const_iterator i = entries.begin(); i != entries.end(); ++i) {
-        if (fi->contains(*i)){
-            continue;
-        }
-
-        switch (_w->entryType(*i)) {
-            case KWallet::Wallet::Password:
-                new KWalletEntryItem(_w, pi, *i);
-                break;
-            case KWallet::Wallet::Stream:
-                new KWalletEntryItem(_w, bi, *i);
-                break;
-            case KWallet::Wallet::Map:
-                new KWalletEntryItem(_w, mi, *i);
-                break;
-            case KWallet::Wallet::Unknown:
-            default:
-                new QTreeWidgetItem(ui, QStringList() << *i);
-                break;
-        }
-    }
-    fi->refresh();
-    if (fi->name() == _currentFolder) {
-        _entryTitle->setText(QString::fromLatin1("<font size=\"+1\">%1</font>").arg(fi->text(0)));
-    }
-    if (!_entryList->currentItem()) {
-        _entryName->clear();
-        _entryStack->setCurrentIndex(0);
-    }
-}
-
-void KWalletEditor::listContextMenuRequested(const QPoint& pos) {
-    if (!_contextMenu->isEnabled()) {
-        return;
-    }
-
-    _contextMenu->popup(_entryList->mapToGlobal(pos));
-}
-
-
-void KWalletEditor::copyPassword() {
-    QTreeWidgetItem *item = _entryList->currentItem();
-    if (_w && item) {
-        QString pass;
-        if (_w->readPassword(item->text(0), pass) == 0) {
-            QApplication::clipboard()->setText(pass);
-        }
-    }
-}
-
-
-void KWalletEditor::newEntry() {
-    QTreeWidgetItem *item = _entryList->currentItem();
-    QString n;
-    bool ok;
-
-    KWalletFolderItem *fi;
-
-    //set the folder where we're trying to create the new entry
-    if (_w && item) {
-        QTreeWidgetItem *p = item;
-        if (p->type() == KWalletEntryItemClass) {
-            p = item->parent();
-        }
-        fi = dynamic_cast<KWalletFolderItem *>(p->parent());
-        if (!fi) {
-            return;
-        }
-        _w->setFolder(fi->name());
-    } else {
-        return;
-    }
-
-    do {
-        n = KInputDialog::getText(i18n("New Entry"),
-                                  i18n("Please choose a name for the new entry:"),
-                                  QString(),
-                                  &ok,
-                                  this);
-
-        if (!ok) {
-            return;
-        }
-
-        // FIXME: prohibits the use of the subheadings
-        if (fi->contains(n)) {
-            int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that entry already exists. Try again?"), QString(), KGuiItem(i18n("Try Again")), KGuiItem(i18n("Do Not Try")));
-            if (rc == KMessageBox::Yes) {
-                continue;
-            }
-            n.clear();
-        }
-        break;
-    } while (true);
-
-    if (_w && item && !n.isEmpty()) {
-        QTreeWidgetItem *p = item;
-        if (p->type() == KWalletEntryItemClass) {
-            p = item->parent();
-        }
-
-        KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(p->parent());
-        if (!fi) {
-            KMessageBox::error(this, i18n("An unexpected error occurred trying to add the new entry"));
-            return;
-        }
-        _w->setFolder(fi->name());
-
-        KWalletEntryItem *ni = new KWalletEntryItem(_w, p, n);
-
-        KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(p);
-        if (!ci) {
-            KMessageBox::error(this, i18n("An unexpected error occurred trying to add the new entry"));
-            delete ni;
-            return;
-        }
-        if (ci->entryType() == KWallet::Wallet::Password) {
-            _w->writePassword(n, QString());
-        } else if (ci->entryType() == KWallet::Wallet::Map) {
-            _w->writeMap(n, QMap<QString,QString>());
-        } else if (ci->entryType() == KWallet::Wallet::Stream) {
-            _w->writeEntry(n, QByteArray());
-        } else {
-            abort();
-        }
-
-        _entryList->setCurrentItem(ni);
-        _entryList->scrollToItem(ni);
-
-        fi->refresh();
-        _entryTitle->setText(QString::fromLatin1("<font size=\"+1\">%1</font>").arg(fi->text(0)));
-    }
-}
-
-
-void KWalletEditor::renameEntry() {
-    QTreeWidgetItem *item = _entryList->currentItem();
-    if (_w && item) {
-        _entryList->editItem(item, 0);
-    }
-}
-
-
-// Only supports renaming of KWalletEntryItem derived classes.
-void KWalletEditor::listItemChanged(QTreeWidgetItem* item, int column) {
-    if (item && column == 0) {
-        KWalletEntryItem *i = dynamic_cast<KWalletEntryItem*>(item);
-        if (!i) {
-            return;
-        }
-
-        const QString t = item->text(0);
-        if (t == i->name()) {
-            return;
-        }
-        if (!_w || t.isEmpty()) {
-            i->restoreName();
-            return;
-        }
-
-        if (_w->renameEntry(i->name(), t) == 0) {
-            i->setName(t);
-            KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->parent());
-            if (!ci) {
-                KMessageBox::error(this, i18n("An unexpected error occurred trying to rename the entry"));
-                return;
-            }
-            if (ci->entryType() == KWallet::Wallet::Password) {
-                _entryName->setText(i18n("Password: %1", item->text(0)));
-            } else if (ci->entryType() == KWallet::Wallet::Map) {
-                _entryName->setText(i18n("Name-Value Map: %1", item->text(0)));
-            } else if (ci->entryType() == KWallet::Wallet::Stream) {
-                _entryName->setText(i18n("Binary Data: %1", item->text(0)));
-            }
-        } else {
-            i->restoreName();
-        }
-    }
-}
-
-
-void KWalletEditor::deleteEntry() {
-    QTreeWidgetItem *item = _entryList->currentItem();
-    if (_w && item) {
-        int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the item '%1'?", item->text(0)),QString(),KStandardGuiItem::del());
-        if (rc == KMessageBox::Continue) {
-            KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(item->parent()->parent());
-            if (!fi) {
-                KMessageBox::error(this, i18n("An unexpected error occurred trying to delete the entry"));
-                return;
-            }
-            _displayedItem = 0;
-            _w->removeEntry(item->text(0));
-            delete item;
-            entrySelectionChanged(_entryList->currentItem());
-            fi->refresh();
-            _entryTitle->setText(QString::fromLatin1("<font size=\"+1\">%1</font>").arg(fi->text(0)));
-        }
-    }
-}
-
-void KWalletEditor::changePassword()
-{
-    KWallet::Wallet::changePassword(_walletName, effectiveWinId());
-}
-
-
-void KWalletEditor::walletOpened(bool success) {
-    if (success) {
-        emit enableFolderActions(true);
-        emit enableContextFolderActions(false);
-        emit enableWalletActions(true);
-        updateFolderList();
-        _entryList->setWallet(_w);
-    } else {
-        if (!_newWallet) {
-            KMessageBox::sorry(this, i18n("Unable to open the requested wallet."));
-        }
-    }
-}
-
-
-void KWalletEditor::hidePasswordContents() {
-    _entryStack->setCurrentIndex(4);
-}
-
-
-void KWalletEditor::showPasswordContents() {
-    _entryStack->setCurrentIndex(1);
-}
-
-
-void KWalletEditor::showHideMapEditorValue(bool show) {
-    if (show) {
-        _mapEditor->showColumn(2);
-    } else {
-        _mapEditor->hideColumn(2);
-    }
-}
-
-
-enum MergePlan { Prompt = 0, Always = 1, Never = 2, Yes = 3, No = 4 };
-
-void KWalletEditor::importWallet() {
-    KUrl url = KFileDialog::getOpenUrl(KUrl(), QLatin1String( "*.kwl" ), this);
-    if (url.isEmpty()) {
-        return;
-    }
-
-    QString tmpFile;
-    if (!KIO::NetAccess::download(url, tmpFile, this)) {
-        KMessageBox::sorry(this, i18n("Unable to access wallet '<b>%1</b>'.", url.prettyUrl()));
-        return;
-    }
-
-    KWallet::Wallet *w = KWallet::Wallet::openWallet(tmpFile, winId(), KWallet::Wallet::Path);
-    if (w && w->isOpen()) {
-        MergePlan mp = Prompt;
-        QStringList fl = w->folderList();
-        for (QStringList::ConstIterator f = fl.constBegin(); f != fl.constEnd(); ++f) {
-            if (!w->setFolder(*f)) {
-                continue;
-            }
-
-            if (!_w->hasFolder(*f)) {
-                _w->createFolder(*f);
-            }
-
-            _w->setFolder(*f);
-
-            QMap<QString, QMap<QString, QString> > map;
-            QSet<QString> mergedkeys; // prevents re-merging already merged entries.
-            int rc;
-            rc = w->readMapList(QLatin1String( "*" ), map);
-            if (rc == 0) {
-                QMap<QString, QMap<QString, QString> >::ConstIterator me;
-                for (me = map.constBegin(); me != map.constEnd(); ++me) {
-                    bool hasEntry = _w->hasEntry(me.key());
-                    if (hasEntry && mp == Prompt) {
-                        KBetterThanKDialogBase *bd;
-                        bd = new KBetterThanKDialogBase(this);
-                        bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'.  Do you wish to replace it?", Qt::escape(*f), Qt::escape(me.key())));
-                        mp = (MergePlan)bd->exec();
-                        delete bd;
-                        bool ok = false;
-                        if (mp == Always || mp == Yes) {
-                            ok = true;
-                        }
-                        if (mp == Yes || mp == No) {
-                            // reset mp
-                            mp = Prompt;
-                        }
-                        if (!ok) {
-                            continue;
-                        }
-                    } else if (hasEntry && mp == Never) {
-                        continue;
-                    }
-                    _w->writeMap(me.key(), me.value());
-                    mergedkeys.insert(me.key()); // remember this key has been merged
-                }
-            }
-
-            QMap<QString, QString> pwd;
-            rc = w->readPasswordList(QLatin1String( "*" ), pwd);
-            if (rc == 0) {
-                QMap<QString, QString>::ConstIterator pe;
-                for (pe = pwd.constBegin(); pe != pwd.constEnd(); ++pe) {
-                    bool hasEntry = _w->hasEntry(pe.key());
-                    if (hasEntry && mp == Prompt) {
-                        KBetterThanKDialogBase *bd;
-                        bd = new KBetterThanKDialogBase(this);
-                        bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'.  Do you wish to replace it?", Qt::escape(*f), Qt::escape(pe.key())));
-                        mp = (MergePlan)bd->exec();
-                        delete bd;
-                        bool ok = false;
-                        if (mp == Always || mp == Yes) {
-                            ok = true;
-                        }
-                        if (mp == Yes || mp == No) {
-                            // reset mp
-                            mp = Prompt;
-                        }
-                        if (!ok) {
-                            continue;
-                        }
-                    } else if (hasEntry && mp == Never) {
-                        continue;
-                    }
-                    _w->writePassword(pe.key(), pe.value());
-                    mergedkeys.insert(pe.key()); // remember this key has been merged
-                }
-            }
-
-            QMap<QString, QByteArray> ent;
-            rc = w->readEntryList(QLatin1String( "*" ), ent);
-            if (rc == 0) {
-                QMap<QString, QByteArray>::ConstIterator ee;
-                for (ee = ent.constBegin(); ee != ent.constEnd(); ++ee) {
-                    // prevent re-merging already merged entries.
-                    if (mergedkeys.contains(ee.key())) {
-                        continue;
-                    }
-                    bool hasEntry = _w->hasEntry(ee.key());
-                    if (hasEntry && mp == Prompt) {
-                        KBetterThanKDialogBase *bd;
-                        bd = new KBetterThanKDialogBase(this);
-                        bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'.  Do you wish to replace it?", Qt::escape(*f), Qt::escape(ee.key())));
-                        mp = (MergePlan)bd->exec();
-                        delete bd;
-                        bool ok = false;
-                        if (mp == Always || mp == Yes) {
-                            ok = true;
-                        }
-                        if (mp == Yes || mp == No) {
-                            // reset mp
-                            mp = Prompt;
-                        }
-                        if (!ok) {
-                            continue;
-                        }
-                    } else if (hasEntry && mp == Never) {
-                        continue;
-                    }
-                    _w->writeEntry(ee.key(), ee.value());
-                }
-            }
-        }
-    }
-
-    delete w;
-
-    KIO::NetAccess::removeTempFile(tmpFile);
-    updateFolderList(true);
-    restoreEntry();
-}
-
-
-void KWalletEditor::importXML() {
-    KUrl url = KFileDialog::getOpenUrl( KUrl(), QLatin1String( "*.xml" ), this);
-    if (url.isEmpty()) {
-        return;
-    }
-
-    QString tmpFile;
-    if (!KIO::NetAccess::download(url, tmpFile, this)) {
-        KMessageBox::sorry(this, i18n("Unable to access XML file '<b>%1</b>'.", url.prettyUrl()));
-        return;
-    }
-
-    QFile qf(tmpFile);
-    if (!qf.open(QIODevice::ReadOnly)) {
-        KMessageBox::sorry(this, i18n("Error opening XML file '<b>%1</b>' for input.", url.prettyUrl()));
-        KIO::NetAccess::removeTempFile(tmpFile);
-        return;
-    }
-
-    QDomDocument doc(tmpFile);
-    if (!doc.setContent(&qf)) {
-        KMessageBox::sorry(this, i18n("Error reading XML file '<b>%1</b>' for input.", url.prettyUrl()));
-        KIO::NetAccess::removeTempFile(tmpFile);
-        return;
-    }
-
-    QDomElement top = doc.documentElement();
-    if (top.tagName().toLower() != QLatin1String( "wallet" )) {
-        KMessageBox::sorry(this, i18n("Error: XML file does not contain a wallet."));
-        KIO::NetAccess::removeTempFile(tmpFile);
-        return;
-    }
-
-    QDomNode n = top.firstChild();
-    MergePlan mp = Prompt;
-    while (!n.isNull()) {
-        QDomElement e = n.toElement();
-        if (e.tagName().toLower() != QLatin1String( "folder" )) {
-            n = n.nextSibling();
-            continue;
-        }
-
-        QString fname = e.attribute(QLatin1String( "name" ));
-        if (fname.isEmpty()) {
-            n = n.nextSibling();
-            continue;
-        }
-        if (!_w->hasFolder(fname)) {
-            _w->createFolder(fname);
-        }
-        _w->setFolder(fname);
-        QDomNode enode = e.firstChild();
-        while (!enode.isNull()) {
-            e = enode.toElement();
-            QString type = e.tagName().toLower();
-            QString ename = e.attribute(QLatin1String( "name" ));
-            bool hasEntry = _w->hasEntry(ename);
-            if (hasEntry && mp == Prompt) {
-                KBetterThanKDialogBase *bd;
-                bd = new KBetterThanKDialogBase(this);
-                bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'.  Do you wish to replace it?", Qt::escape(fname), Qt::escape(ename)));
-                mp = (MergePlan)bd->exec();
-                delete bd;
-                bool ok = false;
-                if (mp == Always || mp == Yes) {
-                    ok = true;
-                }
-                if (mp == Yes || mp == No) { // reset mp
-                    mp = Prompt;
-                }
-                if (!ok) {
-                    enode = enode.nextSibling();
-                    continue;
-                }
-            } else if (hasEntry && mp == Never) {
-                enode = enode.nextSibling();
-                continue;
-            }
-
-            if (type == QLatin1String( "password" )) {
-                _w->writePassword(ename, e.text());
-            } else if (type == QLatin1String( "stream" )) {
-                _w->writeEntry(ename, QByteArray::fromBase64(e.text().toLatin1()));
-            } else if (type == QLatin1String( "map" )) {
-                QMap<QString,QString> map;
-                QDomNode mapNode = e.firstChild();
-                while (!mapNode.isNull()) {
-                    QDomElement mape = mapNode.toElement();
-                    if (mape.tagName().toLower() == QLatin1String( "mapentry" )) {
-                        map[mape.attribute(QLatin1String( "name" ))] = mape.text();
-                    }
-                    mapNode = mapNode.nextSibling();
-                }
-                _w->writeMap(ename, map);
-            }
-            enode = enode.nextSibling();
-        }
-        n = n.nextSibling();
-    }
-
-    KIO::NetAccess::removeTempFile(tmpFile);
-    updateFolderList(true);
-    restoreEntry();
-}
-
-
-void KWalletEditor::exportXML() {
-    KTemporaryFile tf;
-    tf.open();
-    QXmlStreamWriter xml(&tf);
-    xml.setAutoFormatting(true);
-    xml.writeStartDocument();
-    const QStringList fl = _w->folderList();
-
-    xml.writeStartElement(QLatin1String( "wallet" ));
-    xml.writeAttribute(QLatin1String( "name" ), _walletName);
-    for (QStringList::const_iterator i = fl.constBegin(); i != fl.constEnd(); ++i) {
-        xml.writeStartElement(QLatin1String( "folder" ));
-        xml.writeAttribute(QLatin1String( "name" ), *i);
-        _w->setFolder(*i);
-        QStringList entries = _w->entryList();
-        for (QStringList::const_iterator j = entries.constBegin(); j != entries.constEnd(); ++j) {
-            switch (_w->entryType(*j)) {
-                case KWallet::Wallet::Password: {
-                    QString pass;
-                    if (_w->readPassword(*j, pass) == 0) {
-                        xml.writeStartElement(QLatin1String( "password" ));
-                        xml.writeAttribute(QLatin1String( "name" ), *j);
-                        xml.writeCharacters(pass);
-                        xml.writeEndElement();
-                    }
-                    break;
-                }
-                case KWallet::Wallet::Stream: {
-                    QByteArray ba;
-                    if (_w->readEntry(*j, ba) == 0) {
-                        xml.writeStartElement(QLatin1String( "stream" ));
-                        xml.writeAttribute(QLatin1String( "name" ), *j);
-                        xml.writeCharacters(QLatin1String( ba.toBase64() ));
-                        xml.writeEndElement();
-                    }
-                    break;
-                }
-                case KWallet::Wallet::Map: {
-                    QMap<QString,QString> map;
-                    if (_w->readMap(*j, map) == 0) {
-                        xml.writeStartElement(QLatin1String( "map" ));
-                        xml.writeAttribute(QLatin1String( "name" ), *j);
-                        for (QMap<QString,QString>::ConstIterator k = map.constBegin(); k != map.constEnd(); ++k) {
-                            xml.writeStartElement(QLatin1String( "mapentry" ));
-                            xml.writeAttribute(QLatin1String( "name" ), k.key());
-                            xml.writeCharacters(k.value());
-                            xml.writeEndElement();
-                        }
-                        xml.writeEndElement();
-                    }
-                    break;
-                }
-                case KWallet::Wallet::Unknown:
-                default: {
-                    break;
-                }
-            }
-        }
-        xml.writeEndElement();
-    }
-
-    xml.writeEndElement();
-    xml.writeEndDocument();
-    tf.flush();
-
-    KUrl url = KFileDialog::getSaveUrl(KUrl(), QLatin1String( "*.xml" ), this);
-
-    if (!url.isEmpty()) {
-        KIO::NetAccess::dircopy(KUrl::fromPath(tf.fileName()), url, this);
-    }
-}
-
-
-void KWalletEditor::setNewWallet(bool x) {
-    _newWallet = x;
-}
-
-
-void KWalletEditor::saveAs() {
-    KUrl url = KFileDialog::getSaveUrl(KUrl(), QLatin1String( "*.kwl" ), this);
-    if (!url.isEmpty()) {
-        // Sync() kwalletd
-        if (_nonLocal) {
-            KIO::NetAccess::dircopy(_walletName, url, this);
-        } else {
-            QString path = KGlobal::dirs()->saveLocation("kwallet") + QLatin1Char( '/' ) + _walletName + QLatin1String( ".kwl" );
-            KIO::NetAccess::dircopy(KUrl::fromPath(path), url, this);
-        }
-    }
-}
-
-void KWalletEditor::hideEvent(QHideEvent* )
-{
-    emit enableContextFolderActions(false);
-    emit enableFolderActions(false);
-    emit enableWalletActions(false);
-    disconnectActions();
-    _saveAsAction->setEnabled(false);
-}
-
-void KWalletEditor::showEvent(QShowEvent* )
-{
-    connectActions();
-    emit enableContextFolderActions(true);
-    emit enableFolderActions(true);
-    emit enableWalletActions(true);
-}
-
-void KWalletEditor::onSearchTextChanged(const QString& text)
-{
-    static bool treeIsExpanded = false;
-    if (text.isEmpty()) {
-        if (treeIsExpanded) {
-            _entryList->setCurrentItem(NULL);
-            // NOTE: the 300 ms here is a value >200 ms used internally by KTreeWidgetSearchLine
-            // TODO: replace this timer with a connection to KTreeWidgetSearchLine::searchUpdated signal introduced with KF5
-            QTimer::singleShot(300, _entryList, SLOT(collapseAll()));
-            treeIsExpanded = false;
-        }
-    } else {
-        if (!treeIsExpanded) {
-            _entryList->expandAll();
-            treeIsExpanded = true;
-        }
-        // NOTE: the 300 ms here is a value >200 ms used internally by KTreeWidgetSearchLine
-        // TODO: replace this timer with a connection to KTreeWidgetSearchLine::searchUpdated signal introduced with KF5
-        QTimer::singleShot(300, _entryList, SLOT(selectFirstVisible()));
-    }
-    // TODO: reduce timer count when KTreeWidgetSearchLine::searchUpdated signal will be there
-    QTimer::singleShot(300, _entryList, SLOT(refreshItemsCount()));
-}
-
-void KWalletEditor::onAlwaysShowContents(bool checked)
-{
-    _alwaysShowContents = checked;
-    _alwaysHideContentsAction->setChecked(!_alwaysShowContents);
-    showPasswordContents();
-}
-
-void KWalletEditor::onAlwaysHideContents(bool checked)
-{
-    _alwaysShowContents = !checked;
-    _alwaysShowContentsAction->setChecked(_alwaysShowContents);
-    if (checked) {
-        hidePasswordContents();
-    }
-}
-
-#include "moc_kwalleteditor.cpp"
-
diff --git a/kwalletmanager/src/manager/kwalleteditor.h b/kwalletmanager/src/manager/kwalleteditor.h
deleted file mode 100644 (file)
index f664213..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-   Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
-   Copyright (C) 2005 Isaac Clerencia <isaac@warp.es>
-
-   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 KWALLETEDITOR_H
-#define KWALLETEDITOR_H
-
-#include "ui_walletwidget.h"
-
-#include <kwallet.h>
-#include <kxmlguiwindow.h>
-#include "registercreateactionmethod.h"
-#include <QStringList>
-#include <QLabel>
-#include <QTreeWidgetItem>
-#include <QCheckBox>
-
-class KActionCollection;
-class KMenu;
-class KWalletEntryList;
-class KWMapEditor;
-class KAction;
-class KTreeWidgetSearchLine;
-
-
-class KWalletEditor : public QWidget, public Ui::WalletWidget {
-Q_OBJECT
-
-public:
-    KWalletEditor(QWidget* parent, const char* name = 0);
-    virtual ~KWalletEditor();
-
-    void setWallet(KWallet::Wallet* wallet, bool isPath =false);
-    bool isOpen() const { return _w != 0L; }
-
-    void setNewWallet(bool newWallet);
-
-protected:
-    virtual void hideEvent(QHideEvent*);
-    virtual void showEvent(QShowEvent*);
-
-public slots:
-    void walletClosed();
-    void createFolder();
-    void deleteFolder();
-
-private slots:
-    void updateFolderList(bool checkEntries = false);
-    void entrySelectionChanged(QTreeWidgetItem *item);
-    void listItemChanged(QTreeWidgetItem *, int column);
-    void listContextMenuRequested(const QPoint& pos);
-    void updateEntries(const QString& folder);
-
-    void newEntry();
-    void renameEntry();
-    void deleteEntry();
-    void entryEditted();
-    void restoreEntry();
-    void saveEntry();
-
-    void changePassword();
-
-    void walletOpened(bool success);
-    void hidePasswordContents();
-    void showPasswordContents();
-    void showHideMapEditorValue(bool show);
-
-    void saveAs();
-    void exportXML();
-    void importXML();
-    void importWallet();
-
-    void copyPassword();
-
-    void onSearchTextChanged(const QString&);
-    void onAlwaysShowContents(bool);
-    void onAlwaysHideContents(bool);
-
-    signals:
-            void enableWalletActions(bool enable);
-            void enableFolderActions(bool enable);
-            void enableContextFolderActions(bool enable);
-
-public:
-    QString _walletName;
-
-private:
-    static void createActions(KActionCollection*);
-    void connectActions();
-    void disconnectActions();
-    KActionCollection *actionCollection();
-
-    bool _nonLocal;
-    KWallet::Wallet *_w;
-    KWalletEntryList *_entryList;
-    static RegisterCreateActionsMethod _registerCreateActionMethod;
-    static QAction *_newFolderAction, *_deleteFolderAction;
-    static QAction *_exportAction, *_saveAsAction, *_mergeAction, *_importAction;
-    static KAction *_newEntryAction, *_renameEntryAction, *_deleteEntryAction;
-    static KAction *_copyPassAction;
-    QString _currentFolder;
-    QMap<QString,QString> _currentMap; // save memory by storing
-                                        // only the most recent map.
-    KWMapEditor *_mapEditor;
-    QCheckBox *_mapEditorShowHide;
-    bool _newWallet;
-    KMenu *_contextMenu;
-    QTreeWidgetItem *_displayedItem; // used to find old item when selection just changed
-    KActionCollection *_actionCollection;
-    KTreeWidgetSearchLine *_searchLine;
-    static QAction *_alwaysShowContentsAction, *_alwaysHideContentsAction;
-    bool _alwaysShowContents;
-};
-
-#endif
diff --git a/kwalletmanager/src/manager/kwalletmanager.cpp b/kwalletmanager/src/manager/kwalletmanager.cpp
deleted file mode 100644 (file)
index d970f50..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
-   Copyright (C) 2003,2004 George Staikos <staikos@kde.org>
-
-   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 "kwalletmanager.h"
-#include "kwalletmanagerwidget.h"
-#include "kwalletpopup.h"
-#include "kwalleteditor.h"
-#include "allyourbase.h"
-#include "kwallet_interface.h"
-#include "registercreateactionmethod.h"
-
-#include <kaction.h>
-#include <kapplication.h>
-#include <kconfig.h>
-#include <kdebug.h>
-#include <kiconloader.h>
-#include <kinputdialog.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kstandarddirs.h>
-#include <kstandardaction.h>
-#include <kstatusnotifieritem.h>
-#include <kwallet.h>
-#include <kxmlguifactory.h>
-#include <QPointer>
-#include <QRegExp>
-
-#include <QtGui/qvalidator.h>
-#include <QTimer>
-#include <ktoolinvocation.h>
-#include <kicon.h>
-#include <kactioncollection.h>
-#include <kconfiggroup.h>
-
-KWalletManager::KWalletManager(QWidget *parent, const char *name, Qt::WFlags f)
-    : KXmlGuiWindow(parent, f)
-{
-    RegisterCreateActionsMethod::createActions(actionCollection());
-
-    setObjectName(QLatin1String( name ) );
-    QDBusConnection::sessionBus().registerObject(QLatin1String( "/KWalletManager" ), this, QDBusConnection::ExportScriptableSlots);
-    KGlobal::dirs()->addResourceType("kwallet", 0, QLatin1String( "share/apps/kwallet" ));
-    _kwalletdLaunch = false;
-    _shuttingDown = false;
-    m_kwalletdModule = 0;
-    KConfig cfg( QLatin1String( "kwalletrc" )); // not sure why this setting isn't in kwalletmanagerrc...
-    KConfigGroup walletConfigGroup(&cfg, "Wallet");
-    if (walletConfigGroup.readEntry("Launch Manager", false)) {
-        _tray = new KStatusNotifierItem(this);
-        _tray->setObjectName( QLatin1String("kwalletmanager tray" ));
-        _tray->setCategory( KStatusNotifierItem::SystemServices );
-        _tray->setStatus( KStatusNotifierItem::Passive );
-        _tray->setIconByName(QLatin1String( "wallet-closed" ));
-        _tray->setToolTip( QLatin1String( "wallet-closed" ), i18n("KDE Wallet"), i18n("No wallets open."));
-        //connect(_tray, SIGNAL(quitSelected()), SLOT(shuttingDown()));
-        const QStringList wl = KWallet::Wallet::walletList();
-        bool isOpen = false;
-        for (QStringList::ConstIterator it = wl.begin(); it != wl.end(); ++it) {
-            if (KWallet::Wallet::isOpen(*it)) {
-                _tray->setIconByName(QLatin1String( "wallet-open" ));
-                _tray->setToolTip( QLatin1String( "wallet-open" ), i18n("KDE Wallet"), i18n("A wallet is open."));
-                isOpen = true;
-                break;
-            }
-        }
-        if (!isOpen && qApp->isSessionRestored()) {
-            delete _tray;
-            _tray = 0;
-            QTimer::singleShot( 0, qApp, SLOT(quit()));
-            return;
-        }
-    } else {
-        _tray = 0;
-    }
-
-    _managerWidget = new KWalletManagerWidget(this);
-
-    updateWalletDisplay();
-    setCentralWidget(_managerWidget);
-    setAutoSaveSettings(QLatin1String("MainWindow"), true);
-    // _managerWidget->setMinimumSize(320, 200);
-
-    m_kwalletdModule = new org::kde::KWallet(QLatin1String( "org.kde.kwalletd" ), QLatin1String( "/modules/kwalletd" ), QDBusConnection::sessionBus());
-    connect(QDBusConnection::sessionBus().interface(),
-            SIGNAL(serviceOwnerChanged(QString,QString,QString)),
-            this,
-            SLOT(possiblyRescan(QString,QString,QString)));
-    connect( m_kwalletdModule, SIGNAL(allWalletsClosed()),
-                this, SLOT(allWalletsClosed()) );
-    connect( m_kwalletdModule, SIGNAL(walletClosed(QString)),
-                this, SLOT(updateWalletDisplay()) );
-    connect( m_kwalletdModule, SIGNAL(walletOpened(QString)),
-                this, SLOT(aWalletWasOpened()) );
-    connect( m_kwalletdModule, SIGNAL(walletDeleted(QString)),
-                this, SLOT(updateWalletDisplay()) );
-    connect( m_kwalletdModule, SIGNAL(walletListDirty()),
-                this, SLOT(updateWalletDisplay()) );
-    connect( m_kwalletdModule, SIGNAL(walletCreated(QString)), this, SLOT(walletCreated(QString)));
-    // FIXME: slight race - a wallet can open, then we get launched, but the
-    //        wallet closes before we are done opening.  We will then stay
-    //        open.  Must check that a wallet is still open here.
-
-    QAction *action = actionCollection()->addAction(QLatin1String( "wallet_create" ));
-    action->setText(i18n("&New Wallet..."));
-    action->setIcon(KIcon( QLatin1String( "kwalletmanager" )));
-    connect(action, SIGNAL(triggered()), SLOT(createWallet()));
-
-    action = actionCollection()->addAction(QLatin1String( "wallet_open") );
-    action->setText(i18n("Open Wallet..."));
-    connect(action, SIGNAL(triggered()), this, SLOT(openWallet()));
-    
-    action = actionCollection()->addAction(QLatin1String( "wallet_delete" ));
-    action->setText(i18n("&Delete Wallet..."));
-    action->setIcon(KIcon( QLatin1String( "trash-empty" )));
-    connect(action, SIGNAL(triggered()), SLOT(deleteWallet()));
-    QAction *act = actionCollection()->addAction(QLatin1String( "wallet_settings" ));
-    act->setText(i18n("Configure &Wallet..."));
-    act->setIcon(KIcon( QLatin1String( "configure" )));
-
-    connect(act, SIGNAL(triggered()), SLOT(setupWallet()));
-    if (_tray) {
-        _tray->contextMenu()->addAction( act );
-    }
-    act = actionCollection()->addAction(QLatin1String( "close_all_wallets" ));
-    act->setText(i18n("Close &All Wallets"));
-    connect(act, SIGNAL(triggered()), SLOT(closeAllWallets()));
-    if (_tray) {
-        _tray->contextMenu()->addAction( act );
-    }
-    KStandardAction::quit(this, SLOT(shuttingDown()), actionCollection());
-    KStandardAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
-    actionCollection());
-
-    setupGUI( Keys | Save | Create, QLatin1String( "kwalletmanager.rc" ));
-    setStandardToolBarMenuEnabled(false);
-
-    if (_tray) {
-        // _tray->show();
-    } else {
-        show();
-    }
-
-    qApp->setObjectName( QLatin1String("kwallet" )); // hack to fix docs
-}
-
-
-KWalletManager::~KWalletManager() {
-    _tray = 0L;
-    delete m_kwalletdModule;
-    m_kwalletdModule=0L;
-}
-
-
-void KWalletManager::kwalletdLaunch() {
-    _kwalletdLaunch = true;
-}
-
-
-bool KWalletManager::queryClose() {
-    if (!_shuttingDown && !kapp->sessionSaving()) {
-        if (!_tray) {
-            qApp->quit();
-        } else {
-            hide();
-        }
-        return false;
-    }
-    return true;
-}
-
-
-void KWalletManager::aWalletWasOpened() {
-    if (_tray) {
-        _tray->setIconByName(QLatin1String( "wallet-open" ));
-        _tray->setToolTip( QLatin1String( "wallet-open" ), i18n("KDE Wallet"), i18n("A wallet is open."));
-        _tray->setStatus(KStatusNotifierItem::Active);
-    }
-    updateWalletDisplay();
-    createGUI( QLatin1String( "kwalletmanager.rc" ));
-}
-
-
-void KWalletManager::updateWalletDisplay() {
-    _managerWidget->updateWalletDisplay();
-}
-
-void KWalletManager::walletCreated(const QString& newWalletName)
-{
-    _managerWidget->updateWalletDisplay(newWalletName);
-}
-
-void KWalletManager::contextMenu(const QPoint& ) {
-}
-
-
-void KWalletManager::closeWallet(const QString& walletName) {
-    int rc = KWallet::Wallet::closeWallet(walletName, false);
-    if (rc != 0) {
-        rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), QString(), KGuiItem(i18n("Force Closure")), KGuiItem(i18n("Do Not Force")));
-        if (rc == KMessageBox::Yes) {
-            rc = KWallet::Wallet::closeWallet(walletName, true);
-            if (rc != 0) {
-                KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.", rc));
-            }
-        }
-    }
-
-    updateWalletDisplay();
-}
-
-void KWalletManager::changeWalletPassword(const QString &walletName)
-{
-    KWallet::Wallet::changePassword(walletName, effectiveWinId());
-}
-
-
-void KWalletManager::openWalletFile(const QString& path) {
-    if (!_managerWidget->openWalletFile(path)) {
-        KMessageBox::sorry(this, i18n("Error opening wallet %1.", path));
-    }
-}
-
-void KWalletManager::allWalletsClosed() {
-    if (_tray) {
-        _tray->setIconByName(QLatin1String( "wallet-closed" ));
-        _tray->setToolTip( QLatin1String( "wallet-closed" ), i18n("KDE Wallet"), i18n("No wallets open."));
-        _tray->setStatus(KStatusNotifierItem::Passive);
-    }
-    possiblyQuit();
-}
-
-
-void KWalletManager::possiblyQuit() {
-    KConfig _cfg( QLatin1String(  "kwalletrc" ) );
-    KConfigGroup cfg(&_cfg, "Wallet");
-    if (_windows.isEmpty() &&
-        !isVisible() &&
-        !cfg.readEntry("Leave Manager Open", false) &&
-        _kwalletdLaunch) {
-        qApp->quit();
-    }
-}
-
-
-void KWalletManager::editorClosed(KXmlGuiWindow* e) {
-    _windows.removeAll(e);
-}
-
-
-void KWalletManager::possiblyRescan(const QString& app, const QString& oldOwner, const QString& newOwner) {
-    Q_UNUSED( oldOwner );
-    Q_UNUSED( newOwner );
-    if (app == QLatin1String( "org.kde.kwalletd" )) {
-        updateWalletDisplay();
-    }
-}
-
-void KWalletManager::createWallet() {
-    QString n;
-    bool ok;
-    QString txt = i18n("Please choose a name for the new wallet:");
-    QRegExpValidator validator(QRegExp( QLatin1String( "^[\\w\\^\\&\\'\\@\\{\\}\\[\\]\\,\\$\\=\\!\\-\\#\\(\\)\\%\\.\\+\\_\\s]+$" )), this);
-
-    if (!KWallet::Wallet::isEnabled()) {
-        // FIXME: KMessageBox::warningYesNo(this, i1_8n("KWallet is not enabled.  Do you want to enable it?"), QString(), i18n("Enable"), i18n("Keep Disabled"));
-        return;
-    }
-
-    do {
-        n = KInputDialog::getText(i18n("New Wallet"), txt, QString(), &ok, this,
-                                  &validator);
-
-        if (!ok) {
-            return;
-        }
-
-        if (_managerWidget->hasWallet(n)) {
-            int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that wallet already exists. Try a new name?"), QString(), KGuiItem(i18n("Try New")), KGuiItem(i18n("Do Not Try")));
-            if (rc == KMessageBox::No) {
-                    return;
-            }
-            n.clear();
-        } else  {
-            break;
-        }
-    } while (true);
-
-    // Small race here - the wallet could be created on us already.
-    if (!n.isEmpty()) {
-        // attempt open the wallet to create it, then dispose it
-        // as it'll appear in on the main window via the walletCreated signal
-        // emmitted by the kwalletd
-        KWallet::Wallet::openWallet(n, effectiveWinId());
-    }
-}
-
-void KWalletManager::deleteWallet()
-{
-    QString walletName = _managerWidget->activeWalletName();
-    int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?", walletName),QString(),KStandardGuiItem::del());
-    if (rc != KMessageBox::Continue) {
-        return;
-    }
-    rc = KWallet::Wallet::deleteWallet(walletName);
-    if (rc != 0) {
-        KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.", rc));
-    }
-}
-
-void KWalletManager::openWallet(const QString& walletName)
-{
-    _managerWidget->openWallet(walletName);
-}
-
-void KWalletManager::openWallet()
-{
-    qWarning("TODO: implement openWallet from file");
-}
-
-void KWalletManager::shuttingDown() {
-    _shuttingDown = true;
-    qApp->quit();
-}
-
-
-void KWalletManager::setupWallet() {
-    KToolInvocation::startServiceByDesktopName( QLatin1String( "kwalletconfig" ));
-}
-
-
-void KWalletManager::closeAllWallets() {
-    m_kwalletdModule->closeAllWallets();
-}
-
-#include "moc_kwalletmanager.cpp"
diff --git a/kwalletmanager/src/manager/kwalletmanager.h b/kwalletmanager/src/manager/kwalletmanager.h
deleted file mode 100644 (file)
index 878c090..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-   Copyright (C) 2003,2004 George Staikos <staikos@kde.org>
-
-   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 KWALLETMANAGER_H
-#define KWALLETMANAGER_H
-#include <QtCore/QObject>
-#include <kxmlguiwindow.h>
-#include <QIcon>
-
-class KWalletManagerWidget;
-class KStatusNotifierItem;
-#include <QListWidgetItem>
-class OrgKdeKWalletInterface;
-
-class KWalletManager : public KXmlGuiWindow {
-       Q_OBJECT
-
-           Q_CLASSINFO("D-Bus Interface", "org.kde.kwallet.kwalletmanager")
-
-       public:
-               explicit KWalletManager(QWidget *parent = 0, const char* name = 0, Qt::WFlags f = 0);
-               virtual ~KWalletManager();
-
-               void kwalletdLaunch();
-
-       public slots:
-               void createWallet();
-        void deleteWallet();
-               void closeWallet(const QString& walletName);
-               void changeWalletPassword(const QString& walletName);
-               void openWallet(const QString& walletName);
-               void openWalletFile(const QString& path);
-//             void openWallet(QListWidgetItem *item);
-               void contextMenu(const QPoint& pos);
-        void walletCreated(const QString& walletName);
-
-       protected:
-               virtual bool queryClose();
-
-       private:
-       public Q_SLOTS: //dbus
-               Q_SCRIPTABLE void allWalletsClosed();
-               Q_SCRIPTABLE void updateWalletDisplay();
-               Q_SCRIPTABLE void aWalletWasOpened();
-
-       private slots:
-               void shuttingDown();
-               void possiblyQuit();
-               void editorClosed(KXmlGuiWindow* e);
-               void possiblyRescan(const QString& app, const QString&, const QString&);
-               void setupWallet();
-               void openWallet();
-               void closeAllWallets();
-
-       private:
-               KStatusNotifierItem *_tray;
-               bool _shuttingDown;
-        KWalletManagerWidget *_managerWidget;
-               OrgKdeKWalletInterface *m_kwalletdModule;
-               QList<KXmlGuiWindow*> _windows;
-               bool _kwalletdLaunch;
-};
-
-#endif
diff --git a/kwalletmanager/src/manager/kwalletmanager.rc b/kwalletmanager/src/manager/kwalletmanager.rc
deleted file mode 100644 (file)
index 7185e7c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE kpartgui>
-<kpartgui name="kwalletmanager" version="3">
-  <MenuBar>
-    <Menu name="file"><text>&amp;File</text>
-      <Action name="wallet_create"/>
-      <Separator/>
-      <Action name="file_save_as"/>
-      <Separator/>
-      <Action name="wallet_merge"/>
-      <Action name="wallet_import"/>
-      <Action name="wallet_export"/>
-      <Separator/>
-      <Action name="close_all_wallets"/>
-      <Separator/>
-      <Action name="wallet_delete"/>
-    </Menu>
-    <Menu name="settings"><text>&amp;Settings</text>
-      <Action name="wallet_settings" append="configure_merge"/>
-    </Menu>
-    <Menu name="help"><text>&amp;Help</text>
-    </Menu>
-  </MenuBar>
-</kpartgui>
diff --git a/kwalletmanager/src/manager/kwalletmanagerwidget.cpp b/kwalletmanager/src/manager/kwalletmanagerwidget.cpp
deleted file mode 100644 (file)
index 06a9a84..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library 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
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-
-#include "kwalletmanagerwidget.h"
-#include "kwalletmanagerwidgetitem.h"
-#include "kwallet_interface.h"
-
-#include <kwallet.h>
-#include <kurl.h>
-#include <kglobal.h>
-#include <kmessagebox.h>
-#include <klocalizedstring.h>
-#include <kio/netaccess.h>
-#include <QtGui/qevent.h>
-
-KWalletManagerWidget::KWalletManagerWidget(QWidget* parent, Qt::WindowFlags flags): 
-    KPageWidget(parent)
-{
-    setFaceType(Auto);
-    setAcceptDrops(true);
-
-    connect(this, SIGNAL(currentPageChanged(KPageWidgetItem*,KPageWidgetItem*)), SLOT(onCurrentPageChanged(KPageWidgetItem*,KPageWidgetItem*)));
-}
-
-KWalletManagerWidget::~KWalletManagerWidget()
-{
-
-}
-
-void KWalletManagerWidget::onCurrentPageChanged(KPageWidgetItem* current, KPageWidgetItem* before)
-{
-
-}
-
-void KWalletManagerWidget::updateWalletDisplay(QString selectWallet /* = QString() */)
-{
-    // NOTE: this method is called upon several kwalletd events
-    static bool alreadyUpdating = false;
-    if (alreadyUpdating)
-        return;
-
-    alreadyUpdating = true;
-    // find out pages corresponding to deleted wallets
-    const QStringList wl = KWallet::Wallet::walletList();
-    WalletPagesHash::iterator p = _walletPages.begin();
-    while ( p != _walletPages.end() ) {
-        if ( !wl.contains(p.key()) ) {
-            // remove the page corresponding to the missing wallet
-            removePage(p.value());
-            p = _walletPages.erase(p);
-        }
-        else {
-            ++p;
-        }
-    }
-
-    // add new wallets
-    for (QStringList::const_iterator i = wl.begin(); i != wl.end(); ++i) {
-        const QString& name = *i;
-        if ( !_walletPages.contains(name) ) {
-            KWalletManagerWidgetItem *wi = new KWalletManagerWidgetItem(this, name);
-            addPage( wi );
-            _walletPages.insert(*i, wi);
-        }
-    }
-
-    // update existing wallets display, e.g. icon
-    WalletPagesHash::const_iterator cp = _walletPages.constBegin();
-    WalletPagesHash::const_iterator cend = _walletPages.constEnd();
-    for ( ; cp != cend; cp++ ) {
-         cp.value()->updateWalletDisplay();
-    }
-
-    if (!selectWallet.isEmpty()) {
-        setCurrentPage(_walletPages[selectWallet]);
-    }
-    alreadyUpdating = false;
-}
-
-bool KWalletManagerWidget::hasWallet(const QString& name) const
-{
-    return _walletPages.contains(name);
-}
-
-bool KWalletManagerWidget::openWalletFile(const QString& path)
-{
-    Q_ASSERT(0);
-    // TODO: implement this method: add a new tab with an editor centered on a file
-    return false;
-}
-
-bool KWalletManagerWidget::openWallet(const QString& name)
-{
-    bool result = false;
-    if (_walletPages.contains(name)) {
-        KWalletManagerWidgetItem *wi = _walletPages[name];
-        setCurrentPage(wi);
-        result = wi->openWallet();
-    }
-    return result;
-}
-
-const QString& KWalletManagerWidget::activeWalletName() const
-{
-    return qobject_cast<KWalletManagerWidgetItem*>(currentPage())->walletName();
-}
-
-void KWalletManagerWidget::dragEnterEvent(QDragEnterEvent* e)
-{
-    if (e->mimeData()->hasFormat(QLatin1String("application/x-kwallet-wallet"))) {
-        e->accept();
-    } else {
-        e->ignore();
-    }
-}
-
-void KWalletManagerWidget::dragMoveEvent(QDragMoveEvent* e)
-{
-    qDebug("KWalletManagerWidget::dragMoveEvent");
-//     KUrl dummy;
-//     QListWidgetItem *dummy2;
-//     if (shouldIgnoreDropEvent(e, &dummy, &dummy2)) {
-//         e->ignore();
-//     } else {
-//         e->accept();
-//     }
-}
-
-void KWalletManagerWidget::dropEvent(QDropEvent* e)
-{
-    qDebug("KWalletManagerWidget::dropEvent");
-//     KUrl u;
-//     QListWidgetItem *item;
-//     if (shouldIgnoreDropEvent(e, &u, &item)) {
-//         e->ignore();
-//         return;
-//     }
-// 
-//     if (!item) {
-//         // Not dropped over an item thus it is a wallet
-//         const QString dest = KGlobal::dirs()->saveLocation("kwallet") + u.fileName();
-//         if (QFile::exists(dest)) {
-//             KMessageBox::sorry(viewport(), i18n("That wallet file already exists.  You cannot overwrite wallets."));
-//             e->ignore();
-//             return;
-//         }
-// 
-//         // FIXME: verify that it is a real wallet file first
-//         KIO::NetAccess::file_copy(u, KUrl(dest));
-//         e->accept();
-//     } else {
-//         // Dropped over an item thus it is a folder
-//         KWalletItem *kwi = dynamic_cast<KWalletItem *>(item);
-//         Q_ASSERT(kwi);
-//         if (kwi) {
-//             kwi->processDropEvent(e);
-//         }
-//     }
-}
-
-bool KWalletManagerWidget::shouldIgnoreDropEvent(const QDropEvent* e, KUrl* u) const
-{
-    return false;
-//     if (e->source() == viewport()) {
-//         return true;
-//     }
-// 
-//     QMimeData *em = e->mimeData();
-//     if (!em->hasFormat(QLatin1String("application/x-kwallet-folder")) &&
-//         !em->hasFormat(QLatin1String("application/x-kwallet-wallet")) &&
-//         !em->hasFormat(QLatin1String("text/uri-list"))) {
-//         return true;
-//     }
-// 
-//     // Over wallets folders, over nothing wallets
-//     *item = itemAt(e->pos());
-//     const QByteArray edata;
-//     if (item) {
-//         edata = em->data(QLatin1String("application/x-kwallet-folder"));
-//     } else {
-//         edata = em->data(QLatin1String("application/x-kwallet-wallet"));
-//     }
-//     *u = decodeUrl(edata);
-//     if (*u == KUrl()) {
-//         *u = decodeUrl(e->encodedData("text/uri-list"));
-//     }
-// 
-//     return *u == KUrl();
-}
-
-#include "moc_kwalletmanagerwidget.cpp"
diff --git a/kwalletmanager/src/manager/kwalletmanagerwidget.h b/kwalletmanager/src/manager/kwalletmanagerwidget.h
deleted file mode 100644 (file)
index e48d22c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library 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
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-#ifndef KWALLETMANAGERWIDGET_H
-#define KWALLETMANAGERWIDGET_H
-
-#include <kpagewidget.h>
-
-class KUrl;
-#include <QDropEvent>
-class KWalletManagerWidgetItem;
-
-class KWalletManagerWidget : public KPageWidget {
-    Q_OBJECT
-public:
-    explicit KWalletManagerWidget(QWidget* parent = 0, Qt::WindowFlags flags = 0);
-    virtual ~KWalletManagerWidget();
-
-    void updateWalletDisplay(QString selectWallet = QString());
-    bool hasWallet(const QString&) const;
-    bool openWalletFile(const QString& path);
-    bool openWallet(const QString& name);
-
-    const QString& activeWalletName() const;
-
-protected:
-    virtual void dragEnterEvent(QDragEnterEvent *e);
-    virtual void dragMoveEvent(QDragMoveEvent *e);
-    virtual void dropEvent(QDropEvent *e);
-
-private Q_SLOTS:
-    void onCurrentPageChanged(KPageWidgetItem*,KPageWidgetItem*);
-
-private:
-    bool shouldIgnoreDropEvent(const QDropEvent *e, KUrl *u) const;
-
-    typedef QHash<QString, KWalletManagerWidgetItem*> WalletPagesHash;
-    WalletPagesHash _walletPages;
-};
-
-#endif // KWALLETMANAGERWIDGET_H
-
-class KUrl;
diff --git a/kwalletmanager/src/manager/kwalletmanagerwidgetitem.cpp b/kwalletmanager/src/manager/kwalletmanagerwidgetitem.cpp
deleted file mode 100644 (file)
index 527395e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library 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
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-
-#include "kwalletmanagerwidgetitem.h"
-#include "walletcontrolwidget.h"
-
-#include <kwallet.h>
-#include <kicon.h>
-
-KWalletManagerWidgetItem::KWalletManagerWidgetItem(QWidget* widgetParent, const QString& walletName):
-    KPageWidgetItem( _controlWidget = new WalletControlWidget(widgetParent, walletName), walletName ),
-    _walletName(walletName)
-{
-    updateWalletDisplay();
-}
-
-void KWalletManagerWidgetItem::updateWalletDisplay()
-{
-    if (KWallet::Wallet::isOpen(_walletName)) {
-        setIcon( KIcon( QLatin1String("wallet-open") ) );
-    } else {
-        setIcon( KIcon( QLatin1String("wallet-closed") ) );
-    }
-    _controlWidget->updateWalletDisplay();
-}
-
-bool KWalletManagerWidgetItem::openWallet()
-{
-    return _controlWidget->openWallet();
-}
-
-#include "moc_kwalletmanagerwidgetitem.cpp"
diff --git a/kwalletmanager/src/manager/kwalletmanagerwidgetitem.h b/kwalletmanager/src/manager/kwalletmanagerwidgetitem.h
deleted file mode 100644 (file)
index ad2451e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library 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
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-#ifndef KWALLETMANAGERWIDGETITEM_H
-#define KWALLETMANAGERWIDGETITEM_H
-
-#include <kpagewidgetmodel.h>
-
-class WalletControlWidget;
-class KWalletManagerWidgetItem : public KPageWidgetItem {
-    Q_OBJECT
-public:
-    KWalletManagerWidgetItem(QWidget* widgetParent, const QString& walletName);
-
-    void updateWalletDisplay();
-    const QString& walletName() const { return _walletName; }
-    bool openWallet();
-
-private:
-    WalletControlWidget *_controlWidget;
-    QString             _walletName;
-};
-
-#endif // KWALLETMANAGERWIDGETITEM_H
diff --git a/kwalletmanager/src/manager/kwalletpopup.cpp b/kwalletmanager/src/manager/kwalletpopup.cpp
deleted file mode 100644 (file)
index 1bf2f73..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-   Copyright (C) 2003 George Staikos <staikos@kde.org>
-
-   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 "kwalletpopup.h"
-#include <kstandardaction.h>
-#include <kactioncollection.h>
-#include <kaction.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kwallet.h>
-
-KWalletPopup::KWalletPopup(const QString& wallet, QWidget *parent, const char *name)
-    : KMenu(parent), _walletName(wallet) {
-    addTitle(wallet);
-    setObjectName( QLatin1String( name ) );
-    KActionCollection *ac = new KActionCollection(this/*, "kwallet context actions"*/);
-    ac->setObjectName( QLatin1String("kwallet context actions" ));
-    QAction *act;
-
-    act = ac->addAction(QLatin1String( "wallet_create" ));
-    act->setText(i18n("&New Wallet..."));
-    connect(act, SIGNAL(triggered(bool)), SLOT(createWallet()));
-    addAction( act );
-
-    act= ac->addAction( QLatin1String( "wallet-open" ));
-    act->setText( i18n( "&Open..." ) );
-    connect(act, SIGNAL(triggered(bool)), SLOT(openWallet()));
-    act->setShortcut(QKeySequence(Qt::Key_Return));
-    addAction( act );
-
-    act=ac->addAction( QLatin1String( "wallet_password" ) );
-    act->setText( i18n("Change &Password...") );
-    connect(act, SIGNAL(triggered(bool)), SLOT(changeWalletPassword()));
-    addAction( act );
-
-    const QStringList ul = KWallet::Wallet::users(wallet);
-    if (!ul.isEmpty()) {
-        KMenu *pm = new KMenu(this);
-        pm->setObjectName( QLatin1String("Disconnect Apps" ));
-        int id = 7000;
-        for (QStringList::const_iterator it = ul.begin(); it != ul.end(); ++it) {
-            QAction *a = pm->addAction(*it, this, SLOT(disconnectApp()));
-            a->setData(*it);
-            id++;
-        }
-        QAction *act = addMenu( pm);
-        act->setText(i18n("Disconnec&t"));
-    }
-
-    act = KStandardAction::close( this, SLOT(closeWallet()), ac);
-    ac->addAction(QLatin1String( "wallet_close" ), act);
-    // FIXME: let's track this inside the manager so we don't need a dcop
-    //        roundtrip here.
-    act->setEnabled(KWallet::Wallet::isOpen(wallet));
-    addAction( act );
-
-    act = ac->addAction( QLatin1String( "wallet_delete" ) );
-    act->setText( i18n( "&Delete") );
-
-    connect(act, SIGNAL(triggered(bool)), SLOT(deleteWallet()));
-    act->setShortcut(QKeySequence(Qt::Key_Delete));
-    addAction( act );
-}
-
-
-KWalletPopup::~KWalletPopup() {
-}
-
-
-void KWalletPopup::openWallet() {
-    emit walletOpened(_walletName);
-}
-
-
-void KWalletPopup::deleteWallet() {
-    emit walletDeleted(_walletName);
-}
-
-
-void KWalletPopup::closeWallet() {
-    emit walletClosed(_walletName);
-}
-
-
-void KWalletPopup::changeWalletPassword() {
-    emit walletChangePassword(_walletName);
-}
-
-
-void KWalletPopup::createWallet() {
-    emit walletCreated();
-}
-
-
-void KWalletPopup::disconnectApp() {
-    QAction *a = qobject_cast<QAction *>(sender());
-    Q_ASSERT(a);
-    if (a) {
-        KWallet::Wallet::disconnectApplication(_walletName, a->data().toString());
-    }
-}
-
-#include "moc_kwalletpopup.cpp"
-
diff --git a/kwalletmanager/src/manager/kwalletpopup.h b/kwalletmanager/src/manager/kwalletpopup.h
deleted file mode 100644 (file)
index c5a8774..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-   Copyright (C) 2003 George Staikos <staikos@kde.org>
-
-   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 KWALLETPOPUP_H
-#define KWALLETPOPUP_H
-
-#include <kmenu.h>
-#include <QMap>
-
-
-class KWalletPopup : public KMenu {
-    Q_OBJECT
-
-public:
-    explicit KWalletPopup(const QString& wallet, QWidget *parent = 0, const char* name = 0);
-    virtual ~KWalletPopup();
-
-public slots:
-    void openWallet();
-    void deleteWallet();
-    void closeWallet();
-    void createWallet();
-    void changeWalletPassword();
-    void disconnectApp();
-
-signals:
-    void walletOpened(const QString& walletName);
-    void walletClosed(const QString& walletName);
-    void walletDeleted(const QString& walletName);
-    void walletCreated();
-    void walletChangePassword(const QString& walletName);
-
-private:
-    QString _walletName;
-};
-
-#endif
diff --git a/kwalletmanager/src/manager/kwmapeditor.cpp b/kwalletmanager/src/manager/kwmapeditor.cpp
deleted file mode 100644 (file)
index f2e8f6e..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-   Copyright (C) 2003,2004 George Staikos <staikos@kde.org>
-
-   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 "kwmapeditor.h"
-#include <kaction.h>
-#include <kactioncollection.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <kmenu.h>
-#include <kstandardaction.h>
-#include <kwindowsystem.h>
-#include <kicon.h>
-#include <ktextedit.h>
-#include <QPointer>
-#include <QApplication>
-#include <QClipboard>
-#include <QToolButton>
-#include <QtGui/qevent.h>
-#include <QItemDelegate>
-
-class InlineEditor : public KTextEdit {
-public:
-    InlineEditor(KWMapEditor *p) : KTextEdit(), _p(p) {
-        setAttribute(Qt::WA_DeleteOnClose);
-        setWindowFlags(Qt::Widget | Qt::FramelessWindowHint);
-        setCheckSpellingEnabled(false);
-        connect(p, SIGNAL(destroyed()), SLOT(close()));
-    }
-
-protected:
-    virtual void focusOutEvent(QFocusEvent *e) {
-        if (e->reason() == Qt::PopupFocusReason) {
-            // TODO: It seems we only get here if we're disturbed
-            // by our own popup. this needs some clearance though.
-            return;
-        }
-
-        close();
-    }
-
-    virtual void keyPressEvent(QKeyEvent *e) {
-        if (e->key() == Qt::Key_Escape) {
-            e->accept();
-            close();
-        } else {
-            e->ignore();
-            KTextEdit::keyPressEvent(e);
-        }
-    }
-
-    virtual void contextMenuEvent( QContextMenuEvent *event ) {
-        QMenu *menu = createStandardContextMenu();
-        popup = menu;
-        popup->exec( event->globalPos() );
-        delete popup;
-    }
-
-    QPointer<KWMapEditor> _p;
-    QPointer<QMenu> popup;
-};
-
-class KWMapEditorDelegate : public QItemDelegate
-{
-public:
-    KWMapEditorDelegate(KWMapEditor *parent) : QItemDelegate(parent)
-    {
-    }
-    
-    QWidget *createEditor(QWidget *parentWidget, const QStyleOptionViewItem &option, const QModelIndex &index) const
-    {
-        if (index.column() != 2) {
-            return QItemDelegate::createEditor(parentWidget, option, index);
-        }
-
-        KWMapEditor *mapEditor = static_cast<KWMapEditor*>(parent());
-        return new InlineEditor(mapEditor);
-    }
-    
-    void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
-    {
-        if (dynamic_cast<InlineEditor*>(editor)) {
-            KWMapEditor *mapEditor = static_cast<KWMapEditor*>(parent());
-            const QRect geo = mapEditor->visualRect(index);
-            editor->move(mapEditor->mapToGlobal(geo.topLeft()));
-            editor->resize(geo.width() * 2, geo.height() * 3);
-        } else {
-                QItemDelegate::updateEditorGeometry(editor, option, index);
-        }
-    }
-    
-    void setEditorData(QWidget *editor, const QModelIndex &index) const
-    {
-        InlineEditor *e = dynamic_cast<InlineEditor*>(editor);
-        if (e) {
-            KWMapEditor *mapEditor = static_cast<KWMapEditor*>(parent());
-            e->setText(mapEditor->item(index.row(), index.column())->text());
-        } else {
-                QItemDelegate::setEditorData(editor, index);
-        }
-    }
-    
-    void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
-    {
-        InlineEditor *e = dynamic_cast<InlineEditor*>(editor);
-        if (e) {
-            KWMapEditor *mapEditor = static_cast<KWMapEditor*>(parent());
-            mapEditor->item(index.row(), index.column())->setText(e->toPlainText());
-        } else {
-            QItemDelegate::setModelData(editor, model, index);
-        }
-    }
-};
-
-KWMapEditor::KWMapEditor(QMap<QString,QString>& map, QWidget *parent)
-    : QTableWidget(0, 3, parent), _map(map) {
-    setItemDelegate(new KWMapEditorDelegate(this));
-    _ac = new KActionCollection(this);
-    _copyAct = KStandardAction::copy(this, SLOT(copy()), _ac);
-    connect(this, SIGNAL(itemChanged(QTableWidgetItem*)), this, SIGNAL(dirty()));
-    connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenu(QPoint)));
-    setSelectionMode(NoSelection);
-    setHorizontalHeaderLabels(QStringList() << QString() << i18n("Key") << i18n("Value"));
-    setContextMenuPolicy(Qt::CustomContextMenu);
-    reload();
-}
-
-void KWMapEditor::reload() {
-    int row = 0;
-
-    while ((row = rowCount()) > _map.count()) {
-        removeRow(row - 1);
-    }
-
-    if ((row = rowCount()) < _map.count()) {
-        setRowCount(_map.count());
-        for (int x = row; x < rowCount(); ++x) {
-            QToolButton *b = new QToolButton(this);
-            b->setIcon(KIcon("edit-delete"));
-            b->setToolTip(i18n("Delete Entry"));
-            connect(b, SIGNAL(clicked()), this, SLOT(erase()));
-            setCellWidget(x, 0, b);
-            if (columnWidth(0) != b->sizeHint().width()) {
-                setColumnWidth(0, b->sizeHint().width());
-            }
-            setItem(x, 1, new QTableWidgetItem());
-            setItem(x, 2, new QTableWidgetItem());
-        }
-    }
-
-    row = 0;
-    for (QMap<QString,QString>::Iterator it = _map.begin(); it != _map.end(); ++it) {
-        item(row, 1)->setText(it.key());
-        item(row, 2)->setText(it.value());
-        row++;
-    }
-}
-
-
-KWMapEditor::~KWMapEditor() {
-}
-
-
-void KWMapEditor::erase() {
-    const QObject *o = sender();
-    for (int i = 0; i < rowCount(); i++) {
-        if (cellWidget(i, 0) == o) {
-            removeRow(i);
-            break;
-        }
-    }
-
-    emit dirty();
-}
-
-
-void KWMapEditor::saveMap() {
-    _map.clear();
-
-    for (int i = 0; i < rowCount(); i++) {
-        _map[item(i, 1)->text()] = item(i, 2)->text();
-    }
-}
-
-
-void KWMapEditor::addEntry() {
-    int x = rowCount();
-    insertRow(x);
-    QToolButton *b = new QToolButton(this);
-    b->setIcon(KIcon("edit-delete"));
-    b->setToolTip(i18n("Delete Entry"));
-    connect(b, SIGNAL(clicked()), this, SLOT(erase()));
-    setCellWidget(x, 0, b);
-    setItem(x, 1, new QTableWidgetItem());
-    setItem(x, 2, new QTableWidgetItem());
-    scrollToItem(item(x, 1));
-    setCurrentCell(x, 1);
-    emit dirty();
-}
-
-
-void KWMapEditor::emitDirty() {
-    emit dirty();
-}
-
-
-void KWMapEditor::contextMenu(const QPoint& pos) {
-    QTableWidgetItem *twi = itemAt(pos);
-    _contextRow = row(twi);
-    KMenu *m = new KMenu(this);
-    m->addAction( i18n("&New Entry" ), this, SLOT(addEntry()));
-    m->addAction( _copyAct );
-    m->popup(mapToGlobal(pos));
-}
-
-
-void KWMapEditor::copy() {
-    QTableWidgetItem *twi = item(_contextRow, 2);
-    if (twi) {
-        QApplication::clipboard()->setText(twi->text());
-    }
-}
-
-#include "moc_kwmapeditor.cpp"
diff --git a/kwalletmanager/src/manager/kwmapeditor.h b/kwalletmanager/src/manager/kwmapeditor.h
deleted file mode 100644 (file)
index fcb394b..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-   Copyright (C) 2003,2004 George Staikos <staikos@kde.org>
-
-   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 KWMAPEDITOR_H
-#define KWMAPEDITOR_H
-
-#include <QMap>
-
-#include <QTableWidget>
-
-class KAction;
-class KActionCollection;
-
-class KWMapEditor : public QTableWidget {
-    Q_OBJECT
-
-public:
-    KWMapEditor(QMap<QString,QString>& map, QWidget *parent = 0);
-    virtual ~KWMapEditor();
-
-public slots:
-    void reload();
-    void saveMap();
-    void erase();
-    void contextMenu(const QPoint& pos);
-    void addEntry();
-    void emitDirty();
-
-private slots:
-    void copy();
-
-signals:
-    void dirty();
-
-private:
-    QMap<QString,QString>& _map;
-    int _contextRow;
-    KActionCollection *_ac;
-    KAction *_copyAct;
-};
-
-#endif
diff --git a/kwalletmanager/src/manager/main.cpp b/kwalletmanager/src/manager/main.cpp
deleted file mode 100644 (file)
index 1a03818..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-   Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
-
-   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 <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kmimetype.h>
-#include <kstandarddirs.h>
-#include <kuniqueapplication.h>
-
-#include <QFile>
-#include <QFileInfo>
-
-#include "kwalletmanager.h"
-
-
-class MyApp : public KUniqueApplication {
-public:
-    MyApp() : KUniqueApplication() { KGlobal::ref(); }
-    virtual ~MyApp() {}
-
-    virtual int newInstance() { return 0; }
-};
-
-int main(int argc, char **argv) {
-    KAboutData about("kwalletmanager", 0, ki18n("KDE Wallet Manager"), "2.0",
-            ki18n("KDE Wallet Management Tool"),
-            KAboutData::License_GPL,
-            ki18n("(c) 2003,2004 George Staikos"), KLocalizedString(),
-            "http://utils.kde.org/projects/kwalletmanager");
-
-    about.addAuthor(ki18n("Valentin Rusu"), ki18n("Maintainer, user interface refactoring"), "kde@rusu.info");
-        about.addAuthor(ki18n("George Staikos"), ki18n("Original author and former maintainer"), "staikos@kde.org");
-    about.addAuthor(ki18n("Michael Leupold"), ki18n("Developer and former maintainer"), "lemma@confuego.org");
-        about.addAuthor(ki18n("Isaac Clerencia"), ki18n("Developer"), "isaac@warp.es");
-
-    KCmdLineArgs::init(argc, argv, &about);
-
-    KCmdLineOptions options;
-    options.add("show", ki18n("Show window on startup"));
-    options.add("kwalletd", ki18n("For use by kwalletd only"));
-    options.add("+name", ki18n("A wallet name"));
-    KCmdLineArgs::addCmdLineOptions(options);
-
-    if (!KUniqueApplication::start()) {
-        return 0;
-    }
-
-    MyApp a;
-
-    KWalletManager wm;
-    wm.setCaption(i18n("KDE Wallet Manager"));
-
-    KGlobal::dirs()->addResourceType("kwallet", 0, QLatin1String( "share/apps/kwallet" ));
-
-    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-
-    if (args->isSet("show")) {
-        wm.show();
-    }
-
-    if (args->isSet("kwalletd")) {
-        wm.kwalletdLaunch();
-    }
-
-    for (int i = 0; i < args->count(); ++i) {
-        QString fn = QFileInfo(args->arg(i)).absoluteFilePath();
-        KMimeType::Ptr ptr;
-        if (QFile::exists(fn) &&
-            (ptr = KMimeType::findByFileContent(fn)) &&
-            ptr->is(QLatin1String( "application/x-kwallet" ))) {
-            wm.openWalletFile(fn);
-        } else {
-            wm.openWallet(args->arg(i));
-        }
-    }
-    args->clear();
-    return a.exec();
-}
-
diff --git a/kwalletmanager/src/manager/registercreateactionmethod.cpp b/kwalletmanager/src/manager/registercreateactionmethod.cpp
deleted file mode 100644 (file)
index fe21ff6..0000000
+++ /dev/null
@@ -1,39 +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 "registercreateactionmethod.h"
-
-#include <kglobal.h>
-
-K_GLOBAL_STATIC(std::list<RegisterCreateActionsMethod::CreateActionsMethod>, createActionMethodList)
-
-RegisterCreateActionsMethod::RegisterCreateActionsMethod(RegisterCreateActionsMethod::CreateActionsMethod method)
-{
-    createActionMethodList->push_back(method);
-}
-
-void RegisterCreateActionsMethod::createActions(KActionCollection* actionCollection)
-{
-    std::list<CreateActionsMethod>::const_iterator it = createActionMethodList->begin();
-    std::list<CreateActionsMethod>::const_iterator end = createActionMethodList->end();
-    for ( ; it != end; it++ ) {
-        (*it)(actionCollection);
-    }
-}
diff --git a/kwalletmanager/src/manager/registercreateactionmethod.h b/kwalletmanager/src/manager/registercreateactionmethod.h
deleted file mode 100644 (file)
index 6a24c8c..0000000
+++ /dev/null
@@ -1,50 +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 REGISTERCREATEACTIONSMETHOD_H
-#define REGISTERCREATEACTIONSMETHOD_H
-
-#include <QList>
-#include <list>
-
-class KActionCollection;
-
-/**
- * This class is intended to avoid coupling between the main window and it's
- * contained widgets that handle actions.
- *
- * The main window it's a KXMLGuiWindow, that needs to have all the actions
- * created before the createGui method call. That would require for this class
- * to have knowledge for the actions of the child widgets, which is not very OO
- * wise.
- *
- * To avoid that, the main window will call createActions of this class that will
- * in turn delegate to the registered CreateActionsMethod's registered here.
- */
-class RegisterCreateActionsMethod {
-public:
-    typedef void (*CreateActionsMethod)(KActionCollection*);
-
-    RegisterCreateActionsMethod(CreateActionsMethod method);
-
-    static void createActions(KActionCollection *actionCollection);
-
-};
-
-#endif // REGISTERCREATEACTIONSMETHOD_H
diff --git a/kwalletmanager/src/manager/revokeauthbutton.cpp b/kwalletmanager/src/manager/revokeauthbutton.cpp
deleted file mode 100644 (file)
index 4f17e7a..0000000
+++ /dev/null
@@ -1,38 +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 "revokeauthbutton.h"
-#include <klocalizedstring.h>
-
-RevokeAuthButton::RevokeAuthButton(const QString& appName, KWallet::Wallet* wallet): 
-    QPushButton(),
-    _appName(appName),
-    _wallet(wallet)
-{
-    setObjectName(QString("Revoke_%1").arg(appName));
-    setText(i18n("Revoke Authorization"));
-    connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked()));
-}
-
-void RevokeAuthButton::onClicked()
-{
-    emit appRevoked(_appName);
-}
-
-#include "moc_revokeauthbutton.cpp"
diff --git a/kwalletmanager/src/manager/revokeauthbutton.h b/kwalletmanager/src/manager/revokeauthbutton.h
deleted file mode 100644 (file)
index cdbadcd..0000000
+++ /dev/null
@@ -1,46 +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 REVOKEAUTHBUTTON_H
-#define REVOKEAUTHBUTTON_H
-
-#include <QPushButton>
-
-namespace KWallet {
-class Wallet;
-}
-
-class RevokeAuthButton : public QPushButton
-{
-    Q_OBJECT
-public:
-    RevokeAuthButton(const QString& appName, KWallet::Wallet *wallet);
-
-private Q_SLOTS:
-    void onClicked();
-
-Q_SIGNALS:
-    void appRevoked(QString);
-
-private:
-    QString             _appName;
-    KWallet::Wallet     *_wallet;
-};
-
-#endif // REVOKEAUTHBUTTON_H
diff --git a/kwalletmanager/src/manager/walletcontrolwidget.cpp b/kwalletmanager/src/manager/walletcontrolwidget.cpp
deleted file mode 100644 (file)
index e9dd04f..0000000
+++ /dev/null
@@ -1,176 +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 "walletcontrolwidget.h"
-#include "kwalleteditor.h"
-#include "applicationsmanager.h"
-
-#include <QPropertyAnimation>
-#include <QTimer>
-#include <QFrame>
-#include <QToolButton>
-#include <qevent.h>
-#include <kwallet.h>
-#include <kmessagebox.h>
-#include <kmenu.h>
-#include <KTabWidget>
-#include <kdebug.h>
-#include <klocale.h>
-
-WalletControlWidget::WalletControlWidget(QWidget* parent, const QString& walletName):
-    QWidget(parent),
-    _walletName(walletName),
-    _wallet(0),
-    _walletEditor(0),
-    _applicationsManager(0)
-{
-    setupUi(this);
-    onSetupWidget();
-
-    QTimer::singleShot(1, this, SLOT(onSetupWidget()));
-}
-
-bool WalletControlWidget::openWallet()
-{
-    bool result = false;
-    if (_wallet && _wallet->isOpen()) {
-        result = true; // already opened
-    } else {
-        _wallet = KWallet::Wallet::openWallet(_walletName, effectiveWinId());
-        result = _wallet != 0;
-        onSetupWidget();
-    }
-    return result;
-}
-
-void WalletControlWidget::onSetupWidget()
-{
-    if (KWallet::Wallet::isOpen(_walletName)) {
-        if (0 == _wallet) {
-            _wallet = KWallet::Wallet::openWallet(_walletName, effectiveWinId());
-            if (0 == _wallet) {
-                kDebug() << "Weird situation: wallet could not be opened when setting-up the widget.";
-            }
-        }
-    }
-
-    if (_wallet) {
-        connect(_wallet, SIGNAL(walletClosed()), this, SLOT(onWalletClosed()));
-        _openClose->setText(i18n("&Close"));
-
-        if (0 == _walletEditor) {
-            _walletEditor = new KWalletEditor(_editorFrame);
-            _editorFrameLayout->addWidget(_walletEditor);
-            _walletEditor->setVisible(true);
-        }
-        _walletEditor->setWallet(_wallet);
-
-        if (0 == _applicationsManager) {
-            _applicationsManager = new ApplicationsManager(_applicationsFrame);
-            _applicationsFrameLayout->addWidget(_applicationsManager);
-            _applicationsManager->setVisible(true);
-        }
-        _applicationsManager->setWallet(_wallet);
-
-        _changePassword->setEnabled(true);
-        _stateLabel->setText(i18nc("the 'kdewallet' is currently open (e.g. %1 will be replaced with current wallet name)", "The '%1' wallet is currently open", _walletName));
-        _tabs->setTabIcon(0, QIcon::fromTheme( QLatin1String("wallet-open")).pixmap(16));
-    } else {
-        _openClose->setText(i18n("&Open..."));
-
-        if (_walletEditor) {
-            _walletEditor->setVisible(false);
-            delete _walletEditor, _walletEditor =0;
-        }
-
-        if (_applicationsManager) {
-            _applicationsManager->setVisible(false);
-            delete _applicationsManager, _applicationsManager = 0;
-        }
-        _changePassword->setEnabled(false);
-        _stateLabel->setText(i18n("The wallet is currently closed"));
-        _tabs->setTabIcon(0, QIcon::fromTheme( QLatin1String("wallet-closed")).pixmap(16));
-    }
-}
-
-void WalletControlWidget::onOpenClose()
-{
-    // TODO create some fancy animation here to make _walletEditor appear or dissapear in a fancy way
-    if (_wallet) {
-        // Wallet is open, attempt close it
-        int rc = KWallet::Wallet::closeWallet(_walletName, false);
-        if (rc != 0) {
-            rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), QString(), KGuiItem(i18n("Force Closure")), KGuiItem(i18n("Do Not Force")));
-            if (rc == KMessageBox::Yes) {
-                rc = KWallet::Wallet::closeWallet(_walletName, true);
-                if (rc != 0) {
-                    KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.", rc));
-                } else {
-                    _wallet = 0;
-                }
-            }
-        } else {
-            _wallet = 0;
-        }
-    } else {
-        _wallet = KWallet::Wallet::openWallet(_walletName, window()->winId());
-    }
-    onSetupWidget();
-}
-
-void WalletControlWidget::onWalletClosed()
-{
-    _wallet = 0;
-    onSetupWidget();
-}
-
-void WalletControlWidget::updateWalletDisplay()
-{
-//     QList<QAction*> existingActions = _disconnect->actions();
-//     QList<QAction*>::const_iterator i = existingActions.constBegin();
-//     QList<QAction*>::const_iterator ie = existingActions.constEnd();
-//     for ( ; i != ie; i++ ) {
-//         _disconnect->removeAction(*i);
-//     }
-// 
-}
-
-void WalletControlWidget::onDisconnectApplication()
-{
-    QAction *a = qobject_cast<QAction *>(sender());
-    Q_ASSERT(a);
-    if (a)  {
-        KWallet::Wallet::disconnectApplication(_walletName, a->data().toString());
-    }
-}
-
-void WalletControlWidget::onChangePassword()
-{
-    KWallet::Wallet::changePassword(_walletName, effectiveWinId());
-}
-
-void WalletControlWidget::hideEvent(QHideEvent* )
-{
-}
-
-void WalletControlWidget::showEvent(QShowEvent* ev)
-{
-}
-
-#include "moc_walletcontrolwidget.cpp"
diff --git a/kwalletmanager/src/manager/walletcontrolwidget.h b/kwalletmanager/src/manager/walletcontrolwidget.h
deleted file mode 100644 (file)
index fb94999..0000000
+++ /dev/null
@@ -1,58 +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 WALLETCONTROLWIDGET_H
-#define WALLETCONTROLWIDGET_H
-
-#include "ui_walletcontrolwidget.h"
-
-class KWalletEditor;
-class ApplicationsManager;
-
-namespace KWallet {
-class Wallet;
-}
-
-class WalletControlWidget : public QWidget, public Ui::WalletControlWidget 
-{
-    Q_OBJECT
-public:
-    WalletControlWidget(QWidget* parent, const QString& walletName);
-
-    bool openWallet();
-
-public Q_SLOTS:
-    void onSetupWidget();
-    void onOpenClose();
-    void onWalletClosed();
-    void updateWalletDisplay();
-    void onDisconnectApplication();
-    void onChangePassword();
-
-protected:
-    virtual void hideEvent(QHideEvent*);
-    virtual void showEvent(QShowEvent*);
-
-private:
-    QString             _walletName;
-    KWallet::Wallet*    _wallet;
-    KWalletEditor*      _walletEditor;
-    ApplicationsManager* _applicationsManager;
-};
-
-#endif // WALLETCONTROLWIDGET_H
diff --git a/kwalletmanager/src/manager/walletcontrolwidget.ui b/kwalletmanager/src/manager/walletcontrolwidget.ui
deleted file mode 100644 (file)
index 8e94b1c..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>WalletControlWidget</class>
- <widget class="QWidget" name="WalletControlWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>604</width>
-    <height>543</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_2">
-   <property name="margin">
-    <number>0</number>
-   </property>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="KSqueezedTextLabel" name="_stateLabel">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="text">
-        <string>KSqueezedTextLabel</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="_openClose">
-       <property name="text">
-        <string>Open...</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="topSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="_changePassword">
-       <property name="text">
-        <string>Change Password...</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QTabWidget" name="_tabs">
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <widget class="QWidget" name="_contentsTab">
-      <attribute name="icon">
-       <iconset theme="wallet-closed">
-        <normaloff/>
-       </iconset>
-      </attribute>
-      <attribute name="title">
-       <string>Contents</string>
-      </attribute>
-      <layout class="QHBoxLayout" name="horizontalLayout_2">
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <widget class="QFrame" name="_editorFrame">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="frameShape">
-          <enum>QFrame::NoFrame</enum>
-         </property>
-         <property name="frameShadow">
-          <enum>QFrame::Plain</enum>
-         </property>
-         <property name="lineWidth">
-          <number>0</number>
-         </property>
-         <layout class="QVBoxLayout" name="_editorFrameLayout">
-          <property name="margin">
-           <number>0</number>
-          </property>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="_appsTab">
-      <attribute name="icon">
-       <iconset theme="start-here-kde">
-        <normaloff/>
-       </iconset>
-      </attribute>
-      <attribute name="title">
-       <string>Applications</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <widget class="QFrame" name="_applicationsFrame">
-         <property name="frameShape">
-          <enum>QFrame::NoFrame</enum>
-         </property>
-         <property name="frameShadow">
-          <enum>QFrame::Plain</enum>
-         </property>
-         <property name="lineWidth">
-          <number>0</number>
-         </property>
-         <layout class="QVBoxLayout" name="_applicationsFrameLayout">
-          <property name="margin">
-           <number>0</number>
-          </property>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KSqueezedTextLabel</class>
-   <extends>QLabel</extends>
-   <header>ksqueezedtextlabel.h</header>
-  </customwidget>
- </customwidgets>
- <tabstops>
-  <tabstop>_openClose</tabstop>
-  <tabstop>_changePassword</tabstop>
-  <tabstop>_tabs</tabstop>
- </tabstops>
- <resources/>
- <connections>
-  <connection>
-   <sender>_openClose</sender>
-   <signal>clicked()</signal>
-   <receiver>WalletControlWidget</receiver>
-   <slot>onOpenClose()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>258</x>
-     <y>22</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>10</x>
-     <y>122</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>_changePassword</sender>
-   <signal>clicked()</signal>
-   <receiver>WalletControlWidget</receiver>
-   <slot>onChangePassword()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>349</x>
-     <y>16</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>271</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
- <slots>
-  <slot>onOpenClose()</slot>
-  <slot>onChangePassword()</slot>
- </slots>
-</ui>
diff --git a/kwalletmanager/src/manager/walletwidget.ui b/kwalletmanager/src/manager/walletwidget.ui
deleted file mode 100644 (file)
index 562fea3..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>WalletWidget</class>
- <widget class="QWidget" name="WalletWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>482</width>
-    <height>407</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <layout class="QGridLayout">
-   <item row="0" column="0">
-    <widget class="QSplitter" name="_splitter">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="opaqueResize">
-      <bool>true</bool>
-     </property>
-     <property name="childrenCollapsible">
-      <bool>false</bool>
-     </property>
-     <widget class="QFrame" name="_entryListFrame">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="frameShape">
-       <enum>QFrame::NoFrame</enum>
-      </property>
-      <property name="frameShadow">
-       <enum>QFrame::Plain</enum>
-      </property>
-     </widget>
-     <widget class="QWidget" name="layout3">
-      <layout class="QVBoxLayout" name="verticalLayout_4">
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout">
-         <property name="margin">
-          <number>0</number>
-         </property>
-         <item>
-          <widget class="QLabel" name="_iconTitle">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text">
-            <string/>
-           </property>
-           <property name="wordWrap">
-            <bool>false</bool>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QLabel" name="_entryTitle">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="font">
-            <font>
-             <weight>75</weight>
-             <bold>true</bold>
-            </font>
-           </property>
-           <property name="text">
-            <string/>
-           </property>
-           <property name="textFormat">
-            <enum>Qt::RichText</enum>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignVCenter</set>
-           </property>
-           <property name="wordWrap">
-            <bool>false</bool>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="KSqueezedTextLabel" name="_entryName">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="textFormat">
-          <enum>Qt::PlainText</enum>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QStackedWidget" name="_entryStack">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>1</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="currentIndex">
-          <number>0</number>
-         </property>
-         <widget class="QWidget" name="page1"/>
-         <widget class="QWidget" name="page2">
-          <layout class="QVBoxLayout" name="verticalLayout_3">
-           <property name="margin">
-            <number>0</number>
-           </property>
-           <item>
-            <layout class="QHBoxLayout" name="horizontalLayout_3">
-             <item>
-              <widget class="QToolButton" name="_hideContents">
-               <property name="text">
-                <string>Hide &amp;Contents</string>
-               </property>
-               <property name="popupMode">
-                <enum>QToolButton::DelayedPopup</enum>
-               </property>
-               <property name="toolButtonStyle">
-                <enum>Qt::ToolButtonTextOnly</enum>
-               </property>
-               <property name="arrowType">
-                <enum>Qt::DownArrow</enum>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_5">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <widget class="QTextEdit" name="_passwordValue">
-             <property name="font">
-              <font>
-               <family>Monospace</family>
-              </font>
-             </property>
-             <property name="acceptRichText">
-              <bool>false</bool>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </widget>
-         <widget class="QWidget" name="page3"/>
-         <widget class="QWidget" name="page4">
-          <layout class="QVBoxLayout" name="verticalLayout">
-           <item>
-            <spacer name="verticalSpacer">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>40</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item>
-            <layout class="QHBoxLayout" name="horizontalLayout">
-             <item>
-              <spacer name="horizontalSpacer_2">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QLabel" name="textLabel1_2">
-               <property name="text">
-                <string>This is a binary data entry.  It cannot be edited as its format is unknown and application specific.</string>
-               </property>
-               <property name="alignment">
-                <set>Qt::AlignVCenter</set>
-               </property>
-               <property name="wordWrap">
-                <bool>true</bool>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_3">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <spacer name="verticalSpacer_2">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>40</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </widget>
-         <widget class="QWidget" name="page_2">
-          <layout class="QVBoxLayout" name="verticalLayout_2">
-           <property name="margin">
-            <number>0</number>
-           </property>
-           <item>
-            <layout class="QHBoxLayout" name="horizontalLayout_2">
-             <item>
-              <widget class="QToolButton" name="_showContents">
-               <property name="text">
-                <string>Show &amp;Contents</string>
-               </property>
-               <property name="toolButtonStyle">
-                <enum>Qt::ToolButtonFollowStyle</enum>
-               </property>
-               <property name="arrowType">
-                <enum>Qt::NoArrow</enum>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_4">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <spacer name="verticalSpacer_3">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>40</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </widget>
-        </widget>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_4">
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="KPushButton" name="_undoChanges">
-           <property name="enabled">
-            <bool>false</bool>
-           </property>
-           <property name="text">
-            <string>&amp;Undo</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="KPushButton" name="_saveChanges">
-           <property name="enabled">
-            <bool>false</bool>
-           </property>
-           <property name="text">
-            <string>&amp;Save</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KPushButton</class>
-   <extends>QPushButton</extends>
-   <header>kpushbutton.h</header>
-  </customwidget>
-  <customwidget>
-   <class>KSqueezedTextLabel</class>
-   <extends>QLabel</extends>
-   <header>ksqueezedtextlabel.h</header>
-  </customwidget>
- </customwidgets>
- <includes>
-  <include location="global">kdialog.h</include>
-  <include location="global">kiconloader.h</include>
- </includes>
- <resources/>
- <connections/>
-</ui>
index 6d9bd48..4334b64 100644 (file)
@@ -240,11 +240,6 @@ export KDE_SESSION_UID
 XDG_CURRENT_DESKTOP=KDE
 export XDG_CURRENT_DESKTOP
 
-# At this point all the environment is ready, let's send it to kwalletd if running
-if test -n "$PAM_KWALLET_LOGIN" ; then
-    env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
-fi
-
 # We set LD_BIND_NOW to increase the efficiency of kdeinit.
 # kdeinit unsets this variable before loading applications.
 LD_BIND_NOW=true @KDE4_BIN_INSTALL_DIR@/kdeinit4 +kcminit_startup