summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-16 15:35:32 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-28 17:06:41 +0000
commit5d365b96b9a9d8585a0be5cc1c2376b7b2f27101 (patch)
tree6934a160d98972629805fa5e7074427ec55512d4 /src/testlib
parentdf3da2c1d16ad9faa749f9bf0a778a8956c48616 (diff)
macOS: Warn the user when KVO-observing QCocoaNSWindow
We recreate the window of our QNSView in various situation such as changing the styleMask, which results in either a new QNSwindow or QNSpanel being set as the window of the view. KVO-observing the window property of the view will fail we then have a new window instance, and will crash when trying to remove the observer from the new window. Unfortunately catching the NSRangeException that happens when removing an observer from a 'switched' window is not possible, so the user is left with: Terminating app due to uncaught exception 'NSRangeException', reason: Cannot remove an observer <Foo 0xabc> for the key path "bar" from <QNSPanel 0xdef> because it is not registered as an observer. Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/testlib')
0 files changed, 0 insertions, 0 deletions