[Kde-bindings] [Bug 244697] [PATCH] pykde4-4.4.92 doesn't compile: can't use default assignment operator

Kevin Kofler kevin.kofler at chello.at
Sun Jul 18 22:09:31 UTC 2010


https://bugs.kde.org/show_bug.cgi?id=244697


Kevin Kofler <kevin.kofler at chello.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kevin.kofler at chello.at




--- Comment #6 from Kevin Kofler <kevin kofler chello at>  2010-07-19 00:09:29 ---
Just to add some detail for anyone wondering what happened. (I guess none of
what I'm about to explain will be new to Simon Edwards, but other people might
want to know as well. :-) ) This change to SIP:
http://www.riverbankcomputing.com/hg/sip/rev/3e647ed0f2a2
is what triggered the problem. In the offending class, the constructor indeed
has default arguments for everything. So the new SIP decides to build
"assignment helpers", as for any default-constructable class. The problem is
that the class is not actually assignable: there's no explicit operator= and
the default one cannot be generated due to the const member.

One way to solve the problem would have been to just make the class assignable,
but this requires changing kdepimlibs. One would have to change the const
Private *d to a QSharedDataPointer<Private> d. But I don't know whether that is
binary-compatible nor wheter it is desirable in the first place. We shouldn't
have to change kdepimlibs to make the bindings work.

So what I did to fix the problem (I was the one who wrote the Fedora fix Rex
Dieter attached in comment #2) is to add an artificial private operator= to
addressattribute.sip. This marks the class as non-assignable in SIP and
prevents SIP from generating assignment helpers, without other side effects. (I
suspect NoDefaultCtors, which was suggested as an alternative fix, does have
side effects!) I see this (the private operator=) is the fix that was committed
upstream as per comment #5.

Thanks for resolving this in the upstream tree so quickly!

-- 
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