Cocoa: Neuter -[QNSView cancelOperation:] for normal windows

QNSWindow inherits QNSPanel regardless of the kind of QWindow. With
NSPanels, pressing escape is equivalent to dismissing the panel.
That is not the behavior we aim at for normal toplevel QWindows.

Task-number: QTBUG-36694
Change-Id: I1a1c138183cc43c968249442021f334cd37f7ce0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2014-02-07 14:16:22 +01:00 committed by The Qt Project
parent a7b8ef0841
commit df86721bb4

View File

@ -1371,6 +1371,12 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
[self tryToPerform:aSelector with:self];
}
- (void)cancelOperation:(id)sender
{
if (!m_platformWindow || m_platformWindow->windowShouldBehaveAsPanel())
[super cancelOperation:sender];
}
- (void) insertText:(id)aString replacementRange:(NSRange)replacementRange
{
Q_UNUSED(replacementRange)