Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
glslsymbol.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#include "glslsymbol_p.h"
7#include <QStringList>
8
10
11using namespace GLSL;
12
13Symbol::Symbol(Scope *scope)
14 : _scope(scope)
15{
16}
17
18Symbol::~Symbol()
19{
20}
21
22Scope *Symbol::scope() const
23{
24 return _scope;
25}
26
27void Symbol::setScope(Scope *scope)
28{
29 _scope = scope;
30}
31
32QString Symbol::name() const
33{
34 return _name;
35}
36
37void Symbol::setName(const QString &name)
38{
39 _name = name;
40}
41
42Scope::Scope(Scope *enclosingScope)
43 : Symbol(enclosingScope)
44{
45}
46
47Symbol *Scope::lookup(const QString &name) const
48{
49 if (Symbol *s = find(name))
50 return s;
51 if (Scope *s = scope())
52 return s->lookup(name);
53
54 return nullptr;
55}
56
57QList<Symbol *> Scope::members() const
58{
59 return QList<Symbol *>();
60}
61
62QT_END_NAMESPACE
Combined button and popup list for selecting options.