From 0b0ff6e8cdb5d59983ae44a1d475eee11dd531c4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jun 2018 08:57:14 +0200 Subject: Fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qml/qqmlmetatype.cpp:1876:58: warning: ‘QString::QString(const char*)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Element names that are const char * in the API are expected to be UTF-8 encoded. Change-Id: I12aab141e4a4d03ca3a025e8575c80dfea5242fe Reviewed-by: Richard Weickelt Reviewed-by: Lars Knoll --- src/qml/qml/qqmlmetatype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlmetatype.cpp') diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index dd027818cd..69a8ff034a 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1873,7 +1873,7 @@ int qmlTypeId(const char *uri, int versionMajor, int versionMinor, const char *q if (!module) return -1; - QQmlType type = module->type(QHashedStringRef(qmlName), versionMinor); + QQmlType type = module->type(QHashedStringRef(QString::fromUtf8(qmlName)), versionMinor); if (!type.isValid()) return -1; -- cgit v1.2.3