diff options
author | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-03-05 12:19:19 +0100 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-03-25 13:35:11 +0100 |
commit | d204ee0b4325a639ea54ffcb8274877720606f31 (patch) | |
tree | 3c570a3d136add4b7476f62e31dd76d29a882f2e /src/plugins/qmldesigner/designercore/model/abstractproperty.cpp | |
parent | dd9b1687026c3fea4938e5e65dc7e1ba3fd5ba6a (diff) | |
download | qt-creator-d204ee0b4325a639ea54ffcb8274877720606f31.tar.gz |
QmlDesigner: Type of the propertyname is now PropertyName
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.
Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
(cherry picked from commit ee4bf638cad9bcf303c8c6ad1f922c33dc021964)
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Diffstat (limited to 'src/plugins/qmldesigner/designercore/model/abstractproperty.cpp')
-rw-r--r-- | src/plugins/qmldesigner/designercore/model/abstractproperty.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp index 785655578c..dd86adcb31 100644 --- a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp +++ b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp @@ -56,7 +56,7 @@ AbstractProperty::AbstractProperty(): { } -AbstractProperty::AbstractProperty(const QString &propertyName, const Internal::InternalNodePointer &internalNode, Model* model, AbstractView *view) +AbstractProperty::AbstractProperty(const PropertyName &propertyName, const Internal::InternalNodePointer &internalNode, Model* model, AbstractView *view) : m_propertyName(propertyName), m_internalNode(internalNode), m_model(model), @@ -126,7 +126,7 @@ AbstractView *AbstractProperty::view() const The QVariant is null if the property doesn't exists. */ -QString AbstractProperty::name() const +PropertyName AbstractProperty::name() const { if (m_propertyName == "id") { // the ID for a node is independent of the state, so it has to be set with ModelNode::setId Q_ASSERT_X(0, Q_FUNC_INFO, "id is not a property in the model"); @@ -367,7 +367,7 @@ bool AbstractProperty::isDynamic() const return !dynamicTypeName().isEmpty(); } -QString AbstractProperty::dynamicTypeName() const +TypeName AbstractProperty::dynamicTypeName() const { if (!isValid()) throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, m_propertyName); @@ -375,7 +375,7 @@ QString AbstractProperty::dynamicTypeName() const if (internalNode()->hasProperty(name())) return internalNode()->property(name())->dynamicTypeName(); - return QString(); + return TypeName(); } /*! @@ -405,7 +405,7 @@ uint qHash(const AbstractProperty &property) QDebug operator<<(QDebug debug, const AbstractProperty &property) { - return debug.nospace() << "AbstractProperty(" << (property.isValid() ? property.name() : QLatin1String("invalid")) << ')'; + return debug.nospace() << "AbstractProperty(" << (property.isValid() ? property.name() : PropertyName("invalid")) << ')'; } QTextStream& operator<<(QTextStream &stream, const AbstractProperty &property) |