summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* QCocoaDrag - avoid using the deprecated API if possibleTimur Pocheptsov2020-05-083-1/+104
| | | | | | | | | | | | | | | | | | | | | The -dragImage stopped to work in 10.14 first with change in behavior documented and the new API (AppKit) proposed/advised. Then after some update the old behavior was restored and D&D for multiple URLs was working again without us having to change anything. In 10.15 it's not working anymore and we have to properly fix it and switch to the API advised. The new API is non-blocking, but QCocoaDrag::drag is expected to be blocking so we have to add a nested event loop to emulate the old behavior. Dragging image is a bit problematic (the exception is thrown because number of images (1) and number of items in NSPasteboard are not equal): creating separate images for different drag items looks really messy. So ... we use the same image again and again with the same frame. Fixes: QTBUG-71939 Change-Id: I02c2a10eab280cf4a55513adaf29c22fff934c01 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QStringView: add toNSString() / toCFString()Marc Mutz2020-05-081-1/+1
| | | | | | | | | | | | | | Use it in QString and QCocoaMenuItem. As a drive-by, s,OS X,\macos,g. [ChangeLog][QtCore][QStringView] Added toNSString(), toCFString() on macOS. Change-Id: Ib05818015a4be11a0d72d4487fb82c580d27854e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-046-21/+129
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * Merge remote-tracking branch 'origin/5.15.0' into 5.15Qt Forward Merge Bot2020-04-301-1/+4
| |\ | | | | | | | | | Change-Id: I1b46a9485d86f4d8ea104df31366fb6ad16a4654
| | * macOS: Avoid modifying hash while iterating itTor Arne Vestbø2020-04-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCocoaTouch sneakily updated the list of active touches in the destructor, causing problems when we switched from Q_FOREACH to ranged-for. Fixes: QTBUG-83876 Change-Id: If7ec9e9116b7eb581580b461ae12ad70c739906d Reviewed-by: Simon Hausmann <hausmann@gmail.com>
| * | Merge remote-tracking branch 'origin/5.15.0' into 5.15Liang Qi2020-04-285-18/+114
| |\| | | | | | | | | | Change-Id: I42afd73badf41ac990ff9cf8c6bc650850d2dacf
| | * Cocoa: If the grabRect is null then add in a null image for the areaAndy Shaw2020-04-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If it is null then it has nothing to grab, so a null QImage and QRect is added to the lists so that there is still a representation in some form for that display. This additionally ensures that it does take up space for the display in the final image too. Fixes: QTBUG-63086 Change-Id: I6e80ecc1170642025f6930e2211017c114e25c16 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Merge 5.15 into 5.15.0Alexandru Croitor2020-04-231-2/+4
| | |\ | | | | | | | | | | | | Change-Id: Ib5251a8cb59693f076da7f75b86bfb6767bdf958
| | * | macOS: Restore fallback sizes when setting application or window iconsTor Arne Vestbø2020-04-202-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We removed this logic in 059c3ae66a under the assumption that the icon would always provide a set of sizes, but for SVG icons this is not the case. Change-Id: Ib3cc5740bca32cf4068a71baf99b52fa536da2ca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | macOS: Support [NSPanel becomesKeyOnlyIfNeeded]Tor Arne Vestbø2020-04-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't set this flag ourselves, but clients may do via winId(). If set, the panel will only activate if a view with needsPanelToBecomeKey is clicked. We do not implement needsPanelToBecomeKey in QNSView, which we ideally should, by e.g. looking at the IME hints. This still works as expected, as QtWidgets will make sure to activate the window as part of the normal focus handling. For other use-cases the user will have to catch the mouse event and activate the window manually. Change-Id: I4bacdd44b2f7df5920c6334806303bb5eb502b48 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | macOS: Activate non-modal windows during modal session if they support itTor Arne Vestbø2020-04-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 593ab638609e ensured that non-modal windows would not be activated during a modal session, which makes sense for windows that can't be interacted with. But some windows can, and we should activate them as normal. Task-number: QTBUG-46304 Change-Id: I4a9b7ec53157b042d4d6e9535336fa3254f41e0e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | macOS: Rework worksWhenModal and update on modal session changeTor Arne Vestbø2020-04-172-11/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of basing the worksWhenModal property on the window type, which will include both windows inside the current modal session (as intend), but also windows below the current modal session (wrongly), we check to see if the window is a transient child of the current top level modal window. Going via NSApp.modalWindow means we also catch cases where the top level modal session is run by a native window, not part of the modal session stack in the Cocoa event dispatcher. The new logic relies on windows such as popups, dialogs, etc to set the correct transient parent, but this seems to be the case already. To ensure the window tag is also updated, we call setWorksWhenModal on modal session changes. We could change worksWhenModal into e.g. shouldWorkWhenModal and always use the setter, but that would mean the initial window tag update in [NSWindow _commonAwake] would pick up the incorrect value. And if the window tag is not updated after that due to the workaround in [QNSPanel setWorksWhenModal:] being compiled out, the window would not be possible to order front, which is worse than being able to order front a window with worksWhenModal=NO. Fixes: QTBUG-76654 Task-number: QTBUG-71480 Change-Id: I38b14422d274dcc03b4c7d5ef87066e282ed9111 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | macOS: draw toolbar separator line in unfifed modeMorten Johan Sørvig2020-04-281-2/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 836a2fb8 changed the contentBorderThickness property to also include the title bar height, in order to position sheets correctly when unified toolbar mode is enabled. As an accidental side effect this made Qt stop drawing the toolbar separator line. Account for the added title bar height also in testContentBorderAreaPosition(). Task-number: QTBUG-78110 Change-Id: I4ecfd010a6784bbb592646affc676d8cbfd9b6da Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | macOS: Remove copy of QT_IGNORE_DEPRECATIONSTor Arne Vestbø2020-04-301-8/+0
| | | | | | | | | | | | | | | | | | | | | It lives in qcompilerdetection.h now. Change-Id: I7eb227b2a66997a7fd9e439a6dd21f398820f012 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | macOS/iOS: set focus reason when handling window deactivationVolker Hilsheimer2020-04-292-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the focusOutEvent to e.g. a QQuickItem losting focus will be OtherFocusReason when the window it's becomes inactive. Task-number: QTBUG-70319 Change-Id: Ic3762e68d92a88becd2b35612b14f6af64ee934e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-271-2/+4
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-271-2/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qstringliteral.h Change-Id: I1665af3ce537471b249def5e080b39bd4105189e
| | * | macOS: Don't optimize out aggressive backingstore flushes when single-bufferedTor Arne Vestbø2020-04-221-2/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing the layer contents to the backingstore surface doesn't make sense when we're single buffered since we're always using the same surface. And once Core Animation has picked up on the surface it's not enough to just keep drawing to it, we also need to tell Core Animation that the contents has changed. Change-Id: I517a0b7a3ba7e9d96033465c9bd5a192985643ac Fixes: QTBUG-81071 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | / CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-272-2/+2
|/ / | | | | | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove deprecated ApplicationAttribute enum valuesVolker Hilsheimer2020-04-241-1/+0
| | | | | | | | | | | | | | | | In the declaration, leave them in as comments so that the gaps in the numbering of the values doesn't create confusion. Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-2241-513/+157
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| * macOS: Remove a bunch of dead (forward) declarationsTor Arne Vestbø2020-04-1519-270/+25
| | | | | | | | | | Change-Id: I402668a17b48c164658f775bacd832615a6d2587 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * macOS: Clean up header includes to use quotes or brackets as appropriateTor Arne Vestbø2020-04-1512-47/+50
| | | | | | | | | | | | | | | | The includes can be sorted and unified even more, but that's left for another rainy day. Change-Id: I4d5670d6d8389f69d2631b83b8f421d1f685a0f9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix deprecation warnings in QCocoaCursorVolker Hilsheimer2020-04-142-9/+9
| | | | | | | | | | | | | | | | | | | | | | Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and fix the API taking those to use const references rather than pointers or const values. Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b61ea367a5f8d07afda36b49b039b2375142d7f4) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * macOS: Replace foreach with ranged for loopsTor Arne Vestbø2020-04-149-10/+12
| | | | | | | | | | Change-Id: I9d0dbb60e05e4ef85219740465bb941ef8d8eb0f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * macOS: Move translations to their respective source filesTor Arne Vestbø2020-04-147-192/+74
| | | | | | | | | | | | | | | | | | | | lupdate can deal with Objective-C++ sources nowadays, most likely due to appending them to SOURCES instead of the deprecated OBJECTIVE_SOURCES. Task-number: QTBUG-30125 Change-Id: Ifc6b06f13e0f679a011d999f11c2e6d25dcf27ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-084-28/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * qpa: Remove references to lighthouseTor Arne Vestbø2020-04-032-3/+1
| | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-272-25/+68
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I539d8cae5fd413b8a6c9c5d8a6364c79c8133a0a
| | * macOS: Flush sublayers via separate IOSurface backingstoresTor Arne Vestbø2020-03-252-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing sublayers via QImage copies of the root IOSurface was causing performance regressions due to the constant allocations of new images each frame. We now re-use the QCALayerBackingStore implementation for sublayers, which gives a dynamic swap-chain. We're still paying the CPU cost of the copy from the root backingstore to the layered backingstores, as well as the memory cost, but at least improves the situation. We do not try to be smart and paint directly into the sublayers, as that would leave the root backingstore stale, potentially causing glitches when views are repositioned. Investigating this is left for future work. Fixes: QTBUG-82986 Change-Id: I758a3d8e1e40e2ed4fe6bc590a4a5a988d87a3a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ce2d68ebe1aefeae78ff2fd8ec5ff7e20790ef69)
* | | Resolve QWidget window handle without depending on QtWidgetsTor Arne Vestbø2020-04-021-15/+10
| | | | | | | | | | | | | | | Change-Id: If5b2f17283193d7a1718f476b72f380e9e67d0f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fix deprecation warnings in QCocoaCursorVolker Hilsheimer2020-03-302-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and fix the API taking those to use const references rather than pointers or const values. Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | macOS: Fix or ignore deprecated API in 10.14Tor Arne Vestbø2020-03-278-32/+38
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82128 Change-Id: I11abfcf7f245a7a25733625b50e207b07abba289 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fix deprecation warnings from NSColor(Space) with macOS 10.14 SDKVolker Hilsheimer2020-03-231-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for handling color spaces by names is deprecated in recent AppKit versions, and should be replaced by using NSColor.type, and operations on the type-specific properties of the color. Merge the two implementations from qcoregraphics.mm and qcocoacolordialoghelper.mm, which also fixes the inconsistent interpretation of color components as device dependent (in qcoregraphics) or generic (in qcocoacolordialoghelper). We now always populate the QColor with device independent components. Change-Id: Id79c609736ff1962bebe4bd7158781a6d1b4475e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-169-261/+116
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| * | macOS: Ensure GL symbols are resolved from the OpenGL frameworkLucas Wang2020-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The app or its dependencies may link against X11's libGL.1.dylib from XQuarz, to support GLX on macOS. Doing so may place libGL earlier in the load order than Apple's OpenGL framework, which results in dlsym picking symbols from libGL when using the RTLD_DEFAULT lookup strategy, breaking Qt's OpenGL support in various ways: QOpenGLShaderProgram: could not create shader program Warning: "" failed to compile! To fix this we use RTLD_NEXT, which looks up the symbol in dependency order of the image that called dlsym, rather than the global load order. Change-Id: I1ec3055a4ab0bb96566c7e196d301b30785f2dc0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | macOS: Modernize QCocoaSystemTrayIconTor Arne Vestbø2020-03-142-200/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code had not been touched in a very long time and was overgrown with weeds from pre-QPA times. We no longer maintain an indirection through QSystemTrayIconSys, which was a remnant from Qt 4 times. The Objective-C helper class used for callbacks has been slimmed down to just a simple delegate, with the actual work done in the QCocoaSystemTrayIcon implementation, further reducing indirection. We no longer use a custom NSView for the status bar item, something that has been deprecated for a long time. Instead we set properties on the NSStatusItem's button. This gives us automatic support for drawing the icon with the right highlight, including in dark mode. Finally, the code has been updated to modern Objective-C syntax. Change-Id: I59706081f6b179035b8216a7a6ebc08a47cec127 Fixes: QTBUG-77189 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | macOS: Pass on QCursor pixmap with original scaleTor Arne Vestbø2020-03-121-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to scale the cursor down to 1x, since we're now passing the correct device pixel ratio on to the NSImage by setting its size. Letting macOS deal with the scaling produces a higher resolution cursor. Change-Id: Icdb3d59998f9a32094c2973c3b222cf22b6398ac Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: Pass on QIcon as NSImage if possible, instead of going via QPixmapTor Arne Vestbø2020-03-122-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QIcon can be turned into a NSImage directly, with all the supported representations that the icon contains. This allows macOS to choose the best representation for whatever context it's rendering the NSImage in, and will likely do a better job of scaling it if none of the sizes fit target context. This fixes e.g. application window icons not taking retina screens into account. Change-Id: Idbd97cae4ef50cc0dd3f38c355cfceec007e0d19 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: Streamline QIcon to NSImage conversionTor Arne Vestbø2020-03-122-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion uses NSBitmapImageRep and correctly sets the display pixel ratio and size of the resulting image, reducing the need for clients to deal with this. It also propagates the isMask property of the icon to the NSImage. The function returns an auto-released object, as is customary for class-functions like these. Change-Id: If97f3d383959cd0f58a0d1249f5c26e52c1da9cd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: Streamline QImage to NSImage conversionTor Arne Vestbø2020-03-126-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion uses NSBitmapImageRep and correctly sets the display pixel ratio and size of the resulting image, reducing the need for clients to deal with this. The function returns an auto-released object, as is customary for class-functions like these. Change-Id: I5124d1d8145a7f5266921b22fda1987798771ec1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: Log occlusion state changesTor Arne Vestbø2020-03-121-1/+3
| | | | | | | | | | | | | | | Change-Id: I5a0a3a96a59a1eae42fa94f2f9f406f22807a354 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Get rid of QRegExp usage in the cocoa pluginLars Knoll2020-03-152-4/+9
| | | | | | | | | | | | | | | Change-Id: I9789e1637a17809082458e946fa7c49ab9269537 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-111-0/+1
|\| | | | | | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * | macOS: Disable system provided tabbing by defaultTor Arne Vestbø2020-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macOS 10.12 introduced automatic window tabbing, where the OS provides tab handling on behalf of the application. The feature defaulted to being on, and the release notes asked applications that had their own tab handling to disable the automatic tab handling explicitly. Qt has its own tab handling, and should therefore disable the automatic handling. We do this on a per NSWindow basis, using the tabbingMode property of the window, instead of the global allowsAutomaticWindowTabbing property on NSWindow, so that individual windows can still opt in to the automatic tab handling. Doing it via the tabbingMode property also ensures that we're not affecting the host application's behavior in a plug-in setting. Ideally Qt's tab handling should read the userTabbingPreference property of NSWindow to pick up the system preference choice of whether to open new windows as standalone windows or tabs, but this is left for a later change. An alternative would also be to use the automatic window tabbing instead of our own implementation. Fixes: QTBUG-61707 Change-Id: Icf2078b63ec16202ff7fd83ea264a48dc61978e1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Initial cleanup of qevent.h for Qt6Allan Sandfeld Jensen2020-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Takes care of the first round of todos and deprecations for Qt6 in qevent. Not touching anything that might interfere with changing the class hierarchy as the file also suggest. Change-Id: If72d63d8932f1af588785bf77b34532358639a63 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-045-36/+63
|\| | | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| * | macOS: Don't create QMacCGContext when printingTor Arne Vestbø2020-03-041-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We adopt the context of the print session, so the code is not needed, and would just produce a warning since QMacCGContext didn't know what to do about the printer paint device. Change-Id: I9ac079f5cb5d98022045632592d0e375710eecc3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: Reduce save dialog extension filters to their last componentTor Arne Vestbø2020-03-041-19/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NSSavePanel does not deal well with multi-part extensions, to the point where it will fail to open if that's the only acceptable extension. We follow Chromium's lead here and reduce the extension to its last component, which enables selecting and saving files such as 'foo.tar.gz'. To improve the user experience we always show file extensions when we detect a multi-part extension. This makes it clearer what the final extension will be, and avoids confusing macOS about the intention of the user when choosing a file that without the final extension also matches another known extension. Fixes: QTBUG-38303 Fixes: QTBUG-44227 Change-Id: Id0cee84f758c2cd59fcf1b339caa30f7da07dd1e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Do not constantly create new surfaces with MoltenVK on macOSLaszlo Agocs2020-03-033-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Querying the VkSurfaceKHR for a window is expected to create the surface once and then return the same value afterwards. Task-number: QTBUG-82600 Change-Id: Ib3e99dfca4d940de1a14348eb1909d372a7dde04 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>