summaryrefslogtreecommitdiffstats
path: root/src/tools/uic
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2010-01-05 16:10:24 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-01-05 16:10:24 (GMT)
commit522660346023c025d14bfa029f70c88d18eb609d (patch)
tree40c9ac595e03bd2008a52fe8eecb1e068877a827 /src/tools/uic
parent547e117e7463db85651d910d5a627806388b9afc (diff)
downloadQt-522660346023c025d14bfa029f70c88d18eb609d.zip
Qt-522660346023c025d14bfa029f70c88d18eb609d.tar.gz
Qt-522660346023c025d14bfa029f70c88d18eb609d.tar.bz2
uic3/uic: Ignore buttonGroupId property when there is no parent QButtonGroup
The uic from Qt3 did the same. And otherwise uic3/uic generates a radiobutton->setButtonGroupId(val) line, which does not compile. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/tools/uic')
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 88dfa98..3bc56ae 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -1221,9 +1221,10 @@ void WriteInitialization::writeProperties(const QString &varName,
const DomRect *r = p->elementRect();
m_output << m_indent << varName << "->resize(" << r->elementWidth() << ", " << r->elementHeight() << ");\n";
continue;
- } else if (propertyName == QLatin1String("buttonGroupId") && buttonGroupWidget) { // Q3ButtonGroup support
- m_output << m_indent << m_driver->findOrInsertWidget(buttonGroupWidget) << "->insert("
- << varName << ", " << p->elementNumber() << ");\n";
+ } else if (propertyName == QLatin1String("buttonGroupId")) { // Q3ButtonGroup support
+ if (buttonGroupWidget)
+ m_output << m_indent << m_driver->findOrInsertWidget(buttonGroupWidget) << "->insert("
+ << varName << ", " << p->elementNumber() << ");\n";
continue;
} else if (propertyName == QLatin1String("currentRow") // QListWidget::currentRow
&& m_uic->customWidgetsInfo()->extends(className, QLatin1String("QListWidget"))) {