diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-08-17 19:01:40 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-08-24 23:54:43 +0000 |
commit | a980250a666bc87e5db006b8668c6af9340915f2 (patch) | |
tree | d9c3f6eca8a9941cf734dca4deea07f272515835 /src/network/access/http2 | |
parent | f537dc0da288949c4df903c1f2b21156e62fbae5 (diff) |
macOS: Deduplicate QNSWindow/QNSPanel code
By sharing the implementations of the methods between QNSWindow and
QNSPanel we don't need a helper, and can remove duplicated code. This
duplication would expand in the future, as for each method added to
the QNSWindowProtocol, we would have to add forwarding functions
in both QNSWindow and QNSPanel, forwarding to QNSWindowHelper, and
then two more functions in QNSWindow and QNSPanel in case we wanted
to call super from the helper, similar to [QNSWindow superSendEvent].
The only snag is that calls to super are hard-coded to a specific
superclass during complication, so we provide our wrapper for
objc_msgSendSuper that resolves the superclass at runtime.
The helper class QSendSuperHelper provides compile time implicit
instantiation of the right template without having to provide
the return type as a template argument, via operator T and
a fallback for the case of no return type via the destructor.
Change-Id: Iaf13f27675d90f884470f5005270ea0d9d0316f3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/network/access/http2')
0 files changed, 0 insertions, 0 deletions