From patchwork Wed Dec 29 23:45:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1574066 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PbpW+9o4; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JPShH1mGmz9s1l for ; Thu, 30 Dec 2021 10:45:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3CCBE81320; Wed, 29 Dec 2021 23:45:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vT91xaR0NQKk; Wed, 29 Dec 2021 23:45:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id D686681328; Wed, 29 Dec 2021 23:45:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 58CDB1BF280 for ; Wed, 29 Dec 2021 23:45:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4668A402DC for ; Wed, 29 Dec 2021 23:45:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b6OailkfngWl for ; Wed, 29 Dec 2021 23:45:24 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9969D402A8 for ; Wed, 29 Dec 2021 23:45:24 +0000 (UTC) Received: by mail-pl1-x62d.google.com with SMTP id z3so16813339plg.8 for ; Wed, 29 Dec 2021 15:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IX6BoH7xSipIe4KRSXY2UZoJ70z5kYv9G0v7sKk98zI=; b=PbpW+9o4zEc1YuD3nqPhXESkDw4+Xk3dU6ZEmwE+cHXUW+UKW3HyiIjJhgljuIk/Gu gQimUQuJ6P7+l7a1dzNT3Too0K54AMS56VLVA95Gci6tAMdKxa9iM27ikGP4t9ndQAcr jsLmK7VMRocJaTLf7rV4Y7iNb8gEm/teJv+FPjtP7GNzwanLB6IdkHYWmZM6kseXdNuL T8ZO8eMneS4X9E9/SirIvaS2UWtxFTQ6dS4ZMpiGkf4wYG2+0mNShOpLEiHsoFjiI5Ai 9EvCSJ1Y2AMwpmnqVvTkGb2uiKxkOrxpu4bcarIMLe5W76GRfxqFobzwfvdOkXtHPk7N fNJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IX6BoH7xSipIe4KRSXY2UZoJ70z5kYv9G0v7sKk98zI=; b=SuDs1AX02gf2CZaV3YsZvIsv5p0ZykRNByvNcNoaCA1BItrdxhDNFbWTkvEB3r35Rl bsFAJfikgXLhKW1j2qAFKqsFEosayH21H3URoYqAg92x3iFqtqHpSdr3TUD7hjniW+zP 6x3z2C91anKdHssj0qc8ABgtpprGNJDWlGYX+DzDAaarlJdMyVER2fp6UrktDnvXky+j VI0QU1Bqyf08R8OE2KyNKNF/HajN4oRet+sHjd2H3RDl4dyB1sN2GlBeMyPrH3JPkjzw cySGDrcQQ8QnCedXu4RDa8c0c+PtdOoa+7Ua+fSiqDyfmvoiWkv0ND2i0Kb5iO07PTJr ulSA== X-Gm-Message-State: AOAM531aMaTy69wf1E8oZOHmMZenzmwm1KetE9mfDWErLntZu+BeUmW4 ZtPMQYN2akLPua3G8XVNkM7dqz/hX6U= X-Google-Smtp-Source: ABdhPJwWjz0ys4AFj//x+2UFtBW+2v5Tq1yyhGgrjcLCjG9I2thUvoFfh23gT8tSMT6mJ+sUNKvUjA== X-Received: by 2002:a17:902:b58d:b0:149:9c02:6345 with SMTP id a13-20020a170902b58d00b001499c026345mr5758468pls.21.1640821523625; Wed, 29 Dec 2021 15:45:23 -0800 (PST) Received: from adam-workstation.rai.com ([47.149.13.137]) by smtp.gmail.com with ESMTPSA id b4sm23482281pjm.17.2021.12.29.15.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 15:45:23 -0800 (PST) From: Adam Duskett To: buildroot@buildroot.org Date: Wed, 29 Dec 2021 15:45:20 -0800 Message-Id: <20211229234520.2957740-1-aduskett@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/qt5/qt5location: Fix build failures without opengl X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Seiderer , Julien Corjon , Adam Duskett Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Backport a patch that fixes several "const marked override but does not override" compilation errors when openGL is not enabled. Patch fetched from: https://codereview.qt-project.org/c/qt/qtlocation/+/340353 Fixes: http://autobuild.buildroot.net/results/6378e43d50dfad13a45522492f14c9df7acd64e4 Signed-off-by: Adam Duskett --- ...fix-compilation-for-no-opengl-builds.patch | 528 ++++++++++++++++++ 1 file changed, 528 insertions(+) create mode 100644 package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch diff --git a/package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch b/package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch new file mode 100644 index 0000000000..98e65df202 --- /dev/null +++ b/package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch @@ -0,0 +1,528 @@ +From 4bcacd0dc8f73de7b9e5e5f5fa2129fd88bdff3b Mon Sep 17 00:00:00 2001 +From: Michal Klocek +Date: Mon, 11 Jan 2021 16:02:14 +0100 +Subject: [PATCH] Fix compilation for no opengl builds + +Disables experimental labs qml plugin, which +since a4469cad40 depends heavily on opengl backend. + +Fix warnings with msvc when compiling without experimental +plugin. + +Task-number: QTBUG-91623 +Fixes: QTBUG-88017 +Change-Id: I53c5da915981bd05f39134ba57f585d0a0786aa8 + +Signed-off-by: Michal Klocek +Signed-off-by: Alex Blasche + +[Retrieved from: https://codereview.qt-project.org/c/qt/qtlocation/+/340353] +Signed-off-by: Adam Duskett +--- + src/location/configure.json | 1 + + .../qdeclarativecirclemapitem.cpp | 20 +++++++++++-- + .../qdeclarativecirclemapitem_p_p.h | 2 ++ + .../qdeclarativepolygonmapitem.cpp | 27 +++++++++++++---- + .../qdeclarativepolygonmapitem_p_p.h | 6 ++++ + .../qdeclarativepolylinemapitem.cpp | 30 +++++++++++++++---- + .../qdeclarativepolylinemapitem_p.h | 2 ++ + .../qdeclarativepolylinemapitem_p_p.h | 5 +++- + .../qdeclarativerectanglemapitem.cpp | 17 +++++++++-- + .../qdeclarativerectanglemapitem_p_p.h | 2 ++ + src/location/location.pro | 9 +++++- + .../itemsoverlay/qgeomapitemsoverlay.cpp | 9 +++++- + 12 files changed, 109 insertions(+), 21 deletions(-) + +diff --git a/src/location/configure.json b/src/location/configure.json +index 62ab029..6d01a9a 100644 +--- a/src/location/configure.json ++++ b/src/location/configure.json +@@ -9,6 +9,7 @@ + "label": "Qt.labs.location experimental QML plugin", + "purpose": "Provides experimental QtLocation QML types", + "section": "Location", ++ "condition": "config.opengl", + "output": [ "privateFeature" ] + }, + "geoservices_osm": { +diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp +index 841c29a..955de2c 100644 +--- a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp ++++ b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp +@@ -446,6 +446,7 @@ void QDeclarativeCircleMapItem::updatePolish() + */ + void QDeclarativeCircleMapItem::possiblySwitchBackend(const QGeoCoordinate &oldCenter, qreal oldRadius, const QGeoCoordinate &newCenter, qreal newRadius) + { ++#if QT_CONFIG(opengl) + if (m_backend != QDeclarativeCircleMapItem::OpenGL) + return; + +@@ -459,6 +460,9 @@ void QDeclarativeCircleMapItem::possiblySwitchBackend(const QGeoCoordinate &oldC + QScopedPointer d(static_cast(new QDeclarativeCircleMapItemPrivateOpenGL(*this))); + m_d.swap(d); + } ++#else ++ return; ++#endif + } + + /*! +@@ -534,9 +538,17 @@ void QDeclarativeCircleMapItem::setBackend(QDeclarativeCircleMapItem::Backend b) + if (b == m_backend) + return; + m_backend = b; +- QScopedPointer d((m_backend == Software) +- ? static_cast(new QDeclarativeCircleMapItemPrivateCPU(*this)) +- : static_cast(new QDeclarativeCircleMapItemPrivateOpenGL(*this))); ++ QScopedPointer d( ++ (m_backend == Software) ? static_cast( ++ new QDeclarativeCircleMapItemPrivateCPU(*this)) ++#if QT_CONFIG(opengl) ++ : static_cast( ++ new QDeclarativeCircleMapItemPrivateOpenGL(*this))); ++#else ++ : nullptr); ++ qFatal("Requested non software rendering backend, but source code is compiled wihtout opengl " ++ "support"); ++#endif + m_d.swap(d); + m_d->onGeoGeometryChanged(); + emit backendChanged(); +@@ -565,7 +577,9 @@ QDeclarativeCircleMapItemPrivate::~QDeclarativeCircleMapItemPrivate() {} + + QDeclarativeCircleMapItemPrivateCPU::~QDeclarativeCircleMapItemPrivateCPU() {} + ++#if QT_CONFIG(opengl) + QDeclarativeCircleMapItemPrivateOpenGL::~QDeclarativeCircleMapItemPrivateOpenGL() {} ++#endif + + bool QDeclarativeCircleMapItemPrivate::preserveCircleGeometry (QList &path, + const QGeoCoordinate ¢er, qreal distance, const QGeoProjectionWebMercator &p) +diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem_p_p.h b/src/location/declarativemaps/qdeclarativecirclemapitem_p_p.h +index 4cf4217..dbe6c8b 100644 +--- a/src/location/declarativemaps/qdeclarativecirclemapitem_p_p.h ++++ b/src/location/declarativemaps/qdeclarativecirclemapitem_p_p.h +@@ -275,6 +275,7 @@ public: + MapPolygonNode *m_node = nullptr; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QDeclarativeCircleMapItemPrivateOpenGL: public QDeclarativeCircleMapItemPrivate + { + public: +@@ -443,6 +444,7 @@ public: + MapPolygonNodeGL *m_node = nullptr; + MapPolylineNodeOpenGLExtruded *m_polylinenode = nullptr; + }; ++#endif // QT_CONFIG(opengl) + + QT_END_NAMESPACE + +diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +index fa6ee17..af4f55e 100644 +--- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp ++++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +@@ -334,6 +334,7 @@ void QGeoMapPolygonGeometry::updateScreenPoints(const QGeoMap &map, qreal stroke + this->translate(QPointF(strokeWidth, strokeWidth)); + } + ++#if QT_CONFIG(opengl) + QGeoMapPolygonGeometryOpenGL::QGeoMapPolygonGeometryOpenGL(){ + } + +@@ -344,6 +345,7 @@ void QGeoMapPolygonGeometryOpenGL::updateSourcePoints(const QGeoMap &map, const + geopath.append(QWebMercator::mercatorToCoord(c)); + updateSourcePoints(map, geopath); + } ++#endif + + // wrapPath always preserves the geometry + // This one handles holes +@@ -452,6 +454,7 @@ static void cutPathEars(const QList &wrappedPath, + screenIndices << quint32(i); + } + ++#if QT_CONFIG(opengl) + /*! + \internal + */ +@@ -594,7 +597,7 @@ void QGeoMapPolygonGeometryOpenGL::updateQuickGeometry(const QGeoProjectionWebMe + sourceBounds_.setWidth(brect.width()); + sourceBounds_.setHeight(brect.height()); + } +- ++#endif // QT_CONFIG(opengl) + /* + * QDeclarativePolygonMapItem Private Implementations + */ +@@ -603,8 +606,9 @@ QDeclarativePolygonMapItemPrivate::~QDeclarativePolygonMapItemPrivate() {} + + QDeclarativePolygonMapItemPrivateCPU::~QDeclarativePolygonMapItemPrivateCPU() {} + ++#if QT_CONFIG(opengl) + QDeclarativePolygonMapItemPrivateOpenGL::~QDeclarativePolygonMapItemPrivateOpenGL() {} +- ++#endif + /* + * QDeclarativePolygonMapItem Implementation + */ +@@ -689,9 +693,17 @@ void QDeclarativePolygonMapItem::setBackend(QDeclarativePolygonMapItem::Backend + if (b == m_backend) + return; + m_backend = b; +- QScopedPointer d((m_backend == Software) +- ? static_cast(new QDeclarativePolygonMapItemPrivateCPU(*this)) +- : static_cast(new QDeclarativePolygonMapItemPrivateOpenGL(*this))); ++ QScopedPointer d( ++ (m_backend == Software) ? static_cast( ++ new QDeclarativePolygonMapItemPrivateCPU(*this)) ++#if QT_CONFIG(opengl) ++ : static_cast( ++ new QDeclarativePolygonMapItemPrivateOpenGL(*this))); ++#else ++ : nullptr); ++ qFatal("Requested non software rendering backend, but source code is compiled wihtout opengl " ++ "support"); ++#endif + m_d.swap(d); + m_d->onGeoGeometryChanged(); + emit backendChanged(); +@@ -898,6 +910,7 @@ void QDeclarativePolygonMapItem::geometryChanged(const QRectF &newGeometry, cons + + ////////////////////////////////////////////////////////////////////// + ++#if QT_CONFIG(opengl) + QSGMaterialShader *MapPolygonMaterial::createShader() const + { + return new MapPolygonShader(); +@@ -916,6 +929,7 @@ QSGMaterialType *MapPolygonMaterial::type() const + static QSGMaterialType type; + return &type; + } ++#endif + + MapPolygonNode::MapPolygonNode() : + border_(new MapPolylineNode()), +@@ -967,6 +981,7 @@ void MapPolygonNode::update(const QColor &fillColor, const QColor &borderColor, + } + } + ++#if QT_CONFIG(opengl) + MapPolygonNodeGL::MapPolygonNodeGL() : + //fill_material_(this), + fill_material_(), +@@ -1052,5 +1067,5 @@ void MapPolygonShader::updateState(const QSGMaterialShader::RenderState &state, + program()->setUniformValue(m_center_lowpart_id, vecCenter_lowpart); + program()->setUniformValue(m_wrapOffset_id, float(newMaterial->wrapOffset())); + } +- ++#endif // QT_CONFIG(opengl) + QT_END_NAMESPACE +diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h b/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h +index 8d566e6..5e75deb 100644 +--- a/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h ++++ b/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h +@@ -89,6 +89,7 @@ protected: + bool assumeSimple_; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QGeoMapPolygonGeometryOpenGL : public QGeoMapItemGeometry + { + public: +@@ -197,6 +198,7 @@ private: + int m_color_id; + int m_wrapOffset_id; + }; ++#endif // QT_CONFIG(opengl) + + class Q_LOCATION_PRIVATE_EXPORT MapPolygonMaterial : public QSGFlatColorMaterial + { +@@ -269,6 +271,7 @@ private: + QSGGeometry geometry_; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT MapPolygonNodeGL : public MapItemGeometryNode + { + +@@ -284,6 +287,7 @@ public: + MapPolygonMaterial fill_material_; + QSGGeometry geometry_; + }; ++#endif // QT_CONFIG(opengl) + + class Q_LOCATION_PRIVATE_EXPORT QDeclarativePolygonMapItemPrivate + { +@@ -479,6 +483,7 @@ public: + MapPolygonNode *m_node = nullptr; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QDeclarativePolygonMapItemPrivateOpenGL: public QDeclarativePolygonMapItemPrivate + { + public: +@@ -662,6 +667,7 @@ public: + MapPolygonNodeGL *m_node = nullptr; + MapPolylineNodeOpenGLExtruded *m_polylinenode = nullptr; + }; ++#endif // QT_CONFIG(opengl) + + QT_END_NAMESPACE + +diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp +index d59704d..83d253f 100644 +--- a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp ++++ b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp +@@ -769,6 +769,7 @@ bool QGeoMapPolylineGeometry::contains(const QPointF &point) const + return false; + } + ++#if QT_CONFIG(opengl) + void QGeoMapPolylineGeometryOpenGL::updateSourcePoints(const QGeoMap &map, const QGeoPolygon &poly) + { + if (!sourceDirty_) +@@ -921,6 +922,7 @@ void QGeoMapPolylineGeometryOpenGL::updateQuickGeometry(const QGeoProjectionWebM + sourceBounds_.setWidth(brect.width() + strokeWidth); + sourceBounds_.setHeight(brect.height() + strokeWidth); + } ++#endif // QT_CONFIG(opengl) + + /* + * QDeclarativePolygonMapItem Private Implementations +@@ -928,12 +930,13 @@ void QGeoMapPolylineGeometryOpenGL::updateQuickGeometry(const QGeoProjectionWebM + + QDeclarativePolylineMapItemPrivate::~QDeclarativePolylineMapItemPrivate() {} + +- + QDeclarativePolylineMapItemPrivateCPU::~QDeclarativePolylineMapItemPrivateCPU() {} + ++#if QT_CONFIG(opengl) + QDeclarativePolylineMapItemPrivateOpenGLLineStrip::~QDeclarativePolylineMapItemPrivateOpenGLLineStrip() {} + + QDeclarativePolylineMapItemPrivateOpenGLExtruded::~QDeclarativePolylineMapItemPrivateOpenGLExtruded() {} ++#endif + + /* + * QDeclarativePolygonMapItem Implementation +@@ -941,10 +944,12 @@ QDeclarativePolylineMapItemPrivateOpenGLExtruded::~QDeclarativePolylineMapItemPr + + struct PolylineBackendSelector + { ++#if QT_CONFIG(opengl) + PolylineBackendSelector() + { + backend = (qgetenv("QTLOCATION_OPENGL_ITEMS").toInt()) ? QDeclarativePolylineMapItem::OpenGLExtruded : QDeclarativePolylineMapItem::Software; + } ++#endif + QDeclarativePolylineMapItem::Backend backend = QDeclarativePolylineMapItem::Software; + }; + +@@ -1236,11 +1241,22 @@ void QDeclarativePolylineMapItem::setBackend(QDeclarativePolylineMapItem::Backen + if (b == m_backend) + return; + m_backend = b; +- QScopedPointer d((m_backend == Software) +- ? static_cast(new QDeclarativePolylineMapItemPrivateCPU(*this)) +- : ((m_backend == OpenGLExtruded) +- ? static_cast(new QDeclarativePolylineMapItemPrivateOpenGLExtruded(*this)) +- : static_cast(new QDeclarativePolylineMapItemPrivateOpenGLLineStrip(*this)))); ++ QScopedPointer d( ++ (m_backend == Software) ++ ? static_cast( ++ new QDeclarativePolylineMapItemPrivateCPU(*this)) ++#if QT_CONFIG(opengl) ++ : ((m_backend == OpenGLExtruded) ++ ? static_cast( ++ new QDeclarativePolylineMapItemPrivateOpenGLExtruded(*this)) ++ : static_cast( ++ new QDeclarativePolylineMapItemPrivateOpenGLLineStrip( ++ *this)))); ++#else ++ : nullptr); ++ qFatal("Requested non software rendering backend, but source code is compiled wihtout opengl " ++ "support"); ++#endif + m_d.swap(d); + m_d->onGeoGeometryChanged(); + emit backendChanged(); +@@ -1477,6 +1493,7 @@ void MapPolylineNode::update(const QColor &fillColor, + } + } + ++#if QT_CONFIG(opengl) + MapPolylineNodeOpenGLLineStrip::MapPolylineNodeOpenGLLineStrip() + : geometry_(QSGGeometry::defaultAttributes_Point2D(), 0) + { +@@ -2080,5 +2097,6 @@ unsigned int QGeoMapItemLODGeometry::zoomForLOD(unsigned int zoom) + return res; + return res + 1; // give more resolution when closing in + } ++#endif // QT_CONFIG(opengl) + + QT_END_NAMESPACE +diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem_p.h b/src/location/declarativemaps/qdeclarativepolylinemapitem_p.h +index 9cd20ea..d3d0ebd 100644 +--- a/src/location/declarativemaps/qdeclarativepolylinemapitem_p.h ++++ b/src/location/declarativemaps/qdeclarativepolylinemapitem_p.h +@@ -97,8 +97,10 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativePolylineMapItem : public QDeclarativ + public: + enum Backend { + Software = 0, ++#if QT_CONFIG(opengl) + OpenGLLineStrip = 1, + OpenGLExtruded = 2, ++#endif + }; + + explicit QDeclarativePolylineMapItem(QQuickItem *parent = 0); +diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h b/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h +index 2a921e2..e184391 100644 +--- a/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h ++++ b/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h +@@ -213,6 +213,7 @@ protected: + QSGGeometry geometry_; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QGeoMapItemLODGeometry + { + public: +@@ -566,6 +567,7 @@ protected: + MapPolylineMaterialExtruded fill_material_; + QSGGeometry m_geometryTriangulating; + }; ++#endif // QT_CONFIG(opengl) + + class Q_LOCATION_PRIVATE_EXPORT QDeclarativePolylineMapItemPrivate + { +@@ -720,6 +722,7 @@ public: + MapPolylineNode *m_node = nullptr; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QDeclarativePolylineMapItemPrivateOpenGLLineStrip: public QDeclarativePolylineMapItemPrivate + { + public: +@@ -884,7 +887,7 @@ public: + + MapPolylineNodeOpenGLExtruded *m_nodeTri = nullptr; + }; +- ++#endif // QT_CONFIG(opengl) + QT_END_NAMESPACE + + #endif // QDECLARATIVEPOLYLINEMAPITEM_P_P_H +diff --git a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp +index 74d2cc1..6192be0 100644 +--- a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp ++++ b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp +@@ -185,9 +185,18 @@ void QDeclarativeRectangleMapItem::setBackend(QDeclarativeRectangleMapItem::Back + if (b == m_backend) + return; + m_backend = b; +- QScopedPointer d((m_backend == Software) +- ? static_cast(new QDeclarativeRectangleMapItemPrivateCPU(*this)) +- : static_cast(new QDeclarativeRectangleMapItemPrivateOpenGL(*this))); ++ QScopedPointer d( ++ (m_backend == Software) ? static_cast( ++ new QDeclarativeRectangleMapItemPrivateCPU(*this)) ++#if QT_CONFIG(opengl) ++ : static_cast( ++ new QDeclarativeRectangleMapItemPrivateOpenGL(*this))); ++#else ++ : nullptr); ++ qFatal("Requested non software rendering backend, but source code is compiled wihtout opengl " ++ "support"); ++#endif ++ + m_d.swap(d); + m_d->onGeoGeometryChanged(); + emit backendChanged(); +@@ -397,6 +406,8 @@ QDeclarativeRectangleMapItemPrivate::~QDeclarativeRectangleMapItemPrivate() {} + + QDeclarativeRectangleMapItemPrivateCPU::~QDeclarativeRectangleMapItemPrivateCPU() {} + ++#if QT_CONFIG(opengl) + QDeclarativeRectangleMapItemPrivateOpenGL::~QDeclarativeRectangleMapItemPrivateOpenGL() {} ++#endif + + QT_END_NAMESPACE +diff --git a/src/location/declarativemaps/qdeclarativerectanglemapitem_p_p.h b/src/location/declarativemaps/qdeclarativerectanglemapitem_p_p.h +index 65d2f61..f7ecd2a 100644 +--- a/src/location/declarativemaps/qdeclarativerectanglemapitem_p_p.h ++++ b/src/location/declarativemaps/qdeclarativerectanglemapitem_p_p.h +@@ -244,6 +244,7 @@ public: + MapPolygonNode *m_node = nullptr; + }; + ++#if QT_CONFIG(opengl) + class Q_LOCATION_PRIVATE_EXPORT QDeclarativeRectangleMapItemPrivateOpenGL: public QDeclarativeRectangleMapItemPrivate + { + public: +@@ -410,6 +411,7 @@ public: + MapPolygonNodeGL *m_node = nullptr; + MapPolylineNodeOpenGLExtruded *m_polylinenode = nullptr; + }; ++#endif // QT_CONFIG(opengl) + + QT_END_NAMESPACE + +diff --git a/src/location/location.pro b/src/location/location.pro +index b0e2c3f..ae20271 100644 +--- a/src/location/location.pro ++++ b/src/location/location.pro +@@ -39,7 +39,14 @@ include(maps/maps.pri) + include(places/places.pri) + include(declarativemaps/declarativemaps.pri) + include(declarativeplaces/declarativeplaces.pri) +-qtConfig(location-labs-plugin):include(labs/labs.pri) ++qtConfig(location-labs-plugin) { ++ include(labs/labs.pri) ++} else { ++ # FIXME: this should be moved out of plugin source code, geojson is referenced from other places ++ # within codebase,however compilation of location-labs-plugin is optional ++ PRIVATE_HEADERS += labs/qgeojson_p.h ++ SOURCES += labs/qgeojson.cpp ++} + + HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS + +diff --git a/src/plugins/geoservices/itemsoverlay/qgeomapitemsoverlay.cpp b/src/plugins/geoservices/itemsoverlay/qgeomapitemsoverlay.cpp +index 1ebad08..a764438 100644 +--- a/src/plugins/geoservices/itemsoverlay/qgeomapitemsoverlay.cpp ++++ b/src/plugins/geoservices/itemsoverlay/qgeomapitemsoverlay.cpp +@@ -103,6 +103,7 @@ QGeoMap::Capabilities QGeoMapItemsOverlay::capabilities() const + bool QGeoMapItemsOverlay::createMapObjectImplementation(QGeoMapObject *obj) + { + #ifndef LOCATIONLABS ++ Q_UNUSED(obj); + return false; + #else + Q_D(QGeoMapItemsOverlay); +@@ -132,7 +133,9 @@ QSGNode *QGeoMapItemsOverlay::updateSceneGraph(QSGNode *node, QQuickWindow *wind + + void QGeoMapItemsOverlay::removeMapObject(QGeoMapObject *obj) + { +-#ifdef LOCATIONLABS ++#ifndef LOCATIONLABS ++ Q_UNUSED(obj); ++#else + Q_D(QGeoMapItemsOverlay); + d->removeMapObject(obj); + #endif +@@ -169,7 +172,11 @@ QRectF QGeoMapItemsOverlayPrivate::visibleArea() const + QGeoMapItemsOverlayPrivate::QGeoMapItemsOverlayPrivate(QGeoMappingManagerEngineItemsOverlay *engine, QGeoMapItemsOverlay *map) + : QGeoMapPrivate(engine, new QGeoProjectionWebMercator) + { ++#ifndef LOCATIONLABS ++ Q_UNUSED(map); ++#else + m_qsgSupport.m_map = map; ++#endif + } + + QGeoMapItemsOverlayPrivate::~QGeoMapItemsOverlayPrivate() +-- +2.33.1 +