package: engauge-digitizer
severity: serious
tags: patch
version: 5.0-1

The latest upload of engauge-digitizer failed on armel and armhf with the following erors

src/digitview.cpp:293:61: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:293:61: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
src/digitview.cpp:295:68: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:295:68: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
src/digitview.cpp: In member function 'QRect DigitView::convertZoom(QRect, 
bool)':
src/digitview.cpp:305:70: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:305:70: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
src/digitview.cpp:306:74: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:306:74: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
src/digitview.cpp:310:77: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:310:77: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
src/digitview.cpp:311:81: error: no matching function for call to 
'QMatrix::map(double, double, double*, double*) const'
src/digitview.cpp:311:81: note: candidates are:
/usr/include/qt4/QtGui/qmatrix.h:80:10: note: void QMatrix::map(int, int, int*, 
int*) const
/usr/include/qt4/QtGui/qmatrix.h:80:10: note:   no known conversion for 
argument 3 from 'double*' to 'int*'
/usr/include/qt4/QtGui/qmatrix.h:81:10: note: void QMatrix::map(qreal, qreal, 
qreal*, qreal*) const
/usr/include/qt4/QtGui/qmatrix.h:81:10: note:   no known conversion for 
argument 3 from 'double*' to 'qreal* {aka float*}'
/usr/include/qt4/QtGui/qmatrix.h:85:12: note: QPoint QMatrix::map(const 
QPoint&) const
/usr/include/qt4/QtGui/qmatrix.h:85:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:86:13: note: QPointF QMatrix::map(const 
QPointF&) const
/usr/include/qt4/QtGui/qmatrix.h:86:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:87:11: note: QLine QMatrix::map(const QLine&) 
const
/usr/include/qt4/QtGui/qmatrix.h:87:11: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:88:12: note: QLineF QMatrix::map(const 
QLineF&) const
/usr/include/qt4/QtGui/qmatrix.h:88:12: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:89:15: note: QPolygonF QMatrix::map(const 
QPolygonF&) const
/usr/include/qt4/QtGui/qmatrix.h:89:15: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:90:14: note: QPolygon QMatrix::map(const 
QPolygon&) const
/usr/include/qt4/QtGui/qmatrix.h:90:14: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:91:13: note: QRegion QMatrix::map(const 
QRegion&) const
/usr/include/qt4/QtGui/qmatrix.h:91:13: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:92:18: note: QPainterPath QMatrix::map(const 
QPainterPath&) const
/usr/include/qt4/QtGui/qmatrix.h:92:18: note:   candidate expects 1 argument, 4 
provided
/usr/include/qt4/QtGui/qmatrix.h:123:30: note: QRect QMatrix::map(const QRect&) 
const
/usr/include/qt4/QtGui/qmatrix.h:123:30: note:   candidate expects 1 argument, 
4 provided
make[1]: *** [src/.objs/digitview.o] Error 1
make[1]: Leaving directory 
`/build/buildd-engauge-digitizer_5.0-1-armel-GuChKr/engauge-digitizer-5.0'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
On most architectures qreal is defined as double but on arm architectures it is defined as float. Assignments between double and qreal are ok because assignments between float and qreal are ok. However pointers to qreal must be treated as incompatible with pointers to double and there can also be problems involving templates and ambiguous overloads (in this case though the problem is pointers).

The fix in this case is pretty simple, just a matter of changing a couple of variable declarations from double to qreal.

patch and series file are attatched, just create debian/patches, drop them in (the package uses 3.0 (quilt) but doesn't currently have any patches) and fill in the bug number in the patch description.

Description: Fix issues with double VS qreal
 The code was attempting to pass double* to a function expecting qreal*
 resulting in compile errors on arm (where qreal is defined as float)
 this patch changes a couple of variable definitions so the types match
 up.
Bug-Debian: http://bugs.debian.org/??????

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- engauge-digitizer-5.0.orig/src/digitview.cpp
+++ engauge-digitizer-5.0/src/digitview.cpp
@@ -288,7 +288,7 @@ void DigitView::keyReleaseEvent(QKeyEven
 
 QPoint DigitView::convertZoom(QPoint p, bool to)
 {
-  double x, y;
+  qreal x, y;
   if (to)
     worldMatrix().map((double) p.x(), (double) p.y(), &x, &y);
   else
@@ -299,7 +299,7 @@ QPoint DigitView::convertZoom(QPoint p,
 
 QRect DigitView::convertZoom(QRect r, bool to)
 {
-  double xTL, yTL, xBR, yBR;
+  qreal xTL, yTL, xBR, yBR;
   if (to)
   {
     worldMatrix().map((double) r.left(), (double) r.top(), &xTL, &yTL);
fix_qreal_vs_double.patch

Reply via email to