From d44e75271cfccde26761ad9ed8accdd872f478d1 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Tue, 28 Jun 2016 14:12:30 +0200 Subject: Cleanup some unused functions and variables with QT_NO_OPENGL Without theses additional #ifdefs building with clang fails. Change-Id: Ib6993b6d14bf73b606e1bcb991f7436a9c4c9638 Reviewed-by: Laszlo Agocs --- src/quick/scenegraph/util/qsgflatcolormaterial.cpp | 3 ++- src/quick/scenegraph/util/qsgtexture.cpp | 4 ++++ src/quick/scenegraph/util/qsgtexturematerial.cpp | 2 ++ src/quick/scenegraph/util/qsgvertexcolormaterial.cpp | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/quick/scenegraph/util') diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp index 5d7817163e..2ce27275cd 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -57,9 +57,10 @@ public: private: virtual void initialize(); - +#ifndef QT_NO_OPENGL int m_matrix_id; int m_color_id; +#endif }; QSGMaterialType FlatColorMaterialShader::type; diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 19403deb73..4cf339aeb8 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -70,7 +70,9 @@ #include #endif +#ifndef QT_NO_OPENGL static QElapsedTimer qsg_renderer_timer; +#endif #ifndef QT_NO_DEBUG static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK"); @@ -84,11 +86,13 @@ static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK" QT_BEGIN_NAMESPACE +#ifndef QT_NO_OPENGL inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif QSGTexturePrivate::QSGTexturePrivate() : wrapChanged(false) diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 3db8163376..119828bc81 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -46,11 +46,13 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_OPENGL inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif QSGMaterialType QSGOpaqueTextureMaterialShader::type; diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp index dedbc86385..847ec289d8 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp @@ -55,9 +55,10 @@ public: private: virtual void initialize(); - +#ifndef QT_NO_OPENGL int m_matrix_id; int m_opacity_id; +#endif }; QSGMaterialType QSGVertexColorMaterialShader::type; -- cgit v1.2.3