Package: python-qt4 Severity: important User: [EMAIL PROTECTED] Usertags: origin-ubuntu jaunty Tags: patch
the patch fails to apply. attached is the updated patch from the ubuntu package: #! /bin/sh /usr/share/dpatch/dpatch-run ## 04_qreal_api_fixes.dpatch by Torsten Marek <[EMAIL PROTECTED]> ## ## DP: Exchanges double by qreal in some wrapped methods. @DPATCH@ --- ./sip/QtCore/qvector.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtCore/qvector.sip 2008-11-20 16:09:43.000000000 +0000 @@ -156,8 +156,8 @@ return sipGetState(sipTransferObj); %End }; -// QVector<double> is implemented as a Python list of floats. -%MappedType QVector<double> +// QVector<float> is implemented as a Python list of floats. +%MappedType QVector<float> { %TypeHeaderCode #include <qvector.h> @@ -193,7 +193,7 @@ if (sipIsErr == NULL) return PyList_Check(sipPy); - QVector<double> *ql = new QVector<double>; + QVector<float> *ql = new QVector<float>; for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i) ql->append(PyFloat_AsDouble(PyList_GET_ITEM(sipPy, i))); @@ -203,9 +203,9 @@ return sipGetState(sipTransferObj); %End }; -// QVector<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples. +// QVector<QPair<float, TYPE> > is implemented as a Python list of 2-element tuples. template<TYPE> -%MappedType QVector<QPair<double, TYPE> > +%MappedType QVector<QPair<float, TYPE> > { %TypeHeaderCode #include <qvector.h> @@ -222,7 +222,7 @@ // Set the list elements. for (int i = 0; i < sipCpp->size(); ++i) { - const QPair<double, TYPE> &p = sipCpp->at(i); + const QPair<float, TYPE> &p = sipCpp->at(i); TYPE *pt = new TYPE(p.second); PyObject *pobj; @@ -261,14 +261,14 @@ return 1; } - QVector<QPair<double, TYPE> > *qv = new QVector<QPair<double, TYPE> >; + QVector<QPair<float, TYPE> > *qv = new QVector<QPair<float, TYPE> >; for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i) { PyObject *tup = PyList_GET_ITEM(sipPy, i); int state; TYPE *s; - QPair<double, TYPE> p; + QPair<float, TYPE> p; p.first = PyFloat_AsDouble(PyTuple_GET_ITEM(tup, 0)); --- ./sip/QtCore/qlist.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtCore/qlist.sip 2008-11-20 16:08:13.000000000 +0000 @@ -343,8 +343,8 @@ %End }; %If (Qt_4_3_0 -) -// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples. -%MappedType QList<QPair<double, double> > +// QList<QPair<float, float> > is implemented as a Python list of 2-element tuples. +%MappedType QList<QPair<float, float> > { %TypeHeaderCode #include <qlist.h> @@ -361,7 +361,7 @@ // Set the list elements. for (int i = 0; i < sipCpp->size(); ++i) { - const QPair<double, double> &p = sipCpp->at(i); + const QPair<float, float> &p = sipCpp->at(i); PyObject *pobj; if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL) @@ -393,16 +393,16 @@ return 1; } - QList<QPair<double, double> > *ql = new QList<QPair<double, double> >; + QList<QPair<float, float> > *ql = new QList<QPair<float, float> >; for (SIP_SSIZE_T i = 0; i < len; ++i) { PyObject *tup = PySequence_ITEM(sipPy, i); - double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); - double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1)); + float first = PyFloat_AsDouble(PyTuple_GET_ITEM(tup, 0)); + float second = PyFloat_AsDouble(PyTuple_GET_ITEM(tup, 1)); - ql->append(QPair<double, double>(first, second)); + ql->append(QPair<float, float>(first, second)); } *sipCppPtr = ql; @@ -412,9 +412,9 @@ }; %End %If (Qt_4_3_0 -) -// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples. -template<double, TYPE> -%MappedType QList<QPair<double, TYPE> > +// QList<QPair<float, TYPE> > is implemented as a Python list of 2-element tuples. +template<float, TYPE> +%MappedType QList<QPair<float, TYPE> > { %TypeHeaderCode #include <qlist.h> @@ -431,7 +431,7 @@ // Set the list elements. for (int i = 0; i < sipCpp->size(); ++i) { - const QPair<double, TYPE> &p = sipCpp->at(i); + const QPair<float, TYPE> &p = sipCpp->at(i); TYPE *t = new TYPE(p.second); PyObject *pobj; @@ -472,12 +472,12 @@ return 1; } - QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >; + QList<QPair<float, TYPE> > *ql = new QList<QPair<float, TYPE> >; for (SIP_SSIZE_T i = 0; i < len; ++i) { PyObject *tup = PySequence_ITEM(sipPy, i); - double d; + float d; int state; d = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); @@ -491,7 +491,7 @@ return 0; } - ql->append(QPair<double, TYPE>(d, *t)); + ql->append(QPair<float, TYPE>(d, *t)); sipReleaseInstance(t, sipClass_TYPE, state); } @@ -551,8 +551,8 @@ return sipGetState(sipTransferObj); %End }; -// QList<double> is implemented as a Python list of floats. -%MappedType QList<double> +// QList<float> is implemented as a Python list of floats. +%MappedType QList<float> { %TypeHeaderCode #include <qlist.h> @@ -590,7 +590,7 @@ if (sipIsErr == NULL) return (len >= 0); - QList<double> *ql = new QList<double>; + QList<float> *ql = new QList<float>; for (SIP_SSIZE_T i = 0; i < len; ++i) ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i))); --- ./sip/QtGui/qbrush.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtGui/qbrush.sip 2008-11-20 16:04:58.000000000 +0000 @@ -151,7 +151,7 @@ QDataStream &operator>>(QDataStream &, QBrush & /Constrained/); QDataStream &operator<<(QDataStream &, const QBrush & /Constrained/); -typedef QVector<QPair<double, QColor> > QGradientStops; +typedef QVector<QPair<float, QColor> > QGradientStops; class QGradient { --- ./sip/QtGui/qpen.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtGui/qpen.sip 2008-11-20 16:04:59.000000000 +0000 @@ -104,8 +104,8 @@ void setCapStyle(Qt::PenCapStyle pcs); Qt::PenJoinStyle joinStyle() const; void setJoinStyle(Qt::PenJoinStyle pcs); - QVector<double> dashPattern() const; - void setDashPattern(const QVector<double> &pattern); + QVector<float> dashPattern() const; + void setDashPattern(const QVector<float> &pattern); qreal miterLimit() const; void setMiterLimit(qreal limit); bool operator==(const QPen &p) const; --- ./sip/QtGui/qgraphicsitemanimation.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtGui/qgraphicsitemanimation.sip 2008-11-20 16:04:59.000000000 +0000 @@ -77,19 +77,19 @@ public: %If (Qt_4_3_0 -) - QList<QPair<double, QPointF> > posList() const; + QList<QPair<float, QPointF> > posList() const; %End %If (Qt_4_3_0 -) - QList<QPair<double, double> > rotationList() const; + QList<QPair<float, float> > rotationList() const; %End %If (Qt_4_3_0 -) - QList<QPair<double, QPointF> > translationList() const; + QList<QPair<float, QPointF> > translationList() const; %End %If (Qt_4_3_0 -) - QList<QPair<double, QPointF> > scaleList() const; + QList<QPair<float, QPointF> > scaleList() const; %End %If (Qt_4_3_0 -) - QList<QPair<double, QPointF> > shearList() const; + QList<QPair<float, QPointF> > shearList() const; %End private: --- ./sip/QtGui/qpainterpath.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtGui/qpainterpath.sip 2008-11-20 16:04:59.000000000 +0000 @@ -219,8 +219,8 @@ void setCurveThreshold(qreal threshold); qreal curveThreshold() const; void setDashPattern(Qt::PenStyle); - void setDashPattern(const QVector<double> &dashPattern); - QVector<double> dashPattern() const; + void setDashPattern(const QVector<float> &dashPattern); + QVector<float> dashPattern() const; QPainterPath createStroke(const QPainterPath &path) const; %If (Qt_4_3_0 -) void setDashOffset(qreal offset); --- ./sip/QtGui/qtextoption.sip.orig 2008-08-08 14:10:05.000000000 +0000 +++ ./sip/QtGui/qtextoption.sip 2008-11-20 16:04:59.000000000 +0000 @@ -75,8 +75,8 @@ typedef QFlags<QTextOption::Flag> Flags; QFlags<QTextOption::Flag> flags() const; qreal tabStop() const; - void setTabArray(QList<double> tabStops); - QList<double> tabArray() const; + void setTabArray(QList<float> tabStops); + QList<float> tabArray() const; void setUseDesignMetrics(bool b); bool useDesignMetrics() const; void setAlignment(Qt::Alignment aalignment); _______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/python-modules-team