summaryrefslogtreecommitdiffstats
path: root/src/tools/uic3
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-06-16 15:16:09 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-06-16 15:16:09 (GMT)
commited358d0f8ecaff49e72accc693c3cf8f09900449 (patch)
tree21689389e275df17c79f2adc366a71941e4420ed /src/tools/uic3
parente73e36a16bb51fa66bdccc780f177e2c4d5d8092 (diff)
parente2451ba6eaac6c8050fd172405c1bf262d4e34d7 (diff)
downloadQt-ed358d0f8ecaff49e72accc693c3cf8f09900449.zip
Qt-ed358d0f8ecaff49e72accc693c3cf8f09900449.tar.gz
Qt-ed358d0f8ecaff49e72accc693c3cf8f09900449.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/tools/uic3')
-rw-r--r--src/tools/uic3/converter.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tools/uic3/converter.cpp b/src/tools/uic3/converter.cpp
index 1b0460b..c5a75eb 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)