[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kwallet
From:       George Staikos <staikos () kde ! org>
Date:       2003-07-18 8:59:51
[Download RAW message or body]

CVS commit by staikos: 

minor changes to match kded module API and semantics


  M +1 -1      backend/kwalletbackend.cc   1.20
  M +7 -0      backend/kwalletbackend.h   1.9
  M +5 -8      client/kwallet.cc   1.6


--- kdelibs/kwallet/backend/kwalletbackend.cc  #1.19:1.20
@@ -36,5 +36,5 @@ using namespace KWallet;
 #define KWMAGIC_LEN 11
 
-Backend::Backend(const QString& name) : _name(name) {
+Backend::Backend(const QString& name) : _name(name), _ref(0) {
         KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");
         _open = false;

--- kdelibs/kwallet/backend/kwalletbackend.h  #1.8:1.9
@@ -82,4 +82,10 @@ class Backend {
                 QStringList entryList() const;
 
+                int ref() { return ++_ref; }
+
+                int deref() { return --_ref; }
+
+                int refCount() const { return _ref; }
+
         private:
                 class BackendPrivate;
@@ -88,4 +94,5 @@ class Backend {
                 bool _open;
                 QString _folder;
+                int _ref;
                 // Map Folder->Entries
                 typedef QMap< QString, Entry* > EntryMap;

--- kdelibs/kwallet/client/kwallet.cc  #1.5:1.6
@@ -67,5 +67,5 @@ Wallet::Wallet(int handle, const QString
 Wallet::~Wallet() {
         if (_handle != -1) {
-                _dcopRef->call("close", _handle);
+                _dcopRef->call("close", _handle, false);
                 _handle = -1;
                 _folder = QString::null;
@@ -96,5 +96,5 @@ int Wallet::lockWallet() {
         }
 
-        DCOPReply r = _dcopRef->call("close", _handle);
+        DCOPReply r = _dcopRef->call("close", _handle, true);
         _handle = -1;
         _folder = QString::null;
@@ -184,10 +184,7 @@ bool rc = false;
 #endif
 
-        DCOPReply r = _dcopRef->call("setFolder", _handle, f);
-        if (r.isValid()) {
-                r.get(rc);
-                if (rc) {
+        if (hasFolder(f)) {
                         _folder = f;
-                }
+                rc = true;
         }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic