summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/uilib
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-06-21 13:49:11 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-06-21 13:49:11 (GMT)
commit3fb36b36de90068db241cc21184a8ac3b899ad2d (patch)
tree22490e313f1415681ddfb35f1b0ea0dca8f94ac6 /tools/designer/src/lib/uilib
parentd11e3d6e327677e828918de3173732116976fbe4 (diff)
parentf34f4ea2d35b92631e98a772e02a1b77ce26681e (diff)
downloadQt-3fb36b36de90068db241cc21184a8ac3b899ad2d.zip
Qt-3fb36b36de90068db241cc21184a8ac3b899ad2d.tar.gz
Qt-3fb36b36de90068db241cc21184a8ac3b899ad2d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools/designer/src/lib/uilib')
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index a0c9e83..6f009e3 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -2125,6 +2125,21 @@ void QAbstractFormBuilder::saveComboBoxExtraInfo(QComboBox *comboBox, DomWidget
ui_widget->setElementItem(ui_items);
}
+// Return the buttongroups assigned to a button except the internal one
+// (with empty object name) used by Q3ButtonGroup.
+static inline const QButtonGroup *formButtonGroup(const QAbstractButton *widget)
+{
+ const QButtonGroup *buttonGroup = widget->group();
+ if (!buttonGroup)
+ return 0;
+ if (buttonGroup->objectName().isEmpty()) {
+ if (const QWidget *parent = widget->parentWidget())
+ if (!qstrcmp(parent->metaObject()->className(), "Q3ButtonGroup"))
+ return 0;
+ }
+ return buttonGroup;
+}
+
/*!
\internal
\since 4.5
@@ -2133,7 +2148,7 @@ void QAbstractFormBuilder::saveComboBoxExtraInfo(QComboBox *comboBox, DomWidget
void QAbstractFormBuilder::saveButtonExtraInfo(const QAbstractButton *widget, DomWidget *ui_widget, DomWidget *)
{
typedef QList<DomProperty*> DomPropertyList;
- if (const QButtonGroup *buttonGroup = widget->group()) {
+ if (const QButtonGroup *buttonGroup = formButtonGroup(widget)) {
DomPropertyList attributes = ui_widget->elementAttribute();
DomString *domString = new DomString();
domString->setText(buttonGroup->objectName());