diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-04-08 17:14:22 +0200 |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 12:25:04 +0200 |
commit | 4738c3181edd88ed369238c277b7f0e6b0b7a6c4 (patch) | |
tree | 12ac0ad51bae9feac8d9a2b24c180c4c276d7978 /tools | |
parent | 67de119aa767e2d74e7a042c7d74e3353deea506 (diff) |
Designer: Allow promoted QWidget's to be buddies.
Extend check for focusPolicy by promoted check.
Task-number: QTBUG-18631
Diffstat (limited to 'tools')
-rw-r--r-- | tools/designer/src/components/buddyeditor/buddyeditor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp index 9926251b8d..76afbbd38f 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; |