summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-06-16 14:26:09 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-06-16 14:26:09 (GMT)
commitb46e9371edfacd8ee65397292d667c5719a19aeb (patch)
tree1b8edb2c89062814c63cb5bfd2ef6c7bc1a89810 /src
parent2543decb7ead117fcbea2ef0618ccaedf0f1b2f4 (diff)
downloadQt-b46e9371edfacd8ee65397292d667c5719a19aeb.zip
Qt-b46e9371edfacd8ee65397292d667c5719a19aeb.tar.gz
Qt-b46e9371edfacd8ee65397292d667c5719a19aeb.tar.bz2
Prevent uic3 from clobbering the QLabel3::wordWrap property.
Basically make use of customer patch, do not try to use the value obtained from the alignment if property is present. Task-number: 128859
Diffstat (limited to 'src')
-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 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)