mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix #8040. Build error with sip
This commit is contained in:
parent
6ddaa3e304
commit
052669f5c5
@ -22,14 +22,14 @@ typedef QVector<QVariant> QgsAttributes;
|
|||||||
// Set the list elements.
|
// Set the list elements.
|
||||||
for (int i = 0; i < sipCpp->size(); ++i)
|
for (int i = 0; i < sipCpp->size(); ++i)
|
||||||
{
|
{
|
||||||
const QVariant& v = sipCpp->at(i);
|
QVariant* v = new QVariant(sipCpp->at(i));
|
||||||
PyObject *tobj;
|
PyObject *tobj;
|
||||||
|
|
||||||
if ( v.isNull() )
|
if ( v->isNull() )
|
||||||
{
|
{
|
||||||
tobj = Py_None;
|
tobj = Py_None;
|
||||||
}
|
}
|
||||||
else if ((tobj = sipConvertFromType(&v, sipType_QVariant,Py_None)) == NULL)
|
else if ((tobj = sipConvertFromType(v, sipType_QVariant,Py_None)) == NULL)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ class QgsFeature
|
|||||||
|
|
||||||
if (fieldIdx >= 0)
|
if (fieldIdx >= 0)
|
||||||
{
|
{
|
||||||
const QVariant& v = sipCpp->attribute(fieldIdx);
|
QVariant& v = sipCpp->attribute(fieldIdx);
|
||||||
if ( v.isNull() )
|
if ( v.isNull() )
|
||||||
sipRes = Py_None;
|
sipRes = Py_None;
|
||||||
else
|
else
|
||||||
@ -129,7 +129,7 @@ class QgsFeature
|
|||||||
}
|
}
|
||||||
else if( altfieldIdx >= 0 )
|
else if( altfieldIdx >= 0 )
|
||||||
{
|
{
|
||||||
const QVariant& v = sipCpp->attribute(altfieldIdx);
|
QVariant& v = sipCpp->attribute(altfieldIdx);
|
||||||
if ( v.isNull() )
|
if ( v.isNull() )
|
||||||
sipRes = Py_None;
|
sipRes = Py_None;
|
||||||
else
|
else
|
||||||
@ -200,11 +200,11 @@ class QgsFeature
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QVariant& v = attrs[a0];
|
QVariant* v = new QVariant(attrs[a0]);
|
||||||
if ( v.isNull() )
|
if ( v->isNull() )
|
||||||
sipRes = Py_None;
|
sipRes = Py_None;
|
||||||
else
|
else
|
||||||
sipRes = sipConvertFromInstance( &v, sipClass_QVariant, Py_None );
|
sipRes = sipConvertFromInstance( v, sipClass_QVariant, Py_None );
|
||||||
}
|
}
|
||||||
%End
|
%End
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ class QgsFeature
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QVariant& v = sipCpp->attribute(fieldIdx);
|
QVariant& v = sipCpp->attribute(fieldIdx);
|
||||||
if ( v.isNull() )
|
if ( v.isNull() )
|
||||||
sipRes = Py_None;
|
sipRes = Py_None;
|
||||||
else
|
else
|
||||||
@ -258,7 +258,7 @@ class QgsFeature
|
|||||||
{
|
{
|
||||||
if ( a1Wrapper == Py_None )
|
if ( a1Wrapper == Py_None )
|
||||||
{
|
{
|
||||||
sipCpp->setAttribute(a0, QVariant( QVariant::Int ) );
|
sipCpp->setAttribute(*a0, QVariant( QVariant::Int ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -422,7 +422,7 @@ class QgsFeature
|
|||||||
{
|
{
|
||||||
if ( a1Wrapper == Py_None )
|
if ( a1Wrapper == Py_None )
|
||||||
{
|
{
|
||||||
sipCpp->setAttribute(a0, QVariant( QVariant::Int ) );
|
sipCpp->setAttribute(*a0, QVariant( QVariant::Int ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -463,7 +463,7 @@ class QgsFeature
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QVariant& v = sipCpp->attribute(fieldIdx);
|
QVariant& v = sipCpp->attribute(fieldIdx);
|
||||||
if ( v.isNull() )
|
if ( v.isNull() )
|
||||||
sipRes = Py_None;
|
sipRes = Py_None;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user