summaryrefslogtreecommitdiffstats
path: root/tests/manual/cocoa/qt_on_cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Clean up our Objective-C usageJake Petroules2018-02-201-18/+14
| | | | | | | | | | | | | | | | - Move ivars into @implementation - Use instancetype where applicable - Use dot notation for property access - Use subscript operator for dictionaries and arrays - Format selectors consistently - Use proper style for init methods - Use generics instead of void pointers where possible - Use "range for" loops instead of indexing - Replace or replace IBAction/IBOutlet with void Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Deliver NSWindow notifications to all windows, not just top levelTor Arne Vestbø2017-09-262-5/+13
| | | | | | | | | | | | | | | | | | Child QWindows (or in the case of QWindows embedded in native applications: top level QWindows where the corresponding NSView is a child of another view, so not being the contentView of its window), still need some of the NSWindow notifications to e.g. update their exposed state when the window becomes visible. We make sure to send the notification to all QCococaWindow children of the relevant NSWindow, and let each callback decide if it should only apply to content views. This fixes an issue where a QWindow would never be exposed if the window was a child NSView and added to a NSWindow that was yet to be shown. Change-Id: I7f7df8bc5f4ca3ac553a2c146f8c3229b197c059 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Respect responder chain when setting cursorTor Arne Vestbø2017-09-012-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need for us to walk our own ancestor chain to figure out which cursor to set. AppKit will automatically call cursorUpdate: on the view that would be the hitTest target of the current mouse position, and by falling back to super when no cursor is set for the current view, we automatically get the behavior that effectiveWindowCursor tried to solve. In addition, it solves the case of applyEffectiveWindowCursor applying the arrowCursor when no cursor was set, which would mean that if any native parent view of our view _did_ have a cursor set, we would not fall back to the native view's cursor, but instead override it with the arrow cursor. Following the responder chain gives the correct behavior in this case. Unfortunately, due to rdar://34183708, if a subview of one of our views uses the legacy cursorRect approach to cursor management, the cursor will not be reset back to our cursor via cursorUpdate: when leaving the child and entering the parent view (our view). Moving our implementation over to the legacy API would solve this problem, but just propagate it to native parent views of our views, which could potentially use NSTrackingAreas, and would not have _their_ cursors re-set. Change-Id: Id20cc03136f0b1d4b9120750fe63ddc455363aaf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Update qt_on_cocoa manual testTor Arne Vestbø2017-08-313-24/+32
| | | | | | | | | | - Add view to contentView, to allow checking parent view interaction - Render via requestUpdate instead of manual timer - Add two windows to check subview interaction Change-Id: Ib028e62f585d45e42c0429e69ea6f45c8a90fe54 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Updated license headersJani Heikkinen2016-01-213-51/+36
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Link to AppKit instead of Cocoa.Jake Petroules2015-09-052-2/+2
| | | | | | | | | | | | | Cocoa is basically just AppKit + CoreData. Since we do not use CoreData in Qt, there is no reason to link to it or (transitively) import its headers. This is just a mechanical replacement of -framework Cocoa with -framework AppKit and <Cocoa/Cocoa.h> with <AppKit/AppKit.h> Change-Id: Ibcfc8a03c0ddff27a67fbc87dd7bd58a4b648956 Reviewed-by: Mika Lindqvist <postmaster@raasu.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Clean up qt_on_cocoa manual test.Morten Johan Sørvig2015-04-304-169/+53
| | | | | | | | | | | Focus the test on embedding QWindow: Remove the NSToolBar code. Use standard NSApplication startup code. Use winId() to access the NSView instead of QPlatformNativeInterface (which is gui-private). Rename Window -> RasterWindow. Change-Id: Ie98cb73020d2721743bb665b89b17f07f2bf984b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-113-36/+28
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-242-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* qpa: Rename qwidgetwindow_qpa_p.h to qwidgetwindow_p.hTor Arne Vestbø2014-05-201-1/+1
| | | | | Change-Id: I24835b86194653e89c0bacefd22ddbff06b6e97b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* tests: make qt_on_cocoa build againLiang Qi2013-11-041-1/+1
| | | | | | | QPA was public since 36547f4eff44361f7a6acd0cff107c0e47561f93. Change-Id: I838cc0736dc75e5301dd41f3ea89848f300443d4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-183-3/+3
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-223-72/+72
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Build manual tests.Friedemann Kleint2012-04-121-1/+1
| | | | | | | | Add a toplevel manual.pro and other .pro-files to build them and fix the build. Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-303-3/+3
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-233-3/+3
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-053-3/+3
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QCocoaWindow independent of NSWindow.Morten Sorvig2011-12-144-0/+502
QCocoaWindow now gets resize events from QNSViev and does not require a NSWindow. QWindow instances can now be inserted in NSView hierarchies. This is useful for Qt-as-a-plugin use cases and is needed to implement QMacNativeWidget for Qt 5. Change-Id: Ia95ea9c22a15a3e62d1e6543466cff07390c70a2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>