summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnswindow.h
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Determine opaqueness and backgroundColor of NSWindow declarativelyTor Arne Vestbø2017-08-301-0/+2
| | | | | | | | | Instead of imperatively trying to keep the logic consistent in many different call sites. Task-number: QTBUG-61909 Change-Id: I8d647690c47656f34673555a8a8aa3ec6ffc73d1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Deduplicate QNSWindow/QNSPanel codeTor Arne Vestbø2017-08-241-43/+7
| | | | | | | | | | | | | | | | | | | | | | 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>
* macOS: Remove workaround for crash when closing window from title barTor Arne Vestbø2017-06-291-1/+0
| | | | | | | | | The platform window is now protected by a QPointer, so we don't need to juggle the NSWindow retain count. Task-number: QTBUG-37287 Change-Id: Id55ea311f0793370e248aa58cc8e383b574fbb40 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Remove unneeded Objective-C instance variable declarationsTor Arne Vestbø2017-06-291-7/+0
| | | | | | | | And their corresponding synthesizations. The compiler will take care of it for us. Change-Id: Ifa42e0732059008af6f3f65151bf203a1a19079d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Remove workaround for grabbing child NSWindowsTor Arne Vestbø2017-06-281-4/+0
| | | | | | | | The code was introduced in 28c9c2ea50, but child NSWindows are no longer supported, so we can simplify the code by removing it. Change-Id: Ic98b8b0e0a84d5f2adba1840bd8318de2be031b6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Make QCocoaNSWindow header file slightly more readableTor Arne Vestbø2017-06-271-18/+14
| | | | | Change-Id: I09ac42af476feb1d561a77f68999a2754a2e252e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Move QNSWindow implementation into separate fileTor Arne Vestbø2017-06-211-0/+124
Change-Id: Ie75419c7ffb7a8fdf78d53e1ea14afee63ef1656 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>