summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-03-05 11:09:06 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-03-05 11:30:43 (GMT)
commit12b6987031be9faee3886d7623888feb4e1762af (patch)
treecd9e01271ef9b86f36925ba57022c489c8574f8f
parentfd7872eb4e7a721ec5fc734a29cecd27f778842a (diff)
downloadQt-12b6987031be9faee3886d7623888feb4e1762af.zip
Qt-12b6987031be9faee3886d7623888feb4e1762af.tar.gz
Qt-12b6987031be9faee3886d7623888feb4e1762af.tar.bz2
Update the Qt focus widget on responder change.
Set focus widget when the view becomes the first responder. This matches resignFirstResponder, where we set the focus widget to 0. This fixes the QCombobox::autoCompletionCaseSensitivity test failure introduced in the Mac alien widgets change. Reviewed-by: Richard Moe Gustavsen
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index f7cb21f..6261429 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -1047,6 +1047,13 @@ static int qCocoaViewCount = 0;
return YES;
}
+- (BOOL)becomeFirstResponder
+{
+ if (QApplication::focusWidget() == 0)
+ QApplicationPrivate::setFocusWidget([self QT_MANGLE_NAMESPACE(qt_qwidget)], Qt::OtherFocusReason);
+ return YES;
+}
+
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
{
Q_UNUSED(isLocal);