Tracing/QmlProfiler: Fix deprecation warning with Qt 6.3+

From Qt 6.3 on, QSGMaterial::CustomCompileStep is deprecated and
QSGMaterial::NoBatching should be used, instead.

Change-Id: I27b2fd2e8b86de85ec88ab81b90e056005a4986d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Alessandro Portale
2022-06-02 12:46:20 +02:00
parent f26da75f41
commit 79d08bd5dd
3 changed files with 12 additions and 6 deletions

View File

@@ -383,9 +383,11 @@ void BindingLoopMaterialShader::initialize()
BindingLoopMaterial::BindingLoopMaterial()
{
setFlag(QSGMaterial::Blending, false);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
setFlag(QSGMaterial::NoBatching, true);
#elif QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
setFlag(QSGMaterial::CustomCompileStep, true);
#endif // >= Qt 6
#endif // >= Qt 6.3/6.0
}
QSGMaterialType *BindingLoopMaterial::type() const