From 054257aac5a0ad29b964fd45b8b9dd9378df033c Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Mon, 7 Jun 2021 18:02:41 +0300 Subject: Bump version --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index c297e52d..315085e5 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,6 +2,6 @@ load(qt_build_config) DEFINES += QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.5 +MODULE_VERSION = 5.15.6 CONFIG += warning_clean CMAKE_MODULE_TESTS=- -- cgit v1.2.3 From 473e19398649a32b36ead33bb086f38b33edfc08 Mon Sep 17 00:00:00 2001 From: Sami Varanka Date: Mon, 7 Jun 2021 12:55:22 +0300 Subject: Fix Q3DScatter memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using static optimization for scattergraph and series mesh type is not point mesh, the scatter3D renderer uses ScatterObjectBufferHelper's fullLoad. In the fullLoad old data buffers are deleted, if m_meshDataLoaded is set to true. However, at the beginning of the fullLoad, the flag was always set to false so old data buffers were never deleted. Moved the setting of the m_meshDataLoaded to false after the deletion of old buffers. Added similar code to scatterpointbufferhelper for consistency. Fixes: QTBUG-80194 Change-Id: I2fd71af86b1fd73621074187f112fd9783df36df Reviewed-by: Tomi Korpipää (cherry picked from commit c0fd354690a6de2923e975bb4586fa5bbf310bb1) Reviewed-by: Qt Cherry-pick Bot --- src/datavisualization/utils/scatterobjectbufferhelper.cpp | 2 +- src/datavisualization/utils/scatterpointbufferhelper.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/datavisualization/utils/scatterobjectbufferhelper.cpp b/src/datavisualization/utils/scatterobjectbufferhelper.cpp index fff9a89e..1bcdd866 100644 --- a/src/datavisualization/utils/scatterobjectbufferhelper.cpp +++ b/src/datavisualization/utils/scatterobjectbufferhelper.cpp @@ -48,7 +48,6 @@ ScatterObjectBufferHelper::~ScatterObjectBufferHelper() void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal dotScale) { - m_meshDataLoaded = false; m_indexCount = 0; ObjectHelper *dotObj = cache->object(); @@ -71,6 +70,7 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal m_uvbuffer = 0; m_normalbuffer = 0; m_elementbuffer = 0; + m_meshDataLoaded = false; } // Index vertices diff --git a/src/datavisualization/utils/scatterpointbufferhelper.cpp b/src/datavisualization/utils/scatterpointbufferhelper.cpp index 7785dd4f..37d62904 100644 --- a/src/datavisualization/utils/scatterpointbufferhelper.cpp +++ b/src/datavisualization/utils/scatterpointbufferhelper.cpp @@ -97,6 +97,7 @@ void ScatterPointBufferHelper::load(ScatterSeriesRenderCache *cache) m_bufferedPoints.clear(); m_pointbuffer = 0; m_uvbuffer = 0; + m_meshDataLoaded = false; } bool itemsVisible = false; -- cgit v1.2.3 From a94f9816a9bae2baea38681096a209bf3839a883 Mon Sep 17 00:00:00 2001 From: Sami Varanka Date: Thu, 10 Jun 2021 12:45:14 +0300 Subject: Fix bargraph labels face wrong direction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the camera's X rotation is 180.0f, the labels were rotated to face wrong direction. The axis title labels do not respect the Abstract3DAxis's titleFixed property. Created a new bugreport QTBUG-94441. Fixes: QTBUG-90371 Change-Id: I80115b8b363a7385dfd2cb1f004a05368549ed48 Reviewed-by: Tomi Korpipää (cherry picked from commit d2543d8bbd27e9dd13698f457845adb0f5a6d428) Reviewed-by: Qt Cherry-pick Bot --- src/datavisualization/engine/bars3drenderer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp index 329f5666..6107e7a1 100644 --- a/src/datavisualization/engine/bars3drenderer.cpp +++ b/src/datavisualization/engine/bars3drenderer.cpp @@ -2051,10 +2051,14 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer glEnable(GL_POLYGON_OFFSET_FILL); + // If camera x rotation is 180, side labels face wrong direction + float activeCameraXRotation = (activeCamera->xRotation() >= 180.0f) ? -180.0f + : activeCamera->xRotation(); + float labelAutoAngle = m_axisCacheY.labelAutoRotation(); float labelAngleFraction = labelAutoAngle / 90.0f; float fractionCamY = activeCamera->yRotation() * labelAngleFraction; - float fractionCamX = activeCamera->xRotation() * labelAngleFraction; + float fractionCamX = activeCameraXRotation * labelAngleFraction; float labelsMaxWidth = 0.0f; int startIndex; @@ -2168,7 +2172,7 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer labelAutoAngle = m_axisCacheZ.labelAutoRotation(); labelAngleFraction = labelAutoAngle / 90.0f; fractionCamY = activeCamera->yRotation() * labelAngleFraction; - fractionCamX = activeCamera->xRotation() * labelAngleFraction; + fractionCamX = activeCameraXRotation * labelAngleFraction; GLfloat labelYAdjustment = 0.005f; GLfloat colPosValue = m_scaleXWithBackground + labelMargin; GLfloat rowPosValue = m_scaleZWithBackground + labelMargin; @@ -2293,7 +2297,7 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer labelAutoAngle = m_axisCacheX.labelAutoRotation(); labelAngleFraction = labelAutoAngle / 90.0f; fractionCamY = activeCamera->yRotation() * labelAngleFraction; - fractionCamX = activeCamera->xRotation() * labelAngleFraction; + fractionCamX = activeCameraXRotation * labelAngleFraction; alignment = (m_xFlipped != m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight; if (labelAutoAngle == 0.0f) { labelRotation = QVector3D(-90.0f, 90.0f, 0.0f); -- cgit v1.2.3