From 169fef68a3cb42bc96fee3efd2d7fafee9b2dee6 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 21:03:45 -0400 Subject: [PATCH] glshadercolormap: Fix deprecated QOpenGLTexture::setData() call Use the const void* overload on Qt 5.3 and later to eliminate the compiler deprecation warning, while retaining compatibility with older Qt 5 versions. Signed-off-by: Robin Getz --- sdrgui/gui/glshadercolormap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdrgui/gui/glshadercolormap.cpp b/sdrgui/gui/glshadercolormap.cpp index 4ded61cdc..e0c7dd6cb 100644 --- a/sdrgui/gui/glshadercolormap.cpp +++ b/sdrgui/gui/glshadercolormap.cpp @@ -126,7 +126,11 @@ void GLShaderColorMap::initColorMapTextureImmutable(const QString &colorMapName) GLfloat *colorMap = (GLfloat *)ColorMap::getColorMap(colorMapName); if (colorMap) { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, static_cast(colorMap)); +#else m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, colorMap); +#endif } else { qDebug() << "GLShaderColorMap::initColorMapTextureImmutable: colorMap " << colorMapName << " not supported"; }