Merge remote-tracking branch 'origin/4.0'

This commit is contained in:
Oswald Buddenhagen
2016-03-22 15:23:12 +01:00
208 changed files with 2314 additions and 2244 deletions

View File

@@ -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

View File

@@ -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)