From 06b09cf4a990bb776509715fbe624aaa79de24ab Mon Sep 17 00:00:00 2001 From: Ulf Hermann <ulf.hermann@qt.io> Date: Thu, 21 Apr 2016 09:54:14 +0200 Subject: [PATCH] QmlPuppet: Don't compare C string literals with == Change-Id: Idaafbc650849744af660e896bf875bdd43e6ae36 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com> --- .../qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp index 2762f111e61..67d6a1287b0 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp @@ -53,6 +53,7 @@ #include <designersupportdelegate.h> +#include <cstring> namespace QmlDesigner { @@ -199,7 +200,7 @@ static void allSubObject(QObject *object, QObjectList &objectList) if (metaProperty.isReadable() && metaProperty.isWritable() && QQmlMetaType::isQObject(metaProperty.userType())) { - if (metaProperty.name() != "parent") { + if (strcmp(metaProperty.name(), "parent") != 0) { QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(object)); allSubObject(propertyObject, objectList); } -- GitLab