Bug#677149: qpdfview FTBFS on armel and armhf qreal vs double issues

2012-06-14 Thread Benjamin Eltzner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Peter,

thanks for the bug report. Upstream released a new version with a
corresponding fix, which I packaged. It can be found in

http://mentors.debian.net/package/qpdfview

Regards,

Benjamin Eltzner

 package: qpdfview severity: important version: 0.3~beta2-1 tags:
 patch
 
 Your package failed to build on armel and armhf 
 sources/documentview.cpp: In member function ‘void 
 DocumentView::preparePages()Â’: sources/documentview.cpp:2121:40:
 error: no matching function for call to ‘qMax(qreal, double)’ 
 sources/documentview.cpp:2121:40: note: candidate is: 
 /usr/include/qt4/QtCore/qglobal.h:1116:17: note: templateclass T
 const T qMax(const T, const T) sources/documentview.cpp:2122:40:
 error: no matching function for call to ‘qMin(qreal, double)’ 
 sources/documentview.cpp:2122:40: note: candidate is: 
 /usr/include/qt4/QtCore/qglobal.h:1114:17: note: templateclass T
 const T qMin(const T, const T) make[1]: *** [documentview.o]
 Error 1
 
 On most architectures qreal is defined as double but on arm
 architectures it is defined as float. Assignments between qreal and
 double are ok because assignments between float and double are ok
 but there can be issues with pointers, templates and overloaded
 functions if proper distinctions are not made. In this particular
 case the issue is a template.
 
 The fix is a simple case of adding some typecasts a similar issue
 in main.cpp is fixed in the same way.
 
 patch is attached.
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJP2iNoAAoJEK27BRz67lmpjkcQAI9wTOf2X2/M/4/C4ZCGi+a9
l63+FjXQZ7NLN78RbjG4zgR7czof1hkdLth2eUhV+Q9zdNqEAGZeZTv4eccs/AdF
rWIa5kVwKzaFSv/xULlQ2/0Hzxi02lKWIv89lVNCONDvG3RGbQAzvQ9B9PVuQQmf
+9F2DYEhB1EY/jc8I1nZ9jbLhjtrvkKcTyXErgSdnrMYuVy0lOG015TbTg++/9o8
NNNTjLTP9g5yri146hkpl1DOIbCsDmaLEsSVjoiHHW+R1IZT0Vc82UIoPXcI3J0G
VULmmryd6H3+/cBkRKu+hLWTXT0L0rM3KhSurBpzHeBhxbEGEzqvCS0UqUVYCToy
Je+EQ2wnsT3H8+bQzdMT9k5kDx/H/nZGsU0+EC4Js0xr3DROHvkFdlo4u/cmbtfI
6546qaKONw9kcVUxYvyonP6UvKroZpCLfROyCDrmwcJE4Vf5GIY+gmAB39DYeivd
KoAjaTjPWWIz1rRT2BYawnGAUg7bHKPnHcjkG/E+r1VcUa4Cdk8Xp3PpLLz/1Hcb
IglaGf5Qyb1duGWX6kOfoX/GVfu7rfMy8x6ArH4fnhWhiXpzL+UhrHoSYiqIcfd0
iOIO0figiVG8UMJvmHW1IXV2QMi6y/433jG5vcGvpg1sfmbQhcuowtlWUBrE+/NE
PQsBKBvbV3uzF790oTZ+
=D8pj
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#677149: qpdfview FTBFS on armel and armhf qreal vs double issues

2012-06-11 Thread peter green

package: qpdfview
severity: important
version: 0.3~beta2-1
tags: patch

Your package failed to build on armel and armhf 


sources/documentview.cpp: In member function ‘void 
DocumentView::preparePages()’:
sources/documentview.cpp:2121:40: error: no matching function for call to 
‘qMax(qreal, double)’
sources/documentview.cpp:2121:40: note: candidate is:
/usr/include/qt4/QtCore/qglobal.h:1116:17: note: templateclass T const T qMax(const 
T, const T)
sources/documentview.cpp:2122:40: error: no matching function for call to 
‘qMin(qreal, double)’
sources/documentview.cpp:2122:40: note: candidate is:
/usr/include/qt4/QtCore/qglobal.h:1114:17: note: templateclass T const T qMin(const 
T, const T)
make[1]: *** [documentview.o] Error 1

On most architectures qreal is defined as double but on arm architectures
it is defined as float. Assignments between qreal and double are ok because
assignments between float and double are ok but there can be issues with
pointers, templates and overloaded functions if proper distinctions are not
made. In this particular case the issue is a template.

The fix is a simple case of adding some typecasts a similar issue in 
main.cpp is fixed in the same way.


patch is attached.

Description: Fix qreal VS double
  Fix two qreal vs double issues that were preventing build on armel/armhf
  One invlolving a template the other involving pointers.
Author: Peter Michael Green plugw...@p10link.net
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: -MM-DD

--- scribus-1.4.0.dfsg+r17287.orig/scribus/pageitem_textframe.cpp
+++ scribus-1.4.0.dfsg+r17287/scribus/pageitem_textframe.cpp
@@ -554,7 +554,7 @@ struct LineControl {
 		double maxX = colRight - morespace;
 		if (legacy) maxX -= lineCorr;
 
-		double StartX = floor(qMax(line.x, qMin(maxX,breakXPos-maxShrink-1))-1);
+		double StartX = floor(qMax((double)line.x, qMin(maxX,breakXPos-maxShrink-1))-1);
 		int xPos  = static_castint(ceil(maxX));
 
 		QPoint  pt12 (xPos, yAsc);
--- scribus-1.4.0.dfsg+r17287.orig/scribus/scribusview.cpp
+++ scribus-1.4.0.dfsg+r17287/scribus/scribusview.cpp
@@ -1711,7 +1711,7 @@ bool ScribusView::slotSetCurs(int x, int
 			FPoint point(pf.x() - currItem-xPos(), pf.y() - currItem-yPos());
 			if (transform.isInvertible()  currItem-itemText.length()  0)
 			{
-double tx = 0, ty = 0;
+qreal tx = 0, ty = 0;
 transform.inverted().map(pf.x(), pf.y(), tx, ty);
 point.setXY(tx, ty);
 			}