From da3c5925d546282e99f13b450a674c7024fde9ed Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 9 Apr 2018 23:25:51 +0200 Subject: Use Qt::Alignment instead of the AlignmentFlag enum to represent flags Because from Qt 5.12, the the right operator| is found in the Qt namespace instead of in the global namespace. One must still add the 'using' statement so this patch can be integrated using a previous qtbase. But the statement can be removed once qtbase is updated. Task-number: QTBUG-67582 Change-Id: Ib79c4623e858988bb55a87ad4fb0c1e0ceee81cf Reviewed-by: Liang Qi --- src/datavisualization/engine/surface3drenderer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/datavisualization/engine/surface3drenderer.cpp') diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp index cad9b97c..b6125719 100644 --- a/src/datavisualization/engine/surface3drenderer.cpp +++ b/src/datavisualization/engine/surface3drenderer.cpp @@ -1076,7 +1076,7 @@ void Surface3DRenderer::drawSlicedScene() positionComp, totalRotation, 0, QAbstract3DGraph::SelectionRow, m_labelShader, m_labelObj, activeCamera, false, false, Drawer::LabelBelow, - Qt::AlignmentFlag(Qt::AlignLeft | Qt::AlignTop), true); + Qt::AlignLeft | Qt::AlignTop, true); } labelNbr++; } @@ -1972,7 +1972,7 @@ void Surface3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa if (m_radialLabelOffset < 1.0f) labelYTrans += gridLineOffset + gridLineWidth; } - Qt::AlignmentFlag alignment = (m_xFlipped == m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight; + Qt::Alignment alignment = (m_xFlipped == m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight; QVector3D labelRotation; if (m_xFlipped) labelXTrans = -labelXTrans; @@ -2128,7 +2128,7 @@ void Surface3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa else labelZTrans = m_scaleZWithBackground + labelMargin; - Qt::AlignmentFlag alignment = (m_xFlipped != m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight; + Qt::Alignment alignment = (m_xFlipped != m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight; QVector3D labelRotation; if (m_zFlipped) labelZTrans = -labelZTrans; @@ -2256,7 +2256,7 @@ void Surface3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa hAlignment = m_zFlipped ? Qt::AlignLeft : Qt::AlignRight; if (m_yFlippedForGrid && vAlignment != Qt::AlignCenter) vAlignment = (vAlignment == Qt::AlignTop) ? Qt::AlignBottom : Qt::AlignTop; - alignment = Qt::AlignmentFlag(vAlignment | hAlignment); + alignment = vAlignment | hAlignment; } else { labelTrans.setX(m_axisCacheX.labelPosition(label)); } -- cgit v1.2.3