forked from qt-creator/qt-creator
Fix build on macOS
Change-Id: I605fdbb4e3b866050f5a31fe141beaee1be5536e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -31,6 +31,8 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPainterPath>
|
#include <QPainterPath>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace DesignTools {
|
namespace DesignTools {
|
||||||
|
|
||||||
CurveItem::CurveItem(QGraphicsItem *parent)
|
CurveItem::CurveItem(QGraphicsItem *parent)
|
||||||
@@ -98,7 +100,7 @@ bool CurveItem::contains(const QPointF &point) const
|
|||||||
bool valid = false;
|
bool valid = false;
|
||||||
QPointF transformed(m_transform.inverted(&valid).map(point));
|
QPointF transformed(m_transform.inverted(&valid).map(point));
|
||||||
|
|
||||||
double width = abs(20.0 / scaleY(m_transform));
|
double width = std::abs(20.0 / scaleY(m_transform));
|
||||||
|
|
||||||
if (valid)
|
if (valid)
|
||||||
return curve().intersects(transformed, width);
|
return curve().intersects(transformed, width);
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace DesignTools {
|
namespace DesignTools {
|
||||||
|
|
||||||
Selector::Selector() {}
|
Selector::Selector() {}
|
||||||
|
Reference in New Issue
Block a user