[PyQt] Regression in SIP sip-4.8-snapshot-20090409 wrt MappedTypes
Phil Thompson
phil at riverbankcomputing.com
Mon Apr 20 19:54:58 BST 2009
On Mon, 20 Apr 2009 08:22:54 +0200, Simon Edwards <simon at simonzone.com>
wrote:
> Phil Thompson wrote:
>> On Sun, 19 Apr 2009 21:39:29 +0200, Simon Edwards <simon at simonzone.com>
>> wrote:
>>> Phil Thompson wrote:
>>>> sipForceConvertTo_*() (and related functions) are internal and should
>> not
>>>> be used by handwritten code. If it isn't documented then you can't use
>>>> it.
>>> Thanks that helps a lot.
>>>
>>> Another question. 4.8 gives errors on PyKDE related it trying to use a
>>> copy constructor or operator=() on some classes which don't have one or
>>> have one which is private. It looks like SIP wants to use the copy
>>> constructor to copy a returned value from a method and then fails. Has
>>> anything changed? Have you got any tips about what I should be trying.
>>
>> If a copy ctor is private then SIP should be told about it - see
>> qobject.sip.
>
> The copy ctor is included and private like many others. This might be a
> namespace related issue. Here is what I've got. It worked in SIP < 4.8.
>
> class KEditListBox : QGroupBox
> {
> public:
> class CustomEditor
> {
> public:
> CustomEditor ();
> CustomEditor (QWidget* repWidget, KLineEdit* edit);
> CustomEditor (KComboBox* combo);
>
> private:
> CustomEditor (const KEditListBox::CustomEditor&);
> };
> // ...
> };
>
>
> class KUrlRequester : KHBox
> {
> // ...
> public:
> explicit KUrlRequester (QWidget* parent /TransferThis/ = 0);
> explicit KUrlRequester (const KUrl& url, QWidget* parent
> /TransferThis/ = 0);
> KUrlRequester (QWidget* editWidget, QWidget* parent /TransferThis/);
>
> const KEditListBox::CustomEditor& customEditor ();
> // ^ This here fails.
> }
>
>
> /home/sbe/devel/kdesvninstall/include/keditlistbox.h: In function
> ‘PyObject* meth_KUrlRequester_customEditor(PyObject*, PyObject*)’:
> /home/sbe/devel/kdesvninstall/include/keditlistbox.h:77: error:
> ‘KEditListBox::CustomEditor::CustomEditor(const
> KEditListBox::CustomEditor&)’ is private
> sipkiopart5.cpp:22797: error: within this context
Try tonight's SIP snapshot. It's a problem with the new implicit copying of
const reference results.
Phil
More information about the PyQt
mailing list