summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/ui4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/uic/ui4.cpp')
-rw-r--r--src/tools/uic/ui4.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 52bc8e3..94d931b 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -3673,6 +3673,7 @@ void DomLayoutItem::clear(bool clear_all)
m_attr_rowSpan = 0;
m_has_attr_colSpan = false;
m_attr_colSpan = 0;
+ m_has_attr_alignment = false;
}
m_kind = Unknown;
@@ -3694,6 +3695,7 @@ DomLayoutItem::DomLayoutItem()
m_attr_rowSpan = 0;
m_has_attr_colSpan = false;
m_attr_colSpan = 0;
+ m_has_attr_alignment = false;
m_widget = 0;
m_layout = 0;
m_spacer = 0;
@@ -3727,6 +3729,10 @@ void DomLayoutItem::read(QXmlStreamReader &reader)
setAttributeColSpan(attribute.value().toString().toInt());
continue;
}
+ if (name == QLatin1String("alignment")) {
+ setAttributeAlignment(attribute.value().toString());
+ continue;
+ }
reader.raiseError(QLatin1String("Unexpected attribute ") + name.toString());
}
@@ -3779,6 +3785,8 @@ void DomLayoutItem::read(const QDomElement &node)
setAttributeRowSpan(node.attribute(QLatin1String("rowspan")).toInt());
if (node.hasAttribute(QLatin1String("colspan")))
setAttributeColSpan(node.attribute(QLatin1String("colspan")).toInt());
+ if (node.hasAttribute(QLatin1String("alignment")))
+ setAttributeAlignment(node.attribute(QLatin1String("alignment")));
for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
if (!n.isElement())
@@ -3828,6 +3836,9 @@ void DomLayoutItem::write(QXmlStreamWriter &writer, const QString &tagName) cons
if (hasAttributeColSpan())
writer.writeAttribute(QLatin1String("colspan"), QString::number(attributeColSpan()));
+ if (hasAttributeAlignment())
+ writer.writeAttribute(QLatin1String("alignment"), attributeAlignment());
+
switch (kind()) {
case Widget: {
DomWidget* v = elementWidget();
@@ -7745,6 +7756,7 @@ void DomResourceIcon::clear(bool clear_all)
if (clear_all) {
m_text = QLatin1String("");
+ m_has_attr_theme = false;
m_has_attr_resource = false;
}
@@ -7762,6 +7774,7 @@ void DomResourceIcon::clear(bool clear_all)
DomResourceIcon::DomResourceIcon()
{
m_children = 0;
+ m_has_attr_theme = false;
m_has_attr_resource = false;
m_text = QLatin1String("");
m_normalOff = 0;
@@ -7791,6 +7804,10 @@ void DomResourceIcon::read(QXmlStreamReader &reader)
foreach (const QXmlStreamAttribute &attribute, reader.attributes()) {
QStringRef name = attribute.name();
+ if (name == QLatin1String("theme")) {
+ setAttributeTheme(attribute.value().toString());
+ continue;
+ }
if (name == QLatin1String("resource")) {
setAttributeResource(attribute.value().toString());
continue;
@@ -7869,6 +7886,8 @@ void DomResourceIcon::read(QXmlStreamReader &reader)
#ifdef QUILOADER_QDOM_READ
void DomResourceIcon::read(const QDomElement &node)
{
+ if (node.hasAttribute(QLatin1String("theme")))
+ setAttributeTheme(node.attribute(QLatin1String("theme")));
if (node.hasAttribute(QLatin1String("resource")))
setAttributeResource(node.attribute(QLatin1String("resource")));
@@ -7938,6 +7957,9 @@ void DomResourceIcon::write(QXmlStreamWriter &writer, const QString &tagName) co
{
writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("resourceicon") : tagName.toLower());
+ if (hasAttributeTheme())
+ writer.writeAttribute(QLatin1String("theme"), attributeTheme());
+
if (hasAttributeResource())
writer.writeAttribute(QLatin1String("resource"), attributeResource());