From 9e2f959060d8767f8710e113621c0004f21ace93 Mon Sep 17 00:00:00 2001
From: Yuqing Zhu <carol.zhu@nxp.com>
Date: Fri, 11 May 2018 13:51:55 +0800
Subject: [PATCH] tst_client.cpp: Fix no-opengl build error

The error is introduced by bf09c7a1493c01a65ee0f110b37a04e653edc08e

Upstream-Status: Pending

Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
 tests/auto/client/client/tst_client.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 874de82c..af414d4f 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -107,6 +107,7 @@ public:
     QPoint mousePressPos;
 };

+#ifndef QT_NO_OPENGL
 class TestGlWindow : public QOpenGLWindow
 {
     Q_OBJECT
@@ -136,6 +137,7 @@ void TestGlWindow::paintGL()
     glClear(GL_COLOR_BUFFER_BIT);
     ++paintGLCalled;
 }
+#endif // QT_NO_OPENGL

 class tst_WaylandClient : public QObject
 {
@@ -180,8 +182,10 @@ private slots:
     void dontCrashOnMultipleCommits();
     void hiddenTransientParent();
     void hiddenPopupParent();
+#ifndef  QT_NO_OPENGL
     void glWindow();
     void longWindowTitle();
+#endif // QT_NO_OPENGL

 private:
     MockCompositor *compositor = nullptr;
@@ -558,6 +562,7 @@ void tst_WaylandClient::hiddenPopupParent()
     QTRY_VERIFY(compositor->surface());
 }

+#ifndef  QT_NO_OPENGL
 void tst_WaylandClient::glWindow()
 {
     QSKIP("Skipping GL tests, as not supported by all CI systems: See https://bugreports.qt.io/browse/QTBUG-65802");
@@ -583,6 +588,7 @@ void tst_WaylandClient::glWindow()
     testWindow->setVisible(false);
     QTRY_VERIFY(!compositor->surface());
 }
+#endif // QT_NO_OPENGL

 void tst_WaylandClient::longWindowTitle()
 {
--
2.20.1

