summaryrefslogtreecommitdiff
path: root/src/libs/glsl/glslsemantic.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-12-01 15:44:50 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-12-01 15:44:50 +1000
commite117f04fabde000f4c0aae7cc1a82c58da1ba4c3 (patch)
tree5f359f97cbb0f98892bc6c3265dda0dcb2cbe5de /src/libs/glsl/glslsemantic.cpp
parentecf4baec663e5c2368056a6a79efa7078719026c (diff)
downloadqt-creator-e117f04fabde000f4c0aae7cc1a82c58da1ba4c3.tar.gz
Show different icons for GLSL variable categories
Attributes, uniforms, varyings, and constants are shown with a distinguished icon that is different from regular variables.
Diffstat (limited to 'src/libs/glsl/glslsemantic.cpp')
-rw-r--r--src/libs/glsl/glslsemantic.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libs/glsl/glslsemantic.cpp b/src/libs/glsl/glslsemantic.cpp
index 29760e2eec..ac07911ea5 100644
--- a/src/libs/glsl/glslsemantic.cpp
+++ b/src/libs/glsl/glslsemantic.cpp
@@ -751,7 +751,11 @@ bool Semantic::visit(VariableDeclarationAST *ast)
const Type *ty = type(ast->type);
ExprResult initializer = expression(ast->initializer);
if (ast->name) {
- Variable *var = _engine->newVariable(_scope, *ast->name, ty);
+ QualifiedTypeAST *qtype = ast->type->asQualifiedType();
+ int qualifiers = 0;
+ if (qtype)
+ qualifiers = qtype->qualifiers;
+ Variable *var = _engine->newVariable(_scope, *ast->name, ty, qualifiers);
_scope->add(var);
}
return false;