diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-13 14:49:01 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-27 13:08:24 +0000 |
commit | 7f507c16202003e834863b8f26213c5e1c06fd0e (patch) | |
tree | 8702dbe9524ada5b6617714e4f297fe77e25a129 /mkspecs/freebsd-g++ | |
parent | d04207342ea4d22e42257eb0adc1048fd2e068b4 (diff) |
macOS: Decouple NSWindow notifications and delegate callbacks from QNSView
The logic for handling NSWindow events was split partly between QNSView
observing notifications, and QNSWindowDelegate implementing direct delegate
callbacks. The logic of how to handle the events was then split further
by sometimes handling the event in the delegate callback or notification
handler, and sometimes forwarding the event to QCocoaWindow.
We now handle most events via notifications, and propagate these directly
to QCocoaWindow, so that all the logic is in one place. This improves the
situation for foreign windows, since we're not relying on having a QNSView,
or being able to inject our QNSWindowDelegate.
To keep code duplication to a minimum and risking missing a notification
in the forwarding logic, the logic is based on QMetatType and QMetaMethod
tags, so that the notifications are declared in the header file, along
with the handler function.
Change-Id: I2fb6372010048a8a1f6e4426b988a3f6f5abdbab
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'mkspecs/freebsd-g++')
0 files changed, 0 insertions, 0 deletions