diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-16 14:22:36 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-29 10:10:27 +0000 |
commit | e579076bb36e6594003b2ade7f3d062944ef6f47 (patch) | |
tree | 1c00c8a02c638582d342504f3bebd45dbcd46be1 /src/quick/scenegraph/util/qsgflatcolormaterial.cpp | |
parent | 4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (diff) |
Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.
Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/util/qsgflatcolormaterial.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgflatcolormaterial.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp index 2ce27275cd..8ab7669891 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -39,7 +39,7 @@ #include "qsgflatcolormaterial.h" #include <private/qsgmaterialshader_p.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) # include <qopenglshaderprogram.h> #endif @@ -57,7 +57,7 @@ public: private: virtual void initialize(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) int m_matrix_id; int m_color_id; #endif @@ -68,7 +68,7 @@ QSGMaterialType FlatColorMaterialShader::type; FlatColorMaterialShader::FlatColorMaterialShader() : QSGMaterialShader(*new QSGMaterialShaderPrivate) { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.vert")); setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.frag")); #endif @@ -76,7 +76,7 @@ FlatColorMaterialShader::FlatColorMaterialShader() void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) Q_ASSERT(oldEffect == 0 || newEffect->type() == oldEffect->type()); QSGFlatColorMaterial *oldMaterial = static_cast<QSGFlatColorMaterial *>(oldEffect); QSGFlatColorMaterial *newMaterial = static_cast<QSGFlatColorMaterial *>(newEffect); @@ -109,7 +109,7 @@ char const *const *FlatColorMaterialShader::attributeNames() const void FlatColorMaterialShader::initialize() { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) m_matrix_id = program()->uniformLocation("matrix"); m_color_id = program()->uniformLocation("color"); #endif |