Bug#638813: qtcreator: FTBFS: error: no matching function for call to 'qMin(double&, qreal)'
On Monday 22 August 2011 16:30:59 Adam Majer wrote:
> On Mon, Aug 22, 2011 at 02:03:19PM +0900, Nobuhiro Iwamatsu wrote:
> > ---
> > a/src/plugins/qmldesigner/components/formeditor/snapper.cpp 2011-07-07
> > 11:14:10.000000000 +0900 +++
> > b/src/plugins/qmldesigner/components/formeditor/snapper.cpp 2011-07-07
> > 11:14:50.000000000 +0900 @@ -495,10 +495,10 @@
> >
> > double minimumY = std::numeric_limits<double>::max();
> > double maximumY = std::numeric_limits<double>::min();
> > foreach(const QLineF &line, lineList) {
> >
> > - minimumY = qMin(minimumY, line.y1());
> > - minimumY = qMin(minimumY, line.y2());
> > - maximumY = qMax(maximumY, line.y1());
> > - maximumY = qMax(maximumY, line.y2());
> > + minimumY = qMin(minimumY, static_cast<qreal>(line.y1()));
> > + minimumY = qMin(minimumY, static_cast<qreal>(line.y2()));
> > + maximumY = qMax(maximumY, static_cast<qreal>(line.y1()));
> > + maximumY = qMax(maximumY, static_cast<qreal>(line.y2()));
> >
> > }
> >
> > double x(lineList.first().x1());
>
> I'm assuming that the patch was to do static_cast<double>(line.y1())
> instead of qreal. As is, it should nothing. The definition of QLineF
> is,
>
> qreal QLineF::y1() const;
event better would be to have
qreal minimumY = std::numeric_limits<qreal>::max();
qreal maximumY = std::numeric_limits<qreal>::min();
/Sune
Reply to: