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.cpp46
1 files changed, 39 insertions, 7 deletions
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 0c8adcd07a..88943184a4 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -3479,7 +3479,7 @@ void DomWidget::read(QXmlStreamReader &reader)
continue;
}
if (name == QStringLiteral("native")) {
- setAttributeNative((attribute.value().toString() == QLatin1String("true") ? true : false));
+ setAttributeNative((attribute.value().toString() == QStringLiteral("true") ? true : false));
continue;
}
reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString());
@@ -4853,23 +4853,23 @@ void DomFont::read(QXmlStreamReader &reader)
continue;
}
if (tag == QStringLiteral("italic")) {
- setElementItalic((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementItalic((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
if (tag == QStringLiteral("bold")) {
- setElementBold((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementBold((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
if (tag == QStringLiteral("underline")) {
- setElementUnderline((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementUnderline((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
if (tag == QStringLiteral("strikeout")) {
- setElementStrikeOut((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementStrikeOut((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
if (tag == QStringLiteral("antialiasing")) {
- setElementAntialiasing((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementAntialiasing((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
if (tag == QStringLiteral("stylestrategy")) {
@@ -4877,7 +4877,7 @@ void DomFont::read(QXmlStreamReader &reader)
continue;
}
if (tag == QStringLiteral("kerning")) {
- setElementKerning((reader.readElementText() == QLatin1String("true") ? true : false));
+ setElementKerning((reader.readElementText() == QStringLiteral("true") ? true : false));
continue;
}
reader.raiseError(QStringLiteral("Unexpected element ") + tag);
@@ -6028,6 +6028,9 @@ void DomStringList::clear(bool clear_all)
if (clear_all) {
m_text.clear();
+ m_has_attr_notr = false;
+ m_has_attr_comment = false;
+ m_has_attr_extraComment = false;
}
m_children = 0;
@@ -6036,6 +6039,9 @@ void DomStringList::clear(bool clear_all)
DomStringList::DomStringList()
{
m_children = 0;
+ m_has_attr_notr = false;
+ m_has_attr_comment = false;
+ m_has_attr_extraComment = false;
}
DomStringList::~DomStringList()
@@ -6046,6 +6052,23 @@ DomStringList::~DomStringList()
void DomStringList::read(QXmlStreamReader &reader)
{
+ foreach (const QXmlStreamAttribute &attribute, reader.attributes()) {
+ QStringRef name = attribute.name();
+ if (name == QStringLiteral("notr")) {
+ setAttributeNotr(attribute.value().toString());
+ continue;
+ }
+ if (name == QStringLiteral("comment")) {
+ setAttributeComment(attribute.value().toString());
+ continue;
+ }
+ if (name == QStringLiteral("extracomment")) {
+ setAttributeExtraComment(attribute.value().toString());
+ continue;
+ }
+ reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString());
+ }
+
for (bool finished = false; !finished && !reader.hasError();) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
@@ -6074,6 +6097,15 @@ void DomStringList::write(QXmlStreamWriter &writer, const QString &tagName) cons
{
writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("stringlist") : tagName.toLower());
+ if (hasAttributeNotr())
+ writer.writeAttribute(QStringLiteral("notr"), attributeNotr());
+
+ if (hasAttributeComment())
+ writer.writeAttribute(QStringLiteral("comment"), attributeComment());
+
+ if (hasAttributeExtraComment())
+ writer.writeAttribute(QStringLiteral("extracomment"), attributeExtraComment());
+
for (int i = 0; i < m_string.size(); ++i) {
QString v = m_string[i];
writer.writeTextElement(QStringLiteral("string"), v);