summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac_p.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-02-15 12:33:07 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-02-23 12:37:10 (GMT)
commit526c6fd4686a8e87e5087ebcac941405f742304a (patch)
treecb16c07e1db7908e73019092705ca8543c19a566 /src/gui/kernel/qcocoaview_mac_p.h
parentde4332a4728e739b37e9c7b04c021e150e096270 (diff)
downloadQt-526c6fd4686a8e87e5087ebcac941405f742304a.zip
Qt-526c6fd4686a8e87e5087ebcac941405f742304a.tar.gz
Qt-526c6fd4686a8e87e5087ebcac941405f742304a.tar.bz2
Prevent stale QWidget pointers in QCocoaView
QCocoaView has two "back" pointers ot its owning QWidget and the corresponding QWidgetPrivate. The lifetime of the QCocoaView might be longer and that of the QWidget if Cocoa itself holds references to it. In addition accessing a QWidget that is being destroyed is not safe. Set both pack pointers to NULL in ~QWidget. This prevents following stale pointers in the QCocoaView callbacks. This also means that we'll see the NULL pointers, add gurads for that.
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac_p.h')
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index 4bb10c5..33aaa24 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -103,6 +103,7 @@ Q_GUI_EXPORT
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation;
- (BOOL)isComposing;
- (QWidget *)qt_qwidget;
+- (void) qt_clearQWidget;
- (BOOL)qt_leftButtonIsRightButton;
- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped;
+ (DnDParams*)currentMouseEvent;