KConfig:copyTo + Sync doesn't write to disk (test case)
Eduardo Robles Elvira
edulix at gmail.com
Mon Apr 7 22:58:43 BST 2008
Hello,
The testcase explains itself, I belive. I create a config file with a group
with an entry. Then I create another config file (previously deleting it from
disk), and copy the content of the first group to the one in the new config
file. Now I sync() the configGroup, but the test fails because the new config
file is not being written to disk.
The testcase (in the form of a patch for kdelibs/kdecore/tests/) is attached;
anyone knows why is this happening?
It seems to me that copyTo() doesn't mark the kconfig as "dirty", because if
before the sync() call I do something like group2.writeEntry("Type", "Test");
then the test works (i.e. the file is saved to disk).
Greetings,
Eduardo Robles Elvira
--
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." (George Bernard Shaw)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-case.patch
Type: text/x-diff
Size: 1420 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080407/6cf3d75a/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080407/6cf3d75a/attachment.sig>
More information about the kde-core-devel
mailing list