[scribus] compiling Scribus 1.4.3 on an ARM CPU (Debian Wheezy)
William Bell
whbell at btinternet.com
Fri Aug 23 11:31:16 UTC 2013
Hi,
Who are the lead developers of the Scribus Qt4 interface?
Thanks and best regards,
Will
________________________________
From: William Bell <whbell at btinternet.com>
To: "scribus at lists.scribus.info" <scribus at lists.scribus.info>
Sent: Tuesday, 20 August 2013, 17:36
Subject: [scribus] compiling Scribus 1.4.3 on an ARM CPU (Debian Wheezy)
Hi,
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
[ 66%] Building CXX object scribus/CMakeFiles/scribus.dir/scpainter.cpp.o
/home/pi/Scribus/scribus/scpainter.cpp: In member function ‘void ScPainter::drawVPath(int)’:
/home/pi/Scribus/scribus/scpainter.cpp:1119:31:
error: no matching function for call to
‘QPen::setDashPattern(QVector<double>&)’
/home/pi/Scribus/scribus/scpainter.cpp:1119:31: note: candidate is:
/usr/include/qt4/QtGui/qpen.h:87:10: note: void QPen::setDashPattern(const QVector<float>&)
/usr/include/qt4/QtGui/qpen.h:87:10:
note: no known conversion for argument 1 from ‘QVector<double>’
to ‘const QVector<float>&’
make[2]: *** [scribus/CMakeFiles/scribus.dir/scpainter.cpp.o] Error 1
make[1]: *** [scribus/CMakeFiles/scribus.dir/all] Error 2
make: *** [all]
Error 2
It is very clear why this fails. In Qt4 there is
/usr/include/qt4/Qt/qglobal.h
typedef QT_COORD_TYPE qreal;
#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
typedef float qreal;
#else
typedef double qreal;
#endif
The Qt functions use qreal, rather than double of float. In the Scribus source code there are lots of
QList<double> and QVector<double>
While I could use sed to switch these to qreal, there are other pieces of code such as
Scribus/scribus/util.cpp
void getDashArray(int dashtype, double linewidth, QVector<float> &m_array) {
QVector<double> tmp;
getDashArray(dashtype, linewidth, tmp);
m_array.clear();
for (int i = 0; i < tmp.count(); ++i) {
m_array << static_cast<float>(tmp[i]);
}
}
void getDashArray(int dashtype, double linewidth, QVector<double> &m_array)
{
m_array.clear();
if ((dashtype == 1) || (dashtype == 0))
return;
double Dt = qMax(1.0*linewidth, 0.1);
double Sp = qMax(2.0*linewidth,
0.1);
double Da = qMax(4.0*linewidth, 0.1);
switch (dashtype)
{
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?
Thanks and best regards,
Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20130820/7f6c7e4c/attachment.html>
___
Scribus Mailing List: scribus at lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20130823/84fa74d9/attachment-0001.html>
More information about the scribus
mailing list