summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-27 19:16:17 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:19:36 +0200
commit0161f00e5043090f22b23de9822c09062b17d675 (patch)
treee2a6d59028ada109a79c60d32186f9661eb5c67f /src/gui/text
parent700e6341e51f5e6f45303fab3d0a84a3eb249eba (diff)
Use QMetaType in QMetaCallEvent
And don't use int based type mapping anymore. Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qcssparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index b57f933c37..86d3f77fee 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1139,14 +1139,14 @@ static bool setFontSizeFromValue(QCss::Value value, QFont *font, int *fontSizeAd
if (s.endsWith(QLatin1String("pt"), Qt::CaseInsensitive)) {
s.chop(2);
value.variant = s;
- if (value.variant.convert((QVariant::Type)qMetaTypeId<qreal>())) {
+ if (value.variant.convert(QMetaType::fromType<qreal>())) {
font->setPointSizeF(value.variant.toReal());
valid = true;
}
} else if (s.endsWith(QLatin1String("px"), Qt::CaseInsensitive)) {
s.chop(2);
value.variant = s;
- if (value.variant.convert(QMetaType::Int)) {
+ if (value.variant.convert(QMetaType::fromType<int>())) {
font->setPixelSize(value.variant.toInt());
valid = true;
}