summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-09 21:27:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-09 21:27:12 (GMT)
commitcb188229132e36ef1fe1af4c8e2db0df6047be76 (patch)
treeff42bedd48d786152967d4b92c3b19f48a07b4ba /tools/designer
parent98072ecf6a6dc07ac82038adf66048a1c17dbbb5 (diff)
parentfa23cdf45a2416f0a4505f9f9bc63a83603dab74 (diff)
downloadQt-cb188229132e36ef1fe1af4c8e2db0df6047be76.zip
Qt-cb188229132e36ef1fe1af4c8e2db0df6047be76.tar.gz
Qt-cb188229132e36ef1fe1af4c8e2db0df6047be76.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging: Designer: Allow promoted QWidget's to be buddies. Designer: Specify 'notr' attribute for buttongroup name.
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.cpp4
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
index d35415d..34e1681 100644
--- a/tools/designer/src/components/buddyeditor/buddyeditor.cpp
+++ b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
@@ -51,6 +51,7 @@
#include <qdesigner_utils_p.h>
#include <qlayout_widget_p.h>
#include <connectionedit_p.h>
+#include <metadatabase_p.h>
#include <QtCore/qdebug.h>
#include <QtGui/QLabel>
@@ -75,7 +76,8 @@ static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
if (index != -1) {
bool ok = false;
const Qt::FocusPolicy q = static_cast<Qt::FocusPolicy>(qdesigner_internal::Utils::valueOf(sheet->property(index), &ok));
- return ok && q != Qt::NoFocus;
+ // Refuse No-focus unless the widget is promoted.
+ return (ok && q != Qt::NoFocus) || qdesigner_internal::isPromoted(form->core(), w);
}
}
return false;
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index 402a771..ecb43db 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -2291,6 +2291,7 @@ void QAbstractFormBuilder::saveButtonExtraInfo(const QAbstractButton *widget, Do
DomPropertyList attributes = ui_widget->elementAttribute();
DomString *domString = new DomString();
domString->setText(buttonGroup->objectName());
+ domString->setAttributeNotr(QLatin1String("true"));
DomProperty *domProperty = new DomProperty();
domProperty->setAttributeName(QLatin1String(buttonGroupPropertyC));
domProperty->setElementString(domString);