Cocoa: Remove qt_mac_toCGImage warnings

We got these because we were flushing the backing store with a
null QImage.

Change-Id: I372cb3fc7c82d3bdcfe735fcadfa72806d0ef39b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-02-26 15:31:23 +01:00 committed by The Qt Project
parent e433553c1b
commit 48d39a01a7

View File

@ -90,8 +90,10 @@ void QCocoaBackingStore::flush(QWindow *win, const QRegion &region, const QPoint
// m_cgImage is only a reference to the data inside m_qImage, it is not a copy.
CGImageRelease(m_cgImage);
m_cgImage = 0;
if (QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(win->handle()))
[cocoaWindow->m_contentView flushBackingStore:this region:region offset:offset];
if (!m_qImage.isNull()) {
if (QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(win->handle()))
[cocoaWindow->m_contentView flushBackingStore:this region:region offset:offset];
}
}
void QCocoaBackingStore::resize(const QSize &size, const QRegion &)