Commit Graph

419 Commits

Author SHA1 Message Date
Konstantin Käfer
1d8235f5b8 [build] rework platform/default directory and add -files.txt for vendored libs 2018-12-14 11:03:03 +01:00
Huyen Chau Nguyen
9a606caf0b [core] define number of concurrent downloads in online file source variable 2018-11-15 12:19:48 -08:00
Thiago Marcos P. Santos
253ba55f1f [qt] Fix crash on Qt filesource
When opening many maps and sharing the same filesource:

- Say we open around 30 maps and they all have the same style.
- They will all request the same sprite.json, but Qt filesource will
  restrict simultaneous request to 20.
- Mapbox GL will send some sprite.json to the filesource and queue
  some internally along with other requests.
- When the first sprite.json arrives and the Qt filesource calls the
  callback, Mapbox GL will synchronously push queued requests to the
  Qt filesource when a request is handled.
- We are walking a QVector dispatching sprite.json requests, but more
  requests get added to this QVector while we are walking it using an
  iterator.
- That corrupts the iterator and we get a crash.

The fix is simple, just pop items from the QVector until it is empty
instead of using iterators.
2018-11-13 23:26:34 +02:00
Thiago Marcos P. Santos
cd92a231b3 [qt] Deprecate Qt4 and old versions of Qt5
Not enough adoption to keep the platform alive.
2018-11-13 22:55:26 +02:00
Mikhail Pozdnyakov
ffdeef3a26 Refer corresponding LayerFactory instance from the Layer::Impl 2018-11-07 16:34:20 +02:00
Thiago Marcos P. Santos
69960afb8d [build] Add build system for submodules
Vendorize the submodules and a simple CMake build
system for all them. The dependencies will inherit
compilation options for core.

The goal is to make Mapbox GL Core completely self
contained with a simple offline build.
2018-10-31 18:19:28 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Konstantin Käfer
282c71e8e9 [core] unify UTF-8/16 conversion to <boost/locale/encoding_utf.hpp> 2018-10-23 12:23:40 +02:00
Bruno de Oliveira Abinader
98c36fc06e [core] CameraOptions receives and outputs angle and pitch as degrees, not radians 2018-10-19 12:05:16 +02:00
Chris Loer
bc71825774 [core] Bidi support for styled text.
Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it.
2018-10-15 13:15:46 -07:00
Bruno de Oliveira Abinader
6c4cb063c2 [Qt] UpdateParameters should always be available when rendering 2018-10-01 23:51:33 +03:00
Konstantin Käfer
071129bf61 [linux,qt] Remove remainder of WebP support 2018-09-13 13:27:44 +02:00
Konstantin Käfer
e51eb0fc23 [build] use vendored version of ICU 2018-09-05 12:26:15 +02:00
Molly Lloyd
2cdbe934c2 [windows, qt] fix windows compiler errors, remove tao + tuple polyfill 2018-08-31 13:08:47 -07:00
Asheem Mamoowala
bc806d4354 Use QSqlError::databaseText for reporting errors from SQLite wrapper to match SQLite3 error messages 2018-08-28 07:14:54 -07:00
Konstantin Käfer
112bbc7ab2 [core] make style/conversion.hpp implementation private 2018-08-19 13:09:16 +02:00
Konstantin Käfer
fa7b70945f [core] harden OfflineDatabase 2018-08-14 17:03:46 -07:00
John Firebaugh
b2f60a4bf2 [core] Eliminate setProperty & co. 2018-08-13 12:39:44 -07:00
Paolo Angelelli
8ae5ea953e [qt] Use FollowRedirectsAttribute in network requests 2018-08-10 14:08:21 +03:00
Sudarsana Babu Nagineni
dfb9325057 [Qt] Add CMake toolchain for QNX platform
This adds CMake toolchain for QNX platform. By using this
toolchain, we can compile Mapbox GL Plugin for Qt on QNX
platform.
2018-08-07 15:50:14 +03:00
Bruno de Oliveira Abinader
66f5be3864 [Qt] Check if property value is a valid JSON string 2018-08-06 18:08:02 +03:00
Bruno de Oliveira Abinader
58d8b771a1 [Qt] QMapboxGL::set{Paint,Layout}Property should return bool 2018-08-01 13:36:11 +03:00
Sudarsana Babu Nagineni
377a6e42d6 [Qt] Fix link to Qt public API headers in README.md 2018-07-30 15:21:18 +03:00
John Firebaugh
f149951f0f [build] Remove obsolete bitrise.yml files 2018-07-24 14:28:29 -07:00
Asheem Mamoowala
7c585244ab Use Filter::serialize() in QMapboxGL::getFilter() 2018-07-23 09:12:26 -07:00
John Firebaugh
ca9ba9cb43 [build] Move all mason_use statements to a single file
So its checksum can be used in a CI cache key name.
2018-07-13 11:50:39 -07:00
Chris Loer
35256c6e5b [core] Default "collator" implementation
- Based on nunicode
 - Not locale-aware
 - Used by linux and Qt builds
2018-07-03 10:03:05 -07:00
Chris Loer
251f5e605f [core, vendor] Create vendored nunicode 1.8.
- Version bump to 1.8 necessary for "unaccent" functionality
- Qt now depends on nunicode, ruling out use of precompiled binaries
2018-07-03 10:03:05 -07:00
Asheem Mamoowala
1067dd7ea2 [qt] Add QMapboxGL::getFilter() 2018-06-27 12:15:55 +03:00
Thiago Marcos P. Santos
a5ef72a051 Use a shared scheduler on threads without a default scheduler
Render threads won't have a scheduler, so we create one that is
shared by all the maps rendering at this thread. The bad side
effect of this is that we need to wake up the render thread
to process events.

Mapbox GL should get rid of processing events on the render
thread. This solution is a workaround.
2018-06-15 19:33:27 +03:00
Konstantin Käfer
79394ee47d [core] remove unused flags from SQLite header 2018-06-12 17:41:16 +02:00
Konstantin Käfer
4477dd4119 [core] support moving Database object during a Transaction 2018-06-12 17:41:16 +02:00
Bruno de Oliveira Abinader
ae61b9d35f [Qt] Add QMapboxGL::layerIds() 2018-06-12 16:32:47 +03:00
Bruno de Oliveira Abinader
95a6fcdd26 [qt] Fix asMapboxGLFeatureIdentifier iterator traversal 2018-06-11 14:45:30 +03:00
Konstantin Käfer
d66251234d [core] don't use floating point versions of pow/log
GLIBC 2.27 added new versioned symbols of powf and logf, while the double versions of pow and log remained stable.
Prefer the double version to avoid introducing a dependency on a newer version of GLIBC than strictly necessary.
See https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00000.html
2018-06-04 10:43:21 +02:00
Bruno de Oliveira Abinader
7d1e52a325 [build] Use Qt 5.6.3 instead of 5.7 in AppVeyor 2018-05-17 18:01:12 +03:00
Thiago Marcos P. Santos
07ad29d30d [qt] Fix build when building the Qt Location plugin
- MinGW has to explicitly know that is building a static library.
- Android doesn't have 'round' on the std:: namespace when using g++.
2018-05-14 17:18:51 +03:00
John Firebaugh
a1195f6a9d Avoid exceptions for flow control during database creation
Unfortuntely, it's difficult to avoid all exceptions, because sqlite3_open_v2 does not reliably return SQLITE_NOTADB if the file is not a database. However, this should avoid cases where developers misinterpret the SQLITE_CANTOPEN exception as a crash, which is the common case.
2018-05-09 07:32:16 -07:00
John Firebaugh
9a4b806fa8 [docs] Make per-platform installation docs self-contained
I've seen several issues where users followed platform-specific install docs, but were unaware of additional prerequisites spelled out in the top-level INSTALL.md. So let's try making each platform's installation documentation self contained.
2018-04-30 13:10:31 -07:00
Thiago Marcos P. Santos
0767bf0686 [qt] Only share a FileSource if it points to the same path
Previously all QMapboxGL objects were sharing the same cache created
by the first instantiated object. Now it will share the cache only
if it points to the same path.

Fixes #11766
2018-04-26 11:07:48 -07:00
Thiago Marcos P. Santos
0eb58278f2 [qt] Fix crash on the example app when launching multiple windows
We need to have a valid context when destroying QMapboxGL.
2018-04-26 11:07:48 -07:00
Fabian Guerra
e08b6fe87f Merge branch 'release-boba' into master
# Conflicts:
#	circle.yml
#	include/mbgl/style/expression/let.hpp
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapKeyListener.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
#	platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/geometry/LatLngBoundsTest.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
#	platform/android/gradle/dependencies.gradle
#	platform/android/src/example_custom_layer.cpp
#	platform/android/src/geojson/point.cpp
#	platform/darwin/src/NSPredicate+MGLAdditions.mm
#	platform/darwin/test/MGLExpressionTests.mm
#	platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/ios/app/MBXViewController.m
#	src/mbgl/renderer/layers/render_custom_layer.cpp
#	src/mbgl/style/conversion/filter.cpp
#	src/mbgl/style/expression/interpolate.cpp
#	src/mbgl/style/expression/value.cpp
#	test/style/filter.test.cpp
2018-04-23 10:44:02 -04:00
Asheem Mamoowala
099fcc3b3c Use a host interface for CustomLayer instead of function pointers (#11553)
Use a host interface for CustomLayer instead of function pointers

Co-authored-by: Julian Rex <julian.rex@mapbox.com>
2018-04-02 16:15:25 -07:00
Bruno de Oliveira Abinader
803a4d46ed [Qt] Added QMapboxGL::MapLoadingFailure enum 2018-03-05 14:41:58 -05:00
Bruno de Oliveira Abinader
fc140e265b [Qt] Expose mapLoadingFailed signal 2018-03-05 14:41:58 -05:00
Konstantin Käfer
136e536159 [core, qt] move self-resetting Statement/Query object to shared header 2018-03-02 14:26:25 +01:00
Konstantin Käfer
5ca38bbde9 [core] refactor SQLite error/status codes 2018-03-02 14:26:25 +01:00
Bruno de Oliveira Abinader
380f5dc88b [qt] Rename Qt SDK to 'Mapbox Maps SDK for Qt' 2018-02-27 16:28:55 +02:00
Thiago Marcos P. Santos
ba019b0256 [qt] Fix issue if resources not being found on the database
Once again QVariant getting confused about its contents
datatype. With this patch we use QString directly and
copy the contents, which should be cheap with Qt implicity
sharing.
2018-02-26 14:43:32 +02:00
Thiago Marcos P. Santos
c1b17e251a [qt] Fix wrong signal being emitted
Probably caused by a typo when refactoring the asynchronous rendering.
2018-02-26 13:19:11 +02:00