diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-26 09:15:53 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-26 10:47:56 +0100 |
commit | becdfbb58ad277903deba4a67dcfa8fbf7830ce5 (patch) | |
tree | 82b82bc29610c384f4d196b5a0ca233db4f06a70 /src/designer | |
parent | 82e4062e97e563d37d359480fbd80a4ed71cb7f6 (diff) |
Qt Designer: Replace QList by QVector in the ui4.cpp/.h files
Change-Id: I953359bcbe071316f684a8019bef9d9c2f0a8a5c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer')
-rw-r--r-- | src/designer/data/generate_shared.xsl | 48 | ||||
-rw-r--r-- | src/designer/src/lib/uilib/ui4.cpp | 30 | ||||
-rw-r--r-- | src/designer/src/lib/uilib/ui4_p.h | 90 |
3 files changed, 81 insertions, 87 deletions
diff --git a/src/designer/data/generate_shared.xsl b/src/designer/data/generate_shared.xsl index 3ac05a42b..ddd0aedb4 100644 --- a/src/designer/data/generate_shared.xsl +++ b/src/designer/data/generate_shared.xsl @@ -253,17 +253,13 @@ <xsl:when test="$array"> <xsl:choose> <xsl:when test="$xs-type='xs:string'">QStringList</xsl:when> - <xsl:when test="$xs-type='xs:integer'">QList<int></xsl:when> - <xsl:when test="$xs-type='xs:float'">QList<float></xsl:when> - <xsl:when test="$xs-type='xs:double'">QList<double></xsl:when> - <xsl:when test="$xs-type='xs:boolean'">QList<bool></xsl:when> - <xsl:when test="$xs-type='xs:long'">QList<qlonglong></xsl:when> - <xsl:when test="$xs-type='xs:unsignedInt'">QList<uint></xsl:when> - <xsl:when test="$xs-type='xs:unsignedLong'">QList<qulonglong></xsl:when> -<!-- ### fixme Qt 6: Change the QList<DomProperty*> to QVector<DomProperty*> by - removing the below line and change the virtual methods QAbstractFormBuilder::applyProperties() - and QAbstractFormBuilder::computeProperties(QObject *obj) accordingly (repeats 2 times below). --> - <xsl:when test="$xs-type='Property'">QList<DomProperty *></xsl:when> + <xsl:when test="$xs-type='xs:integer'">QVector<int></xsl:when> + <xsl:when test="$xs-type='xs:float'">QVector<float></xsl:when> + <xsl:when test="$xs-type='xs:double'">QVector<double></xsl:when> + <xsl:when test="$xs-type='xs:boolean'">QVector<bool></xsl:when> + <xsl:when test="$xs-type='xs:long'">QVector<qlonglong></xsl:when> + <xsl:when test="$xs-type='xs:unsignedInt'">QVector<uint></xsl:when> + <xsl:when test="$xs-type='xs:unsignedLong'">QVector<qulonglong></xsl:when> <xsl:otherwise>QVector<Dom<xsl:value-of select="$xs-type"/> *></xsl:otherwise> </xsl:choose> </xsl:when> @@ -290,14 +286,13 @@ <xsl:when test="$array"> <xsl:choose> <xsl:when test="$xs-type='xs:string'">QStringList </xsl:when> - <xsl:when test="$xs-type='xs:integer'">QList<int> </xsl:when> - <xsl:when test="$xs-type='xs:float'">QList<float> </xsl:when> - <xsl:when test="$xs-type='xs:double'">QList<double> </xsl:when> - <xsl:when test="$xs-type='xs:boolean'">QList<bool> </xsl:when> - <xsl:when test="$xs-type='xs:long'">QList<qlonglong> </xsl:when> - <xsl:when test="$xs-type='xs:unsignedInt'">QList<uint> </xsl:when> - <xsl:when test="$xs-type='xs:unsignedLong'">QList<qulonglong> </xsl:when> - <xsl:when test="$xs-type='Property'">QList<DomProperty*> </xsl:when> + <xsl:when test="$xs-type='xs:integer'">QVector<int> </xsl:when> + <xsl:when test="$xs-type='xs:float'">QVector<float> </xsl:when> + <xsl:when test="$xs-type='xs:double'">QVector<double> </xsl:when> + <xsl:when test="$xs-type='xs:boolean'">QVector<bool> </xsl:when> + <xsl:when test="$xs-type='xs:long'">QVector<qlonglong> </xsl:when> + <xsl:when test="$xs-type='xs:unsignedInt'">QVector<uint> </xsl:when> + <xsl:when test="$xs-type='xs:unsignedLong'">QVector<qulonglong> </xsl:when> <xsl:otherwise>QVector<Dom<xsl:value-of select="$xs-type"/> *> </xsl:otherwise> </xsl:choose> </xsl:when> @@ -324,14 +319,13 @@ <xsl:when test="$array"> <xsl:choose> <xsl:when test="$xs-type='xs:string'">const QStringList &</xsl:when> - <xsl:when test="$xs-type='xs:integer'">const QList<int> &</xsl:when> - <xsl:when test="$xs-type='xs:float'">const QList<float> &</xsl:when> - <xsl:when test="$xs-type='xs:double'">const QList<double> &</xsl:when> - <xsl:when test="$xs-type='xs:boolean'">const QList<bool> &</xsl:when> - <xsl:when test="$xs-type='xs:long'">const QList<qlonglong> &</xsl:when> - <xsl:when test="$xs-type='xs:unsignedInt'">const QList<uint> &</xsl:when> - <xsl:when test="$xs-type='xs:unsignedLong'">const QList<qulonglong> &</xsl:when> - <xsl:when test="$xs-type='Property'">const QList<DomProperty *> &</xsl:when> + <xsl:when test="$xs-type='xs:integer'">const QVector<int> &</xsl:when> + <xsl:when test="$xs-type='xs:float'">const QVector<float> &</xsl:when> + <xsl:when test="$xs-type='xs:double'">const QVector<double> &</xsl:when> + <xsl:when test="$xs-type='xs:boolean'">const QVector<bool> &</xsl:when> + <xsl:when test="$xs-type='xs:long'">const QVector<qlonglong> &</xsl:when> + <xsl:when test="$xs-type='xs:unsignedInt'">const QVector<uint> &</xsl:when> + <xsl:when test="$xs-type='xs:unsignedLong'">const QVector<qulonglong> &</xsl:when> <xsl:otherwise>const QVector<Dom<xsl:value-of select="$xs-type"/> *> &</xsl:otherwise> </xsl:choose> </xsl:when> diff --git a/src/designer/src/lib/uilib/ui4.cpp b/src/designer/src/lib/uilib/ui4.cpp index bc58c202b..c58d3e80a 100644 --- a/src/designer/src/lib/uilib/ui4.cpp +++ b/src/designer/src/lib/uilib/ui4.cpp @@ -884,13 +884,13 @@ void DomActionGroup::setElementActionGroup(const QVector<DomActionGroup *> &a) m_actionGroup = a; } -void DomActionGroup::setElementProperty(const QList<DomProperty *> &a) +void DomActionGroup::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; } -void DomActionGroup::setElementAttribute(const QList<DomProperty *> &a) +void DomActionGroup::setElementAttribute(const QVector<DomProperty *> &a) { m_children |= Attribute; m_attribute = a; @@ -966,13 +966,13 @@ void DomAction::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomAction::setElementProperty(const QList<DomProperty *> &a) +void DomAction::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; } -void DomAction::setElementAttribute(const QList<DomProperty *> &a) +void DomAction::setElementAttribute(const QVector<DomProperty *> &a) { m_children |= Attribute; m_attribute = a; @@ -1080,13 +1080,13 @@ void DomButtonGroup::write(QXmlStreamWriter &writer, const QString &tagName) con writer.writeEndElement(); } -void DomButtonGroup::setElementProperty(const QList<DomProperty *> &a) +void DomButtonGroup::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; } -void DomButtonGroup::setElementAttribute(const QList<DomProperty *> &a) +void DomButtonGroup::setElementAttribute(const QVector<DomProperty *> &a) { m_children |= Attribute; m_attribute = a; @@ -1739,13 +1739,13 @@ void DomLayout::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomLayout::setElementProperty(const QList<DomProperty *> &a) +void DomLayout::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; } -void DomLayout::setElementAttribute(const QList<DomProperty *> &a) +void DomLayout::setElementAttribute(const QVector<DomProperty *> &a) { m_children |= Attribute; m_attribute = a; @@ -1960,7 +1960,7 @@ void DomRow::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomRow::setElementProperty(const QList<DomProperty *> &a) +void DomRow::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; @@ -2005,7 +2005,7 @@ void DomColumn::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomColumn::setElementProperty(const QList<DomProperty *> &a) +void DomColumn::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; @@ -2081,7 +2081,7 @@ void DomItem::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomItem::setElementProperty(const QList<DomProperty *> &a) +void DomItem::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; @@ -2290,13 +2290,13 @@ void DomWidget::setElementClass(const QStringList &a) m_class = a; } -void DomWidget::setElementProperty(const QList<DomProperty *> &a) +void DomWidget::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; } -void DomWidget::setElementAttribute(const QList<DomProperty *> &a) +void DomWidget::setElementAttribute(const QVector<DomProperty *> &a) { m_children |= Attribute; m_attribute = a; @@ -2408,7 +2408,7 @@ void DomSpacer::write(QXmlStreamWriter &writer, const QString &tagName) const writer.writeEndElement(); } -void DomSpacer::setElementProperty(const QList<DomProperty *> &a) +void DomSpacer::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; @@ -6006,7 +6006,7 @@ void DomDesignerData::write(QXmlStreamWriter &writer, const QString &tagName) co writer.writeEndElement(); } -void DomDesignerData::setElementProperty(const QList<DomProperty *> &a) +void DomDesignerData::setElementProperty(const QVector<DomProperty *> &a) { m_children |= Property; m_property = a; diff --git a/src/designer/src/lib/uilib/ui4_p.h b/src/designer/src/lib/uilib/ui4_p.h index cbd5120c0..6066cf4d4 100644 --- a/src/designer/src/lib/uilib/ui4_p.h +++ b/src/designer/src/lib/uilib/ui4_p.h @@ -494,11 +494,11 @@ public: inline QVector<DomActionGroup *> elementActionGroup() const { return m_actionGroup; } void setElementActionGroup(const QVector<DomActionGroup *> &a); - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); - inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementAttribute() const { return m_attribute; } + void setElementAttribute(const QVector<DomProperty *> &a); private: // attribute data @@ -509,8 +509,8 @@ private: uint m_children = 0; QVector<DomAction *> m_action; QVector<DomActionGroup *> m_actionGroup; - QList<DomProperty*> m_property; - QList<DomProperty*> m_attribute; + QVector<DomProperty *> m_property; + QVector<DomProperty *> m_attribute; enum Child { Action = 1, @@ -541,11 +541,11 @@ public: inline void clearAttributeMenu() { m_has_attr_menu = false; } // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); - inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementAttribute() const { return m_attribute; } + void setElementAttribute(const QVector<DomProperty *> &a); private: // attribute data @@ -557,8 +557,8 @@ private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; - QList<DomProperty*> m_attribute; + QVector<DomProperty *> m_property; + QVector<DomProperty *> m_attribute; enum Child { Property = 1, @@ -603,11 +603,11 @@ public: inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); - inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementAttribute() const { return m_attribute; } + void setElementAttribute(const QVector<DomProperty *> &a); private: // attribute data @@ -616,8 +616,8 @@ private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; - QList<DomProperty*> m_attribute; + QVector<DomProperty *> m_property; + QVector<DomProperty *> m_attribute; enum Child { Property = 1, @@ -913,11 +913,11 @@ public: inline void clearAttributeColumnMinimumWidth() { m_has_attr_columnMinimumWidth = false; } // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); - inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementAttribute() const { return m_attribute; } + void setElementAttribute(const QVector<DomProperty *> &a); inline QVector<DomLayoutItem *> elementItem() const { return m_item; } void setElementItem(const QVector<DomLayoutItem *> &a); @@ -947,8 +947,8 @@ private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; - QList<DomProperty*> m_attribute; + QVector<DomProperty *> m_property; + QVector<DomProperty *> m_attribute; QVector<DomLayoutItem *> m_item; enum Child { @@ -1045,14 +1045,14 @@ public: void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; + QVector<DomProperty *> m_property; enum Child { Property = 1 @@ -1069,14 +1069,14 @@ public: void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; + QVector<DomProperty *> m_property; enum Child { Property = 1 @@ -1104,8 +1104,8 @@ public: inline void clearAttributeColumn() { m_has_attr_column = false; } // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); inline QVector<DomItem *> elementItem() const { return m_item; } void setElementItem(const QVector<DomItem *> &a); @@ -1120,7 +1120,7 @@ private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; + QVector<DomProperty *> m_property; QVector<DomItem *> m_item; enum Child { @@ -1158,11 +1158,11 @@ public: inline QStringList elementClass() const { return m_class; } void setElementClass(const QStringList &a); - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); - inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementAttribute() const { return m_attribute; } + void setElementAttribute(const QVector<DomProperty *> &a); inline QVector<DomRow *> elementRow() const { return m_row; } void setElementRow(const QVector<DomRow *> &a); @@ -1205,8 +1205,8 @@ private: // child element data uint m_children = 0; QStringList m_class; - QList<DomProperty*> m_property; - QList<DomProperty*> m_attribute; + QVector<DomProperty *> m_property; + QVector<DomProperty *> m_attribute; QVector<DomRow *> m_row; QVector<DomColumn *> m_column; QVector<DomItem *> m_item; @@ -1249,8 +1249,8 @@ public: inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); private: // attribute data @@ -1259,7 +1259,7 @@ private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; + QVector<DomProperty *> m_property; enum Child { Property = 1 @@ -2827,14 +2827,14 @@ public: void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty *> &a); + inline QVector<DomProperty *> elementProperty() const { return m_property; } + void setElementProperty(const QVector<DomProperty *> &a); private: // child element data uint m_children = 0; - QList<DomProperty*> m_property; + QVector<DomProperty *> m_property; enum Child { Property = 1 |