designer/qquickdesignersupportmetainfo.cpp: In static member function 'static bool QQuickDesignerSupportMetaInfo::isSubclassOf(QObject*, const QByteArray&)':
designer/qquickdesignersupportmetainfo.cpp:50:51: warning: 'bool QString::operator==(const QByteArray&) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1229) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'void stopAnimation(QObject*)':
designer/qquickdesignersupportitems.cpp:62:35: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp:63:33: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'void allSubObjects(QObject*, QObjectList&)':
designer/qquickdesignersupportitems.cpp:93:62: warning: 'bool operator!=(const char*, QLatin1String)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1192) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'QQmlType* getQmlType(const QString&, int, int)':
designer/qquickdesignersupportitems.cpp:166:78: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In static member function 'static QObject* QQuickDesignerSupportItems::createPrimitive(const QString&, int, int, QQmlContext*)':
designer/qquickdesignersupportitems.cpp:223:41: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In static member function 'static void QQuickDesignerSupportItems::disableTransition(QObject*)':
designer/qquickdesignersupportitems.cpp:295:42: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp:296:44: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportproperties.cpp: In static member function 'static QQuickDesignerSupport::PropertyNameList QQuickDesignerSupportProperties::propertyNameListForWritableProperties(QObject*, const PropertyName&, QObjectList*)':
designer/qquickdesignersupportproperties.cpp:145:47: warning: 'bool QString::operator!=(const char*) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1166) [-Wdeprecated-declarations]
designer/qquickdesignersupportstates.cpp: In static member function 'static bool QQuickDesignerSupportStates::isStateActive(QObject*, QQmlContext*)':
designer/qquickdesignersupportstates.cpp:50:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportstates.cpp: In static member function 'static void QQuickDesignerSupportStates::activateState(QObject*, QQmlContext*)':
designer/qquickdesignersupportstates.cpp:64:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::populateResetHashes()':
designer/qquickdesignercustomobjectdata.cpp:146:93: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext*, const PropertyName&)':
designer/qquickdesignercustomobjectdata.cpp:170:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'bool QQuickDesignerCustomObjectData::hasBindingForProperty(QQmlContext*, const PropertyName&, bool*) const':
designer/qquickdesignercustomobjectdata.cpp:227:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::setPropertyBinding(QQmlContext*, const PropertyName&, const QString&)':
designer/qquickdesignercustomobjectdata.cpp:244:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp:259:55: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeValue(QObject*, const PropertyName&, const QVariant&)':
designer/qquickdesignersupportpropertychanges.cpp:91:52: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeExpression(QObject*, const PropertyName&, const QString&)':
designer/qquickdesignersupportpropertychanges.cpp:103:62: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
Change-Id: Icdaec28b5bea23244303b082217660c38aefa40f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
QQuickDesignerSupportProperties::propertyNameListForWritableProperties(object());
Q_FOREACH (const QQuickDesignerSupport::PropertyName &propertyName, propertyNameList) {
- QQmlProperty property(object(), propertyName, QQmlEngine::contextForObject(object()));
+ QQmlProperty property(object(), QString::fromUtf8(propertyName), QQmlEngine::contextForObject(object()));
QQmlAbstractBinding::Ptr binding = QQmlAbstractBinding::Ptr(QQmlPropertyPrivate::binding(property));
void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName)
{
- QQmlProperty property(object(), propertyName, context);
+ QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
if (!property.isValid())
return;
if (QQuickDesignerSupportProperties::isPropertyBlackListed(propertyName))
return false;
- QQmlProperty property(object(), propertyName, context);
+ QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
bool hasBinding = QQmlPropertyPrivate::binding(property);
const QQuickDesignerSupport::PropertyName &propertyName,
const QString &expression)
{
- QQmlProperty property(object(), propertyName, context);
+ QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
if (!property.isValid())
return;
binding->update();
if (binding->hasError()) {
if (property.property().userType() == QVariant::String)
- property.write(QVariant(QString("#%1#").arg(expression)));
+ property.write(QVariant(QLatin1Char('#') + expression + QLatin1Char('#')));
}
} else {
QQuickAbstractAnimation *animation = qobject_cast<QQuickAbstractAnimation*>(object);
QQmlTimer *timer = qobject_cast<QQmlTimer*>(object);
if (transition) {
- transition->setFromState("");
- transition->setToState("");
+ transition->setFromState(QString());
+ transition->setToState(QString());
} else if (animation) {
// QQuickScriptAction *scriptAimation = qobject_cast<QQuickScriptAction*>(animation);
// if (scriptAimation) FIXME
if (metaProperty.isReadable()
&& metaProperty.isWritable()
&& QQmlMetaType::isQObject(metaProperty.userType())) {
- if (metaProperty.name() != QLatin1String("parent")) {
+ if (qstrcmp(metaProperty.name(), "parent")) {
QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(object));
allSubObjects(propertyObject, objectList);
}
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)
if (!object) {
qWarning() << "QuickDesigner: Cannot create an object of type"
- << QString("%1 %2,%3").arg(typeName).arg(majorNumber).arg(minorNumber)
+ << QString::fromLatin1("%1 %2,%3").arg(typeName).arg(majorNumber).arg(minorNumber)
<< "- type isn't known to declarative meta type system";
}
{
QQuickTransition *transition = qobject_cast<QQuickTransition*>(object);
Q_ASSERT(transition);
- transition->setToState("invalidState");
- transition->setFromState("invalidState");
+ const QString invalidState = QLatin1String("invalidState");
+ transition->setToState(invalidState);
+ transition->setFromState(invalidState);
}
void QQuickDesignerSupportItems::disableBehaivour(QObject *object)
while (metaObject) {
QQmlType *qmlType = QQmlMetaType::qmlType(metaObject);
- if (qmlType && qmlType->qmlTypeName() == superTypeName) // ignore version numbers
+ if (qmlType && qmlType->qmlTypeName() == QLatin1String(superTypeName)) // ignore version numbers
return true;
if (metaObject->className() == superTypeName)
QMetaProperty metaProperty = metaObject->property(index);
QQmlProperty declarativeProperty(object, QLatin1String(metaProperty.name()));
if (declarativeProperty.isValid() && !declarativeProperty.isWritable() && declarativeProperty.propertyTypeCategory() == QQmlProperty::Object) {
- if (declarativeProperty.name() != "parent") {
+ if (declarativeProperty.name() != QLatin1String("parent")) {
QObject *childObject = QQmlMetaType::toQObject(declarativeProperty.read());
if (childObject)
propertyNameList.append(propertyNameListForWritableProperties(childObject,
if (!propertyChange)
return;
- propertyChange->changeValue(propertyName, value);
+ propertyChange->changeValue(QString::fromUtf8(propertyName), value);
}
void QQuickDesignerSupportPropertyChanges::changeExpression(QObject *propertyChanges,
if (!propertyChange)
return;
- propertyChange->changeExpression(propertyName, expression);
+ propertyChange->changeExpression(QString::fromUtf8(propertyName), expression);
}
QObject *QQuickDesignerSupportPropertyChanges::stateObject(QObject *propertyChanges)
QQuickStateGroup *stateGroup = stateObject->stateGroup();
- QQmlProperty property(object, "name", context);
+ QQmlProperty property(object, QLatin1String("name"), context);
return stateObject && stateGroup && stateGroup->state() == property.read();
}
QQuickStateGroup *stateGroup = stateObject->stateGroup();
- QQmlProperty property(object, "name", context);
+ QQmlProperty property(object, QLatin1String("name"), context);
stateGroup->setState(property.read().toString());
}