KWallet and DeviceStore sync patch
Valentine Sinitsyn
Valentine.Sinitsyn at usu.ru
Thu Jun 29 09:19:48 CEST 2006
Hello everybody,
------------------------------------------------------------------
Ups... It seems that my previous letter was blocked because of its
size waiting for moderator approval. 40RB patch is apparently too big
so I'm gziping it and sending the letter again. Please remove the
previous copy.
------------------------------------------------------------------
Attached to this letter is much improved version of my
KWallet-integration-and-DeviceStore-KStorage-synchronization patch
against kdereview/knetworkmanager I've sent to Timo some weeks ago.
Although many ideas are already implemented in knm-make-it-cool
branch, I'd like to highlight several points:
* Bugfixes to my code committed to knm-make-it-cool branch:
- Network::isModified() should return "true" if Network object is
modified itself or it is associated with modified Encryption
object. That's because we never persist Encryption object alone,
only on par with network and the code like "if (net->isModified())
{net->persist()}" must handle the situation when, say, only password
was changed.
- Encryption::setSecrets() should mark Encryption object as _dirty
only if it is not of type EncryptionWPAEnterprise, since we do not
store secrets ("identityPassword" and "certPrivatePassword") for
this type of Encryption. BTW: is this (i.e. not storing identity
and cert passwords) the right thing to do?
- Tray::slotNMConnected() is not the right place to persist Network
on successful connection since NetworkManager emit updateNetwork
signal for this purpose. This signal is handled (ultimately) in
KStorage::updateNetwork().
- There are some checks like _secret.isEmpty() in Encryption
classes. They are not correct (or at least they does not work for
me). Instead, one should check for _secret["password"].isEmpty() -
it also makes code cleaner.
- Network::Network() constructors: it is wrong to initialize
_hw_addresses (QStringList) with "" (i.e. adding empty string
to the beginning of the list) - this leads to
"empty" branches in "Show Networks" dialog for instance. What we
need is empty _hw_addresses list which is filled later.
* DeviceStore/KStorage synchronization is stated to be implemented in
knm-make-it-cool network branch but I kindly ask you to look at my
implementation of it. The changes required are fairy minimal (there is
no need for Network pseudo-copy constructors or initFoundNetwork()
methods) and it fits perfectly to aforementioned updateNetwork signal.
Hope this patch (or some parts of it) will be useful for knm-make-it-cool or
kdereview/knetworkmanager branches.
Regards,
Valentine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-kwallet-sync-fix.patch.gz
Type: application/x-gzip
Size: 9489 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-networkmanager/attachments/20060629/6e698008/attachment.gz
More information about the kde-networkmanager
mailing list