aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsannotation.cpp
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-04-15 14:42:26 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-04-16 14:29:55 +0200
commitd226e24a5d4288a3e7f263c526cb6cbf72255388 (patch)
treef763e4461eaed0e30d71c54c3bbbf69de3a325b5 /src/qmlcompiler/qqmljsannotation.cpp
parentd506b6360c9e63435f3b4e77c3317186f323e8ae (diff)
qqmljsannotation: Use std::variant instead of QVariant
Makes it easier to reason about the values stored in QQmlJSAnnotation. Change-Id: I13bf8294a25f00edf78fad3b2b91fbc7a313d49e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsannotation.cpp')
-rw-r--r--src/qmlcompiler/qqmljsannotation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsannotation.cpp b/src/qmlcompiler/qqmljsannotation.cpp
index 3d16cca5c2..aec5111055 100644
--- a/src/qmlcompiler/qqmljsannotation.cpp
+++ b/src/qmlcompiler/qqmljsannotation.cpp
@@ -37,8 +37,8 @@ QQQmlJSDeprecation QQmlJSAnnotation::deprecation() const {
auto reason = bindings[QStringLiteral("reason")];
- if (reason.typeId() == QMetaType::QString) {
- deprecation.reason = reason.toString();
+ if (std::holds_alternative<QString>(reason)) {
+ deprecation.reason = std::get<QString>(reason);
}
}