diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-05-10 11:26:51 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-05-11 12:47:56 +0200 |
commit | 1ea0625ca8762787097d33a4acaf3830d7ee104c (patch) | |
tree | 490425c5dc111983734763737f673acf9f5f214d /src/plugins/platforms/cocoa | |
parent | 6da966214391fea20bb7bac94a79ac31e5e86f75 (diff) |
macOS: Replace [QNSView drawRect:] assert with warning
AppKit will in some cases call this method, even if we are layer backed,
just because we implement it. We should remove the implementation, but
doing so requires us to also move from displayLayer to updateLayer for
the layer backed drawing, which requires more testing.
Pick-to: 6.5
Fixes: QTBUG-113500
Change-Id: I70bde34fdb433105d85ccea0514a5342e2c1e725
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_drawing.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_drawing.mm b/src/plugins/platforms/cocoa/qnsview_drawing.mm index 472a5291e7..77fa8259ac 100644 --- a/src/plugins/platforms/cocoa/qnsview_drawing.mm +++ b/src/plugins/platforms/cocoa/qnsview_drawing.mm @@ -178,8 +178,10 @@ - (void)drawRect:(NSRect)dirtyBoundingRect { Q_UNUSED(dirtyBoundingRect); - Q_ASSERT_X(!self.layer, "QNSView", - "The drawRect code path should not be hit when we are layer backed"); + // As we are layer backed we shouldn't really end up here, but AppKit will + // in some cases call this method just because we implement it. + // FIXME: Remove drawRect and switch from displayLayer to updateLayer + qCWarning(lcQpaDrawing) << "[QNSView drawRect] called for layer backed view"; } /* |