diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-31 17:49:42 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-01 16:32:51 +0100 |
commit | f3bcbfd6a50fb7e74f4ff6714d3b3066fa74e253 (patch) | |
tree | 675580377465f8988e3903aad22f248bd784de46 /src/qml/common | |
parent | 04c1588965b9a4b12ebf04b23e5336fe88bb4f56 (diff) |
QtQml: Re-allow assigning of raw numbers to enum property aliases
This used to work and we cannot just take it away.
Amends commit 3ea55bf398412d373daab9c92b1498f45de70e96.
Pick-to: 6.7 6.6 6.5 6.2
Fixes: QTBUG-121710
Change-Id: I7f856140286bba9d49b7ed1abfdf398a65fb1962
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/common')
-rw-r--r-- | src/qml/common/qv4compileddata_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h index 55e73bba7d..f58a176009 100644 --- a/src/qml/common/qv4compileddata_p.h +++ b/src/qml/common/qv4compileddata_p.h @@ -707,6 +707,8 @@ struct Binding } bool evaluatesToString() const { return type() == Type_String || isTranslationBinding(); } + bool isNumberBinding() const { return type() == Type_Number; } + bool valueAsBoolean() const { if (type() == Type_Boolean) |