From 865f314dd5ed55508f45a32973b709b79a541e36 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 03:46:01 +0000 Subject: kdelibs update to Trinity v3.5.11 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kio/misc/kwalletd/Makefile.am | 2 +- kio/misc/kwalletd/kwalletd.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) (limited to 'kio/misc/kwalletd') diff --git a/kio/misc/kwalletd/Makefile.am b/kio/misc/kwalletd/Makefile.am index f57f2c692..1c198c46e 100644 --- a/kio/misc/kwalletd/Makefile.am +++ b/kio/misc/kwalletd/Makefile.am @@ -21,7 +21,7 @@ INCLUDES= -I$(srcdir)/.. -I$(top_srcdir) -I$(top_srcdir)/kwallet/backend -I$(top kde_module_LTLIBRARIES = kded_kwalletd.la kded_kwalletd_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_kwalletd_la_LIBADD = $(LIB_KIO) ../../../kwallet/backend/libkwalletbackend.la ../../../kwallet/client/libkwalletclient.la $(LIB_KDED) +kded_kwalletd_la_LIBADD = $(LIB_KIO) ../../../kwallet/backend/libkwalletbackend.la ../../../kwallet/client/libkwalletclient.la $(LIB_KDED) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_KDECORE) $(LIB_KDEUI) $(top_builddir)/kded/libkdeinit_kded.la kded_kwalletd_la_SOURCES = kwalletd.cpp kwalletd.skel ktimeout.cpp kwalletwizard.ui kbetterthankdialogbase.ui METASOURCES = AUTO diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp index 686a99d6f..3fa32ff71 100644 --- a/kio/misc/kwalletd/kwalletd.cpp +++ b/kio/misc/kwalletd/kwalletd.cpp @@ -829,6 +829,12 @@ bool KWalletD::removeFolder(int handle, const QString& f) { if ((b = getWallet(friendlyDCOPPeerName(), handle))) { bool rc = b->removeFolder(f); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); QByteArray data; QDataStream ds(data, IO_WriteOnly); ds << b->walletName(); @@ -845,6 +851,12 @@ bool KWalletD::createFolder(int handle, const QString& f) { if ((b = getWallet(friendlyDCOPPeerName(), handle))) { bool rc = b->createFolder(f); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); QByteArray data; QDataStream ds(data, IO_WriteOnly); ds << b->walletName(); @@ -987,6 +999,12 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co e.setValue(value); e.setType(KWallet::Wallet::Map); b->writeEntry(&e); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return 0; } @@ -1005,6 +1023,12 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, e.setValue(value); e.setType(KWallet::Wallet::EntryType(entryType)); b->writeEntry(&e); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return 0; } @@ -1023,6 +1047,12 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, e.setValue(value); e.setType(KWallet::Wallet::Stream); b->writeEntry(&e); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return 0; } @@ -1041,6 +1071,12 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke e.setValue(value); e.setType(KWallet::Wallet::Password); b->writeEntry(&e); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return 0; } @@ -1090,6 +1126,12 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) } b->setFolder(folder); bool rc = b->removeEntry(key); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return rc ? 0 : -3; } @@ -1183,6 +1225,12 @@ int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldN if ((b = getWallet(friendlyDCOPPeerName(), handle))) { b->setFolder(folder); int rc = b->renameEntry(oldName, newName); + // write changes to disk immediately + QByteArray p; + QString wallet = b->walletName(); + p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); + b->sync(p); + p.fill(0); emitFolderUpdated(b->walletName(), folder); return rc; } -- cgit v1.2.1