[Kde-bindings] [Bug 259458] New: PyKDE4: Every KCoreConfigSkeletonItem that represents a primitive / immutable type returns garbage
Dennis Malcorps
dennis.malcorps at gmail.com
Fri Dec 10 17:29:27 UTC 2010
https://bugs.kde.org/show_bug.cgi?id=259458
Summary: PyKDE4: Every KCoreConfigSkeletonItem that represents
a primitive / immutable type returns garbage
Product: bindings
Version: unspecified
Platform: openSUSE RPMs
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kde-bindings at kde.org
ReportedBy: dennis.malcorps at gmail.com
Version: unspecified (using KDE 4.5.4)
OS: Linux
There are two ways to add a new item to a KConfigSkeleton object.
1) create the item with one of KConfigSkeleton.ItemFoo constructors and call
KConfigSkeleton.addItem(...)
2) using the convenience functions KConfigSkeleton.addItemFoo(...)
For primitive / immutable types (bool, int, uint, longlong, ulonglong, double,
enum) only the second method works as expected. The first one returns random
garbage. And as a bonus, if you try to load a value already stored in a config
file using method 1, python segfaults...
Reproducible: Always
Steps to Reproduce:
>>> from PyKDE4 import kdecore
>>> reference = int()
>>> item = kdecore.KCoreConfigSkeleton.ItemInt('group', 'key', reference, 1234)
>>> item.value()
Actual Results:
-1216966668
Expected Results:
1234
python-qt4
version: 4.8-2.9
python-kde4
version: 4.5.4-18.4
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kde-bindings
mailing list