Cocoa: Enable QQuickWidget on Mac OS X.

Change-Id: I0635bf0bfcd49c20987a81c6f8895fc3343fbd20
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
Morten Johan Sørvig 2014-03-17 13:26:26 +01:00 committed by The Qt Project
parent 1cc421eb25
commit a466743f74
4 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,7 @@ public:
QPaintDevice *paintDevice();
void flush(QWindow *widget, const QRegion &region, const QPoint &offset);
QImage toImage() const Q_DECL_OVERRIDE;
void resize (const QSize &size, const QRegion &);
bool scroll(const QRegion &area, int dx, int dy);
CGImageRef getBackingStoreCGImage();

View File

@ -96,6 +96,11 @@ void QCocoaBackingStore::flush(QWindow *win, const QRegion &region, const QPoint
}
}
QImage QCocoaBackingStore::toImage() const
{
return m_qImage;
}
void QCocoaBackingStore::resize(const QSize &size, const QRegion &)
{
m_requestedSize = size;

View File

@ -194,7 +194,7 @@ void QCocoaGLContext::swapBuffers(QPlatformSurface *surface)
bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface)
{
Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
Q_ASSERT(surface->surface()->supportsOpenGL());
QCocoaAutoReleasePool pool;

View File

@ -375,6 +375,7 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
case WindowMasks:
case MultipleWindows:
case ForeignWindows:
case RasterGLSurface:
return true;
default:
return QPlatformIntegration::hasCapability(cap);