summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoabackingstore.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-03-25 23:20:15 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-03-27 09:00:11 +0000
commit80be47ae06e979a4736b6f86c0ee043d61008ea3 (patch)
treeae620c39d24d7b9b70a58cebde1bd946259f24af /src/plugins/platforms/cocoa/qcocoabackingstore.mm
parent78f774da7087f0ee3aeb853eb6a3d3b7db072414 (diff)
macOS: Fix or ignore deprecated API in 10.14
Fixes: QTBUG-82128 Change-Id: I11abfcf7f245a7a25733625b50e207b07abba289 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoabackingstore.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index cb019c3775..2947c8c885 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -189,7 +189,7 @@ void QNSWindowBackingStore::flush(QWindow *window, const QRegion &region, const
// its parent/ancestor, and the parent/ancestor being the one locked by AppKit.
// In this case we also need to lock and unlock focus manually.
const bool shouldHandleViewLockManually = [NSView focusView] != view;
- if (shouldHandleViewLockManually && ![view lockFocusIfCanDraw]) {
+ if (shouldHandleViewLockManually && !QT_IGNORE_DEPRECATIONS([view lockFocusIfCanDraw])) {
qWarning() << "failed to lock focus of" << view;
return;
}
@@ -263,14 +263,13 @@ void QNSWindowBackingStore::flush(QWindow *window, const QRegion &region, const
// -------------------------------------------------------------------------
if (shouldHandleViewLockManually)
- [view unlockFocus];
+ QT_IGNORE_DEPRECATIONS([view unlockFocus]);
if (drawingOutsideOfDisplayCycle) {
redrawRoundedBottomCorners([view convertRect:region.boundingRect().toCGRect() toView:nil]);
- [view.window flushWindow];
+ QT_IGNORE_DEPRECATIONS([view.window flushWindow]);
}
-
// Done flushing to NSWindow backingstore
QCocoaWindow *topLevelCocoaWindow = static_cast<QCocoaWindow *>(topLevelWindow->handle());