diff options
author | Tim Jenssen <tim.jenssen@theqtcompany.com> | 2016-03-22 14:07:59 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@theqtcompany.com> | 2016-03-22 13:15:36 +0000 |
commit | 3cf5f29719359bede0b910e037d4ed72c12f8cd5 (patch) | |
tree | 450d08af602e3ae55eb980ca80517f43cc0651d1 /share | |
parent | 202711c77098cae52b879e3c02942b5eaa0777d1 (diff) | |
download | qt-creator-3cf5f29719359bede0b910e037d4ed72c12f8cd5.tar.gz |
QmlPuppet: fix Qt 5.5 builds
Change-Id: I520be5d188e637c222ba3e709f072e2881b20db9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.cpp | 10 | ||||
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.cpp index 47fb109293..2623661c33 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.cpp @@ -121,7 +121,7 @@ void DesignerCustomObjectData::populateResetHashes() PropertyNameList propertyNameList = QmlPrivateGate::propertyNameListForWritableProperties(object()); foreach (const PropertyName &propertyName, propertyNameList) { - QQmlProperty property(object(), propertyName, QQmlEngine::contextForObject(object())); + QQmlProperty property(object(), QString::fromUtf8(propertyName), QQmlEngine::contextForObject(object())); #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) QQmlAbstractBinding::Ptr binding = QQmlAbstractBinding::Ptr(QQmlPropertyPrivate::binding(property)); @@ -154,7 +154,7 @@ QVariant DesignerCustomObjectData::getResetValue(const PropertyName &propertyNam void DesignerCustomObjectData::doResetProperty(QQmlContext *context, const PropertyName &propertyName) { - QQmlProperty property(object(), propertyName, context); + QQmlProperty property(object(), QString::fromUtf8(propertyName), context); if (!property.isValid()) return; @@ -230,7 +230,7 @@ bool DesignerCustomObjectData::hasBindingForProperty(QQmlContext *context, const if (QmlPrivateGate::isPropertyBlackListed(propertyName)) return false; - QQmlProperty property(object(), propertyName, context); + QQmlProperty property(object(), QString::fromUtf8(propertyName), context); bool hasBinding = QQmlPropertyPrivate::binding(property); @@ -245,7 +245,7 @@ bool DesignerCustomObjectData::hasBindingForProperty(QQmlContext *context, const void DesignerCustomObjectData::setPropertyBinding(QQmlContext *context, const PropertyName &propertyName, const QString &expression) { - QQmlProperty property(object(), propertyName, context); + QQmlProperty property(object(), QString::fromUtf8(propertyName), context); if (!property.isValid()) return; @@ -281,7 +281,7 @@ void DesignerCustomObjectData::keepBindingFromGettingDeleted(QQmlContext *contex Q_UNUSED(context) Q_UNUSED(propertyName) #else - QQmlProperty property(object(), propertyName, context); + QQmlProperty property(object(), QString::fromUtf8(propertyName), context); QQmlPropertyPrivate::setBinding(property, 0, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); #endif diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp index 7fe7d70991..2762f111e6 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp @@ -199,7 +199,7 @@ static void allSubObject(QObject *object, QObjectList &objectList) if (metaProperty.isReadable() && metaProperty.isWritable() && QQmlMetaType::isQObject(metaProperty.userType())) { - if (metaProperty.name() != QLatin1String("parent")) { + if (metaProperty.name() != "parent") { QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(object)); allSubObject(propertyObject, objectList); } @@ -242,7 +242,7 @@ static void fixResourcePathsForObject(QObject *object) PropertyNameList propertyNameList = propertyNameListForWritableProperties(object); foreach (const PropertyName &propertyName, propertyNameList) { - QQmlProperty property(object, propertyName, QQmlEngine::contextForObject(object)); + QQmlProperty property(object, QString::fromUtf8(propertyName), QQmlEngine::contextForObject(object)); const QVariant value = property.read(); const QVariant fixedValue = fixResourcePaths(value); @@ -289,7 +289,7 @@ static bool isWindow(QObject *object) { static QQmlType *getQmlType(const QString &typeName, int majorNumber, int minorNumber) { - return QQmlMetaType::qmlType(typeName.toUtf8(), majorNumber, minorNumber); + return QQmlMetaType::qmlType(typeName, majorNumber, minorNumber); } static bool isCrashingType(QQmlType *type) @@ -380,7 +380,7 @@ QVariant fixResourcePaths(const QVariant &value) const QUrl url = value.toUrl(); if (url.scheme() == QLatin1String("qrc")) { const QString path = QLatin1String("qrc:") + url.path(); - QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS"); + QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS")); if (!qrcSearchPath.isEmpty()) { const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';')); foreach (const QString &qrcPath, searchPaths) { @@ -401,7 +401,7 @@ QVariant fixResourcePaths(const QVariant &value) if (value.type() == QVariant::String) { const QString str = value.toString(); if (str.contains(QLatin1String("qrc:"))) { - QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS"); + QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS")); if (!qrcSearchPath.isEmpty()) { const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';')); foreach (const QString &qrcPath, searchPaths) { @@ -695,7 +695,7 @@ void removeProperty(QObject *propertyChanges, const PropertyName &propertyName) if (!propertyChange) return; - propertyChange->removeProperty(propertyName); + propertyChange->removeProperty(QString::fromUtf8(propertyName)); } QVariant getProperty(QObject *propertyChanges, const PropertyName &propertyName) @@ -705,7 +705,7 @@ QVariant getProperty(QObject *propertyChanges, const PropertyName &propertyName) if (!propertyChange) return QVariant(); - return propertyChange->property(propertyName); + return propertyChange->property(QString::fromUtf8(propertyName)); } void changeValue(QObject *propertyChanges, const PropertyName &propertyName, const QVariant &value) @@ -715,7 +715,7 @@ void changeValue(QObject *propertyChanges, const PropertyName &propertyName, con if (!propertyChange) return; - propertyChange->changeValue(propertyName, value); + propertyChange->changeValue(QString::fromUtf8(propertyName), value); } void changeExpression(QObject *propertyChanges, const PropertyName &propertyName, const QString &expression) @@ -725,7 +725,7 @@ void changeExpression(QObject *propertyChanges, const PropertyName &propertyName if (!propertyChange) return; - propertyChange->changeExpression(propertyName, expression); + propertyChange->changeExpression(QString::fromUtf8(propertyName), expression); } QObject *stateObject(QObject *propertyChanges) |