From 7a3692334a858d3c8dfb8b9d67946fab97233849 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Apr 2011 17:03:43 +0200 Subject: Designer: Specify 'notr' attribute for buttongroup name. Such that the name does not show up in lupdate. --- tools/designer/src/lib/uilib/abstractformbuilder.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v0.12 From fa23cdf45a2416f0a4505f9f9bc63a83603dab74 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Apr 2011 17:14:22 +0200 Subject: Designer: Allow promoted QWidget's to be buddies. Extend check for focusPolicy by promoted check. Task-number: QTBUG-18631 --- tools/designer/src/components/buddyeditor/buddyeditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #include #include +#include #include #include @@ -75,7 +76,8 @@ static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form) if (index != -1) { bool ok = false; const Qt::FocusPolicy q = static_cast(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; -- cgit v0.12