From 80be47ae06e979a4736b6f86c0ee043d61008ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 25 Mar 2020 23:20:15 +0100 Subject: macOS: Fix or ignore deprecated API in 10.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-82128 Change-Id: I11abfcf7f245a7a25733625b50e207b07abba289 Reviewed-by: Tor Arne Vestbø Reviewed-by: Volker Hilsheimer --- src/plugins/platforms/cocoa/qcocoabackingstore.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoabackingstore.mm') 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 ®ion, 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 ®ion, 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(topLevelWindow->handle()); -- cgit v1.2.3