diff options
Diffstat (limited to 'src/quick/designer')
8 files changed, 36 insertions, 36 deletions
diff --git a/src/quick/designer/qqmldesignermetaobject.cpp b/src/quick/designer/qqmldesignermetaobject.cpp index 63364192c6..09493c30d6 100644 --- a/src/quick/designer/qqmldesignermetaobject.cpp +++ b/src/quick/designer/qqmldesignermetaobject.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE static QHash<QDynamicMetaObjectData *, bool> nodeInstanceMetaObjectList; -static void (*notifyPropertyChangeCallBack)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName) = 0; +static void (*notifyPropertyChangeCallBack)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName) = nullptr; struct MetaPropertyData { inline QPair<QVariant, bool> &getDataRef(int idx) { @@ -174,7 +174,7 @@ void QQmlDesignerMetaObject::setValue(int id, const QVariant &value) QPair<QVariant, bool> &prop = m_data->getDataRef(id); prop.first = propertyWriteValue(id, value); prop.second = true; - QMetaObject::activate(myObject(), id + m_type->signalOffset(), 0); + QMetaObject::activate(myObject(), id + m_type->signalOffset(), nullptr); } QVariant QQmlDesignerMetaObject::propertyWriteValue(int, const QVariant &value) @@ -187,7 +187,7 @@ const QAbstractDynamicMetaObject *QQmlDesignerMetaObject::dynamicMetaObjectParen if (QQmlVMEMetaObject::parent.isT1()) return QQmlVMEMetaObject::parent.asT1()->toDynamicMetaObject(QQmlVMEMetaObject::object); else - return 0; + return nullptr; } const QMetaObject *QQmlDesignerMetaObject::metaObjectParent() const @@ -218,7 +218,7 @@ int QQmlDesignerMetaObject::openMetaCall(QObject *o, QMetaObject::Call call, int prop.first = propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0])); prop.second = true; //propertyWritten(propId); - activate(myObject(), m_type->signalOffset() + propId, 0); + activate(myObject(), m_type->signalOffset() + propId, nullptr); } } return -1; diff --git a/src/quick/designer/qquickdesignercustomobjectdata.cpp b/src/quick/designer/qquickdesignercustomobjectdata.cpp index ca9c1259fd..59e086b5a3 100644 --- a/src/quick/designer/qquickdesignercustomobjectdata.cpp +++ b/src/quick/designer/qquickdesignercustomobjectdata.cpp @@ -180,7 +180,7 @@ void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext *context, const QQmlAbstractBinding *binding = QQmlPropertyPrivate::binding(property); if (binding && !(hasValidResetBinding(propertyName) && getResetBinding(propertyName) == binding)) { - binding->setEnabled(false, 0); + binding->setEnabled(false, nullptr); } diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp index 88971e3172..1851c25a77 100644 --- a/src/quick/designer/qquickdesignersupport.cpp +++ b/src/quick/designer/qquickdesignersupport.cpp @@ -78,7 +78,7 @@ QQuickDesignerSupport::~QQuickDesignerSupport() void QQuickDesignerSupport::refFromEffectItem(QQuickItem *referencedItem, bool hide) { - if (referencedItem == 0) + if (referencedItem == nullptr) return; QQuickItemPrivate::get(referencedItem)->refFromEffectItem(hide); @@ -114,7 +114,7 @@ void QQuickDesignerSupport::refFromEffectItem(QQuickItem *referencedItem, bool h void QQuickDesignerSupport::derefFromEffectItem(QQuickItem *referencedItem, bool unhide) { - if (referencedItem == 0) + if (referencedItem == nullptr) return; delete m_itemTextureHash.take(referencedItem); @@ -123,7 +123,7 @@ void QQuickDesignerSupport::derefFromEffectItem(QQuickItem *referencedItem, bool QImage QQuickDesignerSupport::renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize) { - if (referencedItem == 0 || referencedItem->parentItem() == 0) { + if (referencedItem == nullptr || referencedItem->parentItem() == nullptr) { qDebug() << __FILE__ << __LINE__ << "Warning: Item can be rendered."; return QImage(); } @@ -131,7 +131,7 @@ QImage QQuickDesignerSupport::renderImageForItem(QQuickItem *referencedItem, con QSGLayer *renderTexture = m_itemTextureHash.value(referencedItem); Q_ASSERT(renderTexture); - if (renderTexture == 0) + if (renderTexture == nullptr) return QImage(); renderTexture->setRect(boundingRect); renderTexture->setSize(imageSize); @@ -150,7 +150,7 @@ QImage QQuickDesignerSupport::renderImageForItem(QQuickItem *referencedItem, con bool QQuickDesignerSupport::isDirty(QQuickItem *referencedItem, DirtyType dirtyType) { - if (referencedItem == 0) + if (referencedItem == nullptr) return false; return QQuickItemPrivate::get(referencedItem)->dirtyAttributes & dirtyType; @@ -158,7 +158,7 @@ bool QQuickDesignerSupport::isDirty(QQuickItem *referencedItem, DirtyType dirtyT void QQuickDesignerSupport::addDirty(QQuickItem *referencedItem, QQuickDesignerSupport::DirtyType dirtyType) { - if (referencedItem == 0) + if (referencedItem == nullptr) return; QQuickItemPrivate::get(referencedItem)->dirtyAttributes |= dirtyType; @@ -166,7 +166,7 @@ void QQuickDesignerSupport::addDirty(QQuickItem *referencedItem, QQuickDesignerS void QQuickDesignerSupport::resetDirty(QQuickItem *referencedItem) { - if (referencedItem == 0) + if (referencedItem == nullptr) return; QQuickItemPrivate::get(referencedItem)->dirtyAttributes = 0x0; @@ -175,7 +175,7 @@ void QQuickDesignerSupport::resetDirty(QQuickItem *referencedItem) QTransform QQuickDesignerSupport::windowTransform(QQuickItem *referencedItem) { - if (referencedItem == 0) + if (referencedItem == nullptr) return QTransform(); return QQuickItemPrivate::get(referencedItem)->itemToWindowTransform(); @@ -183,7 +183,7 @@ QTransform QQuickDesignerSupport::windowTransform(QQuickItem *referencedItem) QTransform QQuickDesignerSupport::parentTransform(QQuickItem *referencedItem) { - if (referencedItem == 0) + if (referencedItem == nullptr) return QTransform(); QTransform parentTransform; @@ -294,31 +294,31 @@ bool QQuickDesignerSupport::hasAnchor(QQuickItem *item, const QString &name) return false; if (name == QLatin1String("anchors.fill")) - return anchors(item)->fill() != 0; + return anchors(item)->fill() != nullptr; if (name == QLatin1String("anchors.centerIn")) - return anchors(item)->centerIn() != 0; + return anchors(item)->centerIn() != nullptr; if (name == QLatin1String("anchors.right")) - return anchors(item)->right().item != 0; + return anchors(item)->right().item != nullptr; if (name == QLatin1String("anchors.top")) - return anchors(item)->top().item != 0; + return anchors(item)->top().item != nullptr; if (name == QLatin1String("anchors.left")) - return anchors(item)->left().item != 0; + return anchors(item)->left().item != nullptr; if (name == QLatin1String("anchors.bottom")) - return anchors(item)->bottom().item != 0; + return anchors(item)->bottom().item != nullptr; if (name == QLatin1String("anchors.horizontalCenter")) - return anchors(item)->horizontalCenter().item != 0; + return anchors(item)->horizontalCenter().item != nullptr; if (name == QLatin1String("anchors.verticalCenter")) - return anchors(item)->verticalCenter().item != 0; + return anchors(item)->verticalCenter().item != nullptr; if (name == QLatin1String("anchors.baseline")) - return anchors(item)->baseline().item != 0; + return anchors(item)->baseline().item != nullptr; return anchors(item)->usedAnchors().testFlag(anchorLineFlagForName(name)); } @@ -337,7 +337,7 @@ QQuickItem *QQuickDesignerSupport::anchorCenterInTargetItem(QQuickItem *item) QPair<QString, QObject*> QQuickDesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context) { - QObject *targetObject = 0; + QObject *targetObject = nullptr; QString targetName; if (name == QLatin1String("anchors.fill")) { diff --git a/src/quick/designer/qquickdesignersupportitems.cpp b/src/quick/designer/qquickdesignersupportitems.cpp index 38ba46e702..9fadbb2122 100644 --- a/src/quick/designer/qquickdesignersupportitems.cpp +++ b/src/quick/designer/qquickdesignersupportitems.cpp @@ -55,11 +55,11 @@ QT_BEGIN_NAMESPACE -static void (*fixResourcePathsForObjectCallBack)(QObject*) = 0; +static void (*fixResourcePathsForObjectCallBack)(QObject*) = nullptr; static void stopAnimation(QObject *object) { - if (object == 0) + if (object == nullptr) return; QQuickTransition *transition = qobject_cast<QQuickTransition*>(object); @@ -203,7 +203,7 @@ QObject *QQuickDesignerSupportItems::createPrimitive(const QString &typeName, in Q_UNUSED(disableComponentComplete) - QObject *object = 0; + QObject *object = nullptr; QQmlType type = QQmlMetaType::qmlType(typeName, majorNumber, minorNumber); if (isCrashingType(type)) { @@ -214,7 +214,7 @@ QObject *QQuickDesignerSupportItems::createPrimitive(const QString &typeName, in } else { if (type.typeName() == "QQmlComponent") { - object = new QQmlComponent(context->engine(), 0); + object = new QQmlComponent(context->engine(), nullptr); } else { object = type.create(); } @@ -235,7 +235,7 @@ QObject *QQuickDesignerSupportItems::createPrimitive(const QString &typeName, in tweakObjects(object); - if (object && QQmlEngine::contextForObject(object) == 0) + if (object && QQmlEngine::contextForObject(object) == nullptr) QQmlEngine::setContextForObject(object, context); QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); diff --git a/src/quick/designer/qquickdesignersupportmetainfo.cpp b/src/quick/designer/qquickdesignersupportmetainfo.cpp index b398bae55d..9c8a642837 100644 --- a/src/quick/designer/qquickdesignersupportmetainfo.cpp +++ b/src/quick/designer/qquickdesignersupportmetainfo.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE bool QQuickDesignerSupportMetaInfo::isSubclassOf(QObject *object, const QByteArray &superTypeName) { - if (object == 0) + if (object == nullptr) return false; const QMetaObject *metaObject = object->metaObject(); diff --git a/src/quick/designer/qquickdesignersupportproperties.cpp b/src/quick/designer/qquickdesignersupportproperties.cpp index a4d1fd0dc1..674f811f8f 100644 --- a/src/quick/designer/qquickdesignersupportproperties.cpp +++ b/src/quick/designer/qquickdesignersupportproperties.cpp @@ -134,7 +134,7 @@ QQuickDesignerSupport::PropertyNameList QQuickDesignerSupportProperties::propert QObjectList localObjectList; - if (inspectedObjects == 0) + if (inspectedObjects == nullptr) inspectedObjects = &localObjectList; @@ -191,7 +191,7 @@ QQuickDesignerSupport::PropertyNameList QQuickDesignerSupportProperties::allProp QObjectList localObjectList; - if (inspectedObjects == 0) + if (inspectedObjects == nullptr) inspectedObjects = &localObjectList; diff --git a/src/quick/designer/qquickdesignersupportproperties_p.h b/src/quick/designer/qquickdesignersupportproperties_p.h index a2872be060..02e75ea886 100644 --- a/src/quick/designer/qquickdesignersupportproperties_p.h +++ b/src/quick/designer/qquickdesignersupportproperties_p.h @@ -92,10 +92,10 @@ public: static bool isPropertyBlackListed(const QQuickDesignerSupport::PropertyName &propertyName); static QQuickDesignerSupport::PropertyNameList propertyNameListForWritableProperties(QObject *object, const QQuickDesignerSupport::PropertyName &baseName = QQuickDesignerSupport::PropertyName(), - QObjectList *inspectedObjects = 0); + QObjectList *inspectedObjects = nullptr); static QQuickDesignerSupport::PropertyNameList allPropertyNames(QObject *object, const QQuickDesignerSupport::PropertyName &baseName = QQuickDesignerSupport::PropertyName(), - QObjectList *inspectedObjects = 0); + QObjectList *inspectedObjects = nullptr); static bool hasFullImplementedListInterface(const QQmlListReference &list); }; diff --git a/src/quick/designer/qquickdesignersupportpropertychanges.cpp b/src/quick/designer/qquickdesignersupportpropertychanges.cpp index 5cafcfc360..0ee8857325 100644 --- a/src/quick/designer/qquickdesignersupportpropertychanges.cpp +++ b/src/quick/designer/qquickdesignersupportpropertychanges.cpp @@ -59,7 +59,7 @@ QObject *QQuickDesignerSupportPropertyChanges::targetObject(QObject *propertyCha QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); if (!propertyChange) - return 0; + return nullptr; return propertyChange->object(); } @@ -114,7 +114,7 @@ QObject *QQuickDesignerSupportPropertyChanges::stateObject(QObject *propertyChan QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); if (!propertyChange) - return 0; + return nullptr; return propertyChange->state(); } |