uic: Migrate from QList to QVector
Replace QList by QVector in the ui4.cpp/.h files and replace occurrences in remaining code. Change-Id: I15913710b339ef1ef5f7e3c72a7a1be69a87079b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
parent
108e73602d
commit
719ad1db55
@ -85,7 +85,7 @@ namespace CPP {
|
||||
|
||||
struct WriteInitialization : public TreeWalker
|
||||
{
|
||||
using DomPropertyList = QList<DomProperty*>;
|
||||
using DomPropertyList = QVector<DomProperty*>;
|
||||
using DomPropertyMap = QHash<QString, DomProperty*>;
|
||||
|
||||
WriteInitialization(Uic *uic);
|
||||
|
@ -862,13 +862,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;
|
||||
@ -944,13 +944,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;
|
||||
@ -1058,13 +1058,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;
|
||||
@ -1717,13 +1717,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;
|
||||
@ -1938,7 +1938,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;
|
||||
@ -1983,7 +1983,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;
|
||||
@ -2059,7 +2059,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;
|
||||
@ -2268,13 +2268,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;
|
||||
@ -2386,7 +2386,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;
|
||||
@ -5984,7 +5984,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;
|
||||
|
@ -472,11 +472,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
|
||||
@ -487,8 +487,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,
|
||||
@ -519,11 +519,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
|
||||
@ -535,8 +535,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,
|
||||
@ -581,11 +581,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
|
||||
@ -594,8 +594,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,
|
||||
@ -891,11 +891,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);
|
||||
@ -925,8 +925,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 {
|
||||
@ -1023,14 +1023,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
|
||||
@ -1047,14 +1047,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
|
||||
@ -1082,8 +1082,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);
|
||||
@ -1098,7 +1098,7 @@ private:
|
||||
|
||||
// child element data
|
||||
uint m_children = 0;
|
||||
QList<DomProperty*> m_property;
|
||||
QVector<DomProperty *> m_property;
|
||||
QVector<DomItem *> m_item;
|
||||
|
||||
enum Child {
|
||||
@ -1136,11 +1136,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);
|
||||
@ -1183,8 +1183,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;
|
||||
@ -1227,8 +1227,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
|
||||
@ -1237,7 +1237,7 @@ private:
|
||||
|
||||
// child element data
|
||||
uint m_children = 0;
|
||||
QList<DomProperty*> m_property;
|
||||
QVector<DomProperty *> m_property;
|
||||
|
||||
enum Child {
|
||||
Property = 1
|
||||
@ -2805,14 +2805,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
|
||||
|
@ -42,7 +42,7 @@ inline bool toBool(const QString &str)
|
||||
inline QString toString(const DomString *str)
|
||||
{ return str ? str->text() : QString(); }
|
||||
|
||||
inline QHash<QString, DomProperty *> propertyMap(const QList<DomProperty *> &properties)
|
||||
inline QHash<QString, DomProperty *> propertyMap(const QVector<DomProperty *> &properties)
|
||||
{
|
||||
QHash<QString, DomProperty *> map;
|
||||
for (DomProperty *p : properties)
|
||||
|
Loading…
x
Reference in New Issue
Block a user