Direct2D QPA: Fix build with clang-cl.
Remove overzealous constexpr triggering errors like:
in file included from .\qwindowsdirect2dpaintengine.cpp:44:
./qwindowsdirect2dhelpers.h(58,37) : error: constexpr function never produces a constant expression [-Winvalid-constexpr]
Q_DECL_CONSTEXPR inline D2D1_RECT_F to_d2d_rect_f(const QRectF &qrect)
^
./qwindowsdirect2dhelpers.h(60,12) : note: non-constexpr function 'RectF' cannot be used in a constant expression
return D2D1::RectF(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um\d2d1helper.h(160,5) : note: declared here
RectF(
^
Task-number: QTBUG-50860
Change-Id: I0bb4d17b7a7db69c5cc7e286ef0b8ff104f72b2e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
bb10
parent
6a7f5dab0d
commit
c7ec317822
|
|
@ -44,37 +44,37 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_RECT_U to_d2d_rect_u(const QRect &qrect)
|
||||
inline D2D1_RECT_U to_d2d_rect_u(const QRect &qrect)
|
||||
{
|
||||
return D2D1::RectU(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_RECT_F to_d2d_rect_f(const QRectF &qrect)
|
||||
inline D2D1_RECT_F to_d2d_rect_f(const QRectF &qrect)
|
||||
{
|
||||
return D2D1::RectF(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_SIZE_U to_d2d_size_u(const QSizeF &qsize)
|
||||
inline D2D1_SIZE_U to_d2d_size_u(const QSizeF &qsize)
|
||||
{
|
||||
return D2D1::SizeU(qsize.width(), qsize.height());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_SIZE_U to_d2d_size_u(const QSize &qsize)
|
||||
inline D2D1_SIZE_U to_d2d_size_u(const QSize &qsize)
|
||||
{
|
||||
return D2D1::SizeU(qsize.width(), qsize.height());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_POINT_2F to_d2d_point_2f(const QPointF &qpoint)
|
||||
inline D2D1_POINT_2F to_d2d_point_2f(const QPointF &qpoint)
|
||||
{
|
||||
return D2D1::Point2F(qpoint.x(), qpoint.y());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1::ColorF to_d2d_color_f(const QColor &c)
|
||||
inline D2D1::ColorF to_d2d_color_f(const QColor &c)
|
||||
{
|
||||
return D2D1::ColorF(c.redF(), c.greenF(), c.blueF(), c.alphaF());
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR inline D2D1_MATRIX_3X2_F to_d2d_matrix_3x2_f(const QTransform &transform)
|
||||
inline D2D1_MATRIX_3X2_F to_d2d_matrix_3x2_f(const QTransform &transform)
|
||||
{
|
||||
return D2D1::Matrix3x2F(transform.m11(), transform.m12(),
|
||||
transform.m21(), transform.m22(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue