diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-10 15:48:50 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-13 09:55:25 +0200 |
commit | 540134d66dd0a235ace91ddc28940d2d88c24ac3 (patch) | |
tree | fa5499e63a0a84f3c5dda91e463eb8db47d88ea0 /src/qml/compiler/qqmlpropertyvalidator.cpp | |
parent | e9852df2d7c1064c95ff4c4463587ad713e68334 (diff) |
Move valueAsNumber into ExecutableCompilationUnit
This reduces our dependence on QV4::Value in the devtools.
Change-Id: I4b3f937bc08c16f7e2543fdc5cc34c0cfb121f8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlpropertyvalidator.cpp')
-rw-r--r-- | src/qml/compiler/qqmlpropertyvalidator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp index 5b0bd8858a..71d5318652 100644 --- a/src/qml/compiler/qqmlpropertyvalidator.cpp +++ b/src/qml/compiler/qqmlpropertyvalidator.cpp @@ -397,7 +397,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache break; case QVariant::UInt: { if (binding->type == QV4::CompiledData::Binding::Type_Number) { - double d = binding->valueAsNumber(compilationUnit->constants); + double d = compilationUnit->bindingValueAsNumber(binding); if (double(uint(d)) == d) return noError; } @@ -406,7 +406,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache break; case QVariant::Int: { if (binding->type == QV4::CompiledData::Binding::Type_Number) { - double d = binding->valueAsNumber(compilationUnit->constants); + double d = compilationUnit->bindingValueAsNumber(binding); if (double(int(d)) == d) return noError; } @@ -571,7 +571,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache } else if (property->propType() == qMetaTypeId<QList<int> >()) { bool ok = (binding->type == QV4::CompiledData::Binding::Type_Number); if (ok) { - double n = binding->valueAsNumber(compilationUnit->constants); + double n = compilationUnit->bindingValueAsNumber(binding); if (double(int(n)) != n) ok = false; } |