From 1dcc53f6faf53a2994c6b9fe329d35fdaf61c06e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?=
 <morten.sorvig@theqtcompany.com>
Date: Fri, 11 Mar 2016 12:48:11 +0100
Subject: [PATCH] Compile with -no-opengl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

QCocoaBackingstore::toImage() can only be Q_DECL_OVERRIDE
if QPlatformBackingStore::toImage() is present, which
it isn’t for NO_OPENGL builds.

Change-Id: Ib116f40fd26defb29a8d520d3e3fb104d8da8d57
Task-number: QTBUG-51694
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
---
 src/plugins/platforms/cocoa/qcocoabackingstore.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index 5a199de4a5c..934f68ad184 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.h
@@ -51,7 +51,11 @@ public:
 
     QPaintDevice *paintDevice() Q_DECL_OVERRIDE;
     void flush(QWindow *widget, const QRegion &region, const QPoint &offset) Q_DECL_OVERRIDE;
+#ifndef QT_NO_OPENGL
     QImage toImage() const Q_DECL_OVERRIDE;
+#else
+    QImage toImage() const; // No QPlatformBackingStore::toImage() for NO_OPENGL builds.
+#endif
     void resize (const QSize &size, const QRegion &) Q_DECL_OVERRIDE;
     bool scroll(const QRegion &area, int dx, int dy) Q_DECL_OVERRIDE;
     void beginPaint(const QRegion &region) Q_DECL_OVERRIDE;
-- 
GitLab