aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsscope_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-04-28 15:03:42 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-04-28 15:59:43 +0200
commitcdbce614b4b48327f3c51c69da0f862ab841d59a (patch)
tree1df8b4c0eaa07ed3fb086931fd516b8cd30df2ba /src/qmlcompiler/qqmljsscope_p.h
parent7dd871c0c59aa32e148f0f3cd822cc20c1a2b564 (diff)
QQmlJSScope: Use QFlags API for setting flags
Change-Id: Iecb0ee6e3754d78690541004046106f809c796b8 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r--src/qmlcompiler/qqmljsscope_p.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index 3ff305ce20..2c6140b636 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -269,13 +269,13 @@ public:
bool isComposite() const { return m_flags & Composite; }
bool isScript() const { return m_flags & Script; }
bool hasCustomParser() const { return m_flags & CustomParser; }
- void setIsSingleton(bool v) { m_flags = v ? (m_flags | Singleton) : (m_flags & ~Singleton); }
- void setIsCreatable(bool v) { m_flags = v ? (m_flags | Creatable) : (m_flags & ~Creatable); }
- void setIsComposite(bool v) { m_flags = v ? (m_flags | Composite) : (m_flags & ~Composite); }
- void setIsScript(bool v) { m_flags = v ? (m_flags | Script) : (m_flags & ~Script); }
+ void setIsSingleton(bool v) { m_flags.setFlag(Singleton, v); }
+ void setIsCreatable(bool v) { m_flags.setFlag(Creatable, v); }
+ void setIsComposite(bool v) { m_flags.setFlag(Composite, v); }
+ void setIsScript(bool v) { m_flags.setFlag(Script, v); }
void setHasCustomParser(bool v)
{
- m_flags = v ? (m_flags | CustomParser) : (m_flags & ~CustomParser);
+ m_flags.setFlag(CustomParser, v);;
}
void setAccessSemantics(AccessSemantics semantics) { m_semantics = semantics; }