<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">Hi,<br><br>I am trying to build Scribus 1.4.3 on an ARM CPU that runs Debian Wheezy (Raspbian). Following the installation of all of the dependencies, the compilation goes well until <br><br>[ 66%] Building CXX object scribus/CMakeFiles/scribus.dir/scpainter.cpp.o<br>/home/pi/Scribus/scribus/scpainter.cpp: In member function ‘void ScPainter::drawVPath(int)’:<br>/home/pi/Scribus/scribus/scpainter.cpp:1119:31:
error: no matching function for call to
‘QPen::setDashPattern(QVector<double>&)’<br>/home/pi/Scribus/scribus/scpainter.cpp:1119:31: note: candidate is:<br>/usr/include/qt4/QtGui/qpen.h:87:10: note: void QPen::setDashPattern(const QVector<float>&)<br>/usr/include/qt4/QtGui/qpen.h:87:10:
note: no known conversion for argument 1 from ‘QVector<double>’
to ‘const QVector<float>&’<br>make[2]: *** [scribus/CMakeFiles/scribus.dir/scpainter.cpp.o] Error 1<br>make[1]: *** [scribus/CMakeFiles/scribus.dir/all] Error 2<br>make: *** [all]
Error 2<br><br>It is very clear why this fails. In Qt4 there is<br><br>/usr/include/qt4/Qt/qglobal.h<br><br>typedef QT_COORD_TYPE qreal;<br>#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)<br>typedef float qreal;<br>#else<br>typedef double qreal;<br>#endif<br><br>The Qt functions use qreal, rather than double of float. In the Scribus source code there are lots of <br><br>QList<double> and QVector<double><br><br>While I could use sed to switch these to qreal, there are other pieces of code such as<br><br>Scribus/scribus/util.cpp<br><br>void getDashArray(int dashtype, double linewidth, QVector<float> &m_array) {<br> QVector<double> tmp;<br> getDashArray(dashtype, linewidth, tmp);<br> m_array.clear();<br> for (int i = 0; i < tmp.count(); ++i) {<br> m_array <<
static_cast<float>(tmp[i]);<br> }<br>}<br><br>void getDashArray(int dashtype, double linewidth, QVector<double> &m_array)<br>{<br> m_array.clear();<br> if ((dashtype == 1) || (dashtype == 0))<br> return;<br> double Dt = qMax(1.0*linewidth, 0.1);<br> double Sp = qMax(2.0*linewidth,
0.1);<br> double Da = qMax(4.0*linewidth, 0.1);<br> switch (dashtype)<br> {<br><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Why is QVector<double> used instead of QVector<qreal> etc? If I use sed, I will have to remove overloaded functions that include <float>. Is this safe?</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Thanks and best regards,</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Will<br></div></div></body></html>