On Tue, 20 Aug 2013 17:12:50 +0100 (BST) William Bell <whbell at btinternet.com> wrote:
> 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 we in Fedora use http://pkgs.fedoraproject.org/cgit/scribus.git/tree/scribus-to-double.patch for ARM, resulting rpms are at http://koji.fedoraproject.org/koji/taskinfo?taskID=5830461 Dan > [ 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/ea7587d4/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
