Bug 256640

Summary: rocs-4.5.{2,3} fails to build on arm
Product: [Applications] Rocs Reporter: Andreas K. Huettel <dilfridge>
Component: generalAssignee: Tomaz Canabrava <tumaix>
Status: RESOLVED FIXED    
Severity: normal CC: cordlandwehr
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
URL: http://bugs.gentoo.org/show_bug.cgi?id=341069
Latest Commit: Version Fixed In:
Attachments: replace all occurences of double in code with qreal

Description Andreas K. Huettel 2010-11-11 23:38:47 UTC
Created attachment 53337 [details]
replace all occurences of double in code with qreal

rocs-4.5.{2,3} fails to build on arm architecture (armv5tel-softfloat-linux-gnueabi), error is this (and more similar)

/var/tmp/portage/kde-base/rocs-4.5.2/work/rocs-4.5.2/rocs/src/Core/node.cpp:210: error: prototype for 'void Node::setWidth(qreal)' does not match any in class 'Node'
/var/tmp/portage/kde-base/rocs-4.5.2/work/rocs-4.5.2/rocs/src/Core/node.h:88: error: candidate is: void Node::setWidth(double)

From the qt docs:

typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM
architectures. On ARM-based platforms, qreal is a typedef for float for
performance reasons.

So, this is what happens when the application assumes qreal=double...

Please consider the attached patch, which simply replaces all occurrences of "double" in the code with "qreal". Works fine on arm and should not harm anywhere else...
Comment 1 Andreas Cord-Landwehr 2012-03-08 19:44:21 UTC
Build tested on armel with 4.7.4.