QPI/Cocoa: QNSView - guard removeFromSuperview by autorelease pool
removeFromSuperview could be called from outside the Qt domain (e.g from a native cocoa gui). we need to guard it by an autorelease pool to make sure that potential release/dealloc methods are not postponed to a point when we do not have a qapplication anymore Change-Id: If65cce4c524a16ffee125694c534f900c7d08fa8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
parent
07efdb78f0
commit
084df84bd0
@ -99,6 +99,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper));
|
||||
- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification;
|
||||
- (void)viewDidHide;
|
||||
- (void)viewDidUnhide;
|
||||
- (void)removeFromSuperview;
|
||||
|
||||
- (BOOL)isFlipped;
|
||||
- (BOOL)acceptsFirstResponder;
|
||||
|
@ -498,6 +498,12 @@ QT_WARNING_POP
|
||||
m_platformWindow->exposeWindow();
|
||||
}
|
||||
|
||||
- (void)removeFromSuperview
|
||||
{
|
||||
QMacAutoReleasePool pool;
|
||||
[super removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void) flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset
|
||||
{
|
||||
m_backingStore = backingStore;
|
||||
|
Loading…
x
Reference in New Issue
Block a user