diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-04-08 15:14:22 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-04-08 15:14:22 (GMT) |
commit | fa23cdf45a2416f0a4505f9f9bc63a83603dab74 (patch) | |
tree | 8068d4d90628c3c84e93d491eff0111d3fce3d94 | |
parent | 7a3692334a858d3c8dfb8b9d67946fab97233849 (diff) | |
download | Qt-fa23cdf45a2416f0a4505f9f9bc63a83603dab74.zip Qt-fa23cdf45a2416f0a4505f9f9bc63a83603dab74.tar.gz Qt-fa23cdf45a2416f0a4505f9f9bc63a83603dab74.tar.bz2 |
Designer: Allow promoted QWidget's to be buddies.
Extend check for focusPolicy by promoted check.
Task-number: QTBUG-18631
-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 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; |