Custom-type QVariant comparison in KConfigDialogManager
Constantin Berzan
exit3219 at gmail.com
Fri Jun 15 19:51:28 BST 2007
Hello list,
I am using a KUrlRequester in a form for configuring a KConfigXT "url"
property. The problem is that the "Default" and "Apply" buttons are always
active. I think I got to the root of this problem, which is the way item
values are compared in kdelibs/kdeui/dialogs/kconfigdialogmanager.cpp on line
480:
if (p != item->property())
We are comparing two QVariants which (in this case) use the custom "user" type
KUrl. The Qt docs clearly state we can't do this: operator!= and others don't
support custom types.
I can't see a way around this problem, so please enlighten me ;)
Many thanks in advance.
Note that the problem disappears if I use strings (and QLineEdits) instead of
urls (and KUrlRequesters). Obviously because QVariants have no problem with
that.
--
http://ascending.wordpress.com/
More information about the kde-core-devel
mailing list