diff options
-rw-r--r-- | src/tools/uic3/converter.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tools/uic3/converter.cpp b/src/tools/uic3/converter.cpp index a5723dd..04b847c 100644 --- a/src/tools/uic3/converter.cpp +++ b/src/tools/uic3/converter.cpp @@ -988,6 +988,7 @@ void Ui3Reader::createProperties(const QDomElement &n, QList<DomProperty*> *prop QString objectName; bool wordWrapFound = false; + bool wordWrapPropertyFound = false; for (QDomElement e=n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) { if (e.tagName().toLower() == QLatin1String("property")) { @@ -1099,14 +1100,16 @@ void Ui3Reader::createProperties(const QDomElement &n, QList<DomProperty*> *prop name = prop->attributeName(); // sync the name - if (className == QLatin1String("QLabel") && name == QLatin1String("alignment")) { - QString v = prop->elementSet(); - - if (v.contains(QRegExp(QLatin1String("\\bWordBreak\\b")))) - wordWrapFound = true; + if (className == QLatin1String("QLabel")) { + if (name == QLatin1String("alignment")) { + const QString v = prop->elementSet(); + if (v.contains(QRegExp(QLatin1String("\\bWordBreak\\b")))) + wordWrapFound = true; + } else if (name == QLatin1String("wordWrap")) { + wordWrapPropertyFound = true; + } } - // resolve the flags and enumerator if (prop->kind() == DomProperty::Set) { QStringList flags = prop->elementSet().split(QLatin1Char('|')); @@ -1164,7 +1167,7 @@ void Ui3Reader::createProperties(const QDomElement &n, QList<DomProperty*> *prop } } } - if (className == QLatin1String("QLabel")) { + if (className == QLatin1String("QLabel") && !wordWrapPropertyFound) { DomProperty *wordWrap = new DomProperty(); wordWrap->setAttributeName(QLatin1String("wordWrap")); if (wordWrapFound) |