summaryrefslogtreecommitdiff
path: root/tools/designer
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-10 07:27:12 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-10 07:27:12 +1000
commitcb188229132e36ef1fe1af4c8e2db0df6047be76 (patch)
treeff42bedd48d786152967d4b92c3b19f48a07b4ba /tools/designer
parent98072ecf6a6dc07ac82038adf66048a1c17dbbb5 (diff)
parentfa23cdf45a2416f0a4505f9f9bc63a83603dab74 (diff)
downloadqt4-tools-cb188229132e36ef1fe1af4c8e2db0df6047be76.tar.gz
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 d35415d9b2..34e1681ef7 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 402a771b80..ecb43db89f 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);