From 9dcb86009a09489d6c1b0de3559eb7f9a365e886 Mon Sep 17 00:00:00 2001 From: Rinigus Date: Thu, 26 Mar 2020 22:23:01 +0200 Subject: [PATCH 1/4] update to the latest api --- include/qquickitemmapboxgl.h | 2 +- src/qquickitemmapboxgl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qquickitemmapboxgl.h b/include/qquickitemmapboxgl.h index 19987ad..00050c7 100644 --- a/include/qquickitemmapboxgl.h +++ b/include/qquickitemmapboxgl.h @@ -321,7 +321,7 @@ public slots: void onMapChanged(QMapboxGL::MapChange change); ///< Follow the state of the map void onMapLoadingFailed(QMapboxGL::MapLoadingFailure type, const QString &description); - std::string resourceTransform(const std::string &&url); ///< Use resource transform API to change requested URL + std::string resourceTransform(const std::string &url); ///< Use resource transform API to change requested URL void setError(QString error); ///< Set error string, used internally diff --git a/src/qquickitemmapboxgl.cpp b/src/qquickitemmapboxgl.cpp index b2e5082..97be2db 100644 --- a/src/qquickitemmapboxgl.cpp +++ b/src/qquickitemmapboxgl.cpp @@ -1059,7 +1059,7 @@ void QQuickItemMapboxGL::setUrlSuffix(const QString &urlsfx) emit urlSuffixChanged(urlsfx); } -std::string QQuickItemMapboxGL::resourceTransform(const std::string &&url) +std::string QQuickItemMapboxGL::resourceTransform(const std::string &url) { QMutexLocker lk(&m_resourceTransformMutex); std::string newurl = url + m_urlSuffix; From 99b860175a85166090a98488123c55d709fcaca8 Mon Sep 17 00:00:00 2001 From: Rinigus Date: Sun, 12 Apr 2020 11:50:03 +0300 Subject: [PATCH 2/4] use latest qmapboxgl in rpm spec --- rpm/mapbox-gl-qml.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpm/mapbox-gl-qml.spec b/rpm/mapbox-gl-qml.spec index 528e2c5..1e36b5b 100644 --- a/rpm/mapbox-gl-qml.spec +++ b/rpm/mapbox-gl-qml.spec @@ -18,7 +18,8 @@ BuildRequires: pkgconfig(Qt5Location) BuildRequires: pkgconfig(Qt5Positioning) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(openssl) -BuildRequires: qmapboxgl +BuildRequires: qmapboxgl-devel +Requires: qmapboxgl %description QML plugin for Mapbox GL Native. From cfaf6de5437508be057a824ff81242f7e6326f5a Mon Sep 17 00:00:00 2001 From: Rinigus Date: Sun, 26 Apr 2020 17:08:28 +0300 Subject: [PATCH 3/4] reset glDepthRangef after drawing the map Related: https://github.com/mapbox/mapbox-gl-native/issues/16329 --- src/qsgmapboxglnode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qsgmapboxglnode.cpp b/src/qsgmapboxglnode.cpp index 807aee1..557f317 100644 --- a/src/qsgmapboxglnode.cpp +++ b/src/qsgmapboxglnode.cpp @@ -114,6 +114,7 @@ bool QSGMapboxGLTextureNode::render(QQuickWindow *window) // QTBUG-62861 f->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); + f->glDepthRangef(0, 1); window->resetOpenGLState(); markDirty(QSGNode::DirtyMaterial); From 1ddec383a47afd0e033b65477b47103183ed0c8a Mon Sep 17 00:00:00 2001 From: Rinigus Date: Thu, 7 May 2020 09:59:38 +0300 Subject: [PATCH 4/4] drop opt-gcc and use system-provided gcc --- mapbox-gl-qml.pro | 2 +- rpm/mapbox-gl-qml.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mapbox-gl-qml.pro b/mapbox-gl-qml.pro index dac70ab..68d22f4 100644 --- a/mapbox-gl-qml.pro +++ b/mapbox-gl-qml.pro @@ -21,7 +21,7 @@ HEADERS += \ INCLUDEPATH += src/plugin -LIBS += -lqmapboxgl -lz -L/opt/gcc6/lib -static-libstdc++ +LIBS += -lqmapboxgl -lz target.path=$$[QT_INSTALL_QML]/MapboxMap INSTALLS += target diff --git a/rpm/mapbox-gl-qml.spec b/rpm/mapbox-gl-qml.spec index 1e36b5b..d823ad4 100644 --- a/rpm/mapbox-gl-qml.spec +++ b/rpm/mapbox-gl-qml.spec @@ -10,7 +10,7 @@ Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: opt-gcc gcc-c++ +BuildRequires: gcc-c++ BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Qml) @@ -31,7 +31,7 @@ QML plugin for Mapbox GL Native. %qmake5 'CONFIG+=use_curl_ssl' VERSION='%{version}-%{release}' mapbox-gl-qml.pro -%{__make} CXX=/opt/gcc/bin/g++ CC=/opt/gcc/bin/gcc LINK=/opt/gcc/bin/g++ %{?_smp_mflags} +%{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot}