<commit_before>#include "qmapboxgl.h"
#include "qmapboxgl_p.h"

#include <QMouseEvent>
#include <QOpenGLContext>
#include <QWheelEvent>

#include <mbgl/map/map.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/storage/default_file_source.hpp>

QMapboxGL::QMapboxGL(QWindow *parent)
    : QOpenGLWindow(QOpenGLWindow::NoPartialUpdate, parent)
    , d_ptr(new QMapboxGLPrivate(this))
{
    QSurfaceFormat format;
    format.setRedBufferSize(8);
    format.setGreenBufferSize(8);
    format.setBlueBufferSize(8);
    format.setStencilBufferSize(8);
    format.setAlphaBufferSize(8);
    format.setDepthBufferSize(16);

    setFormat(format);
}

QMapboxGL::~QMapboxGL()
{
    delete d_ptr;
}

void QMapboxGL::setAccessToken(const QString &token)
{
    d_ptr->map.setAccessToken(token.toUtf8().constData());
}

void QMapboxGL::setStyleJSON(const QString &style)
{
    d_ptr->map.setStyleJSON(style.toUtf8().constData());
}

double QMapboxGL::latitude() const
{
    return d_ptr->map.getLatLng().latitude;
}

void QMapboxGL::setLatitude(double latitude)
{
    d_ptr->map.setLatLng({latitude, longitude()});
}

double QMapboxGL::longitude() const
{<commit_msg>Updated Mapboxgl API usage to ios-v0.3.2<commit_after>#include "qmapboxgl.h"
#include "qmapboxgl_p.h"

#include <QMouseEvent>
#include <QOpenGLContext>
#include <QWheelEvent>

#include <mbgl/map/map.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/storage/default_file_source.hpp>

QMapboxGL::QMapboxGL(QWindow *parent)
    : QOpenGLWindow(QOpenGLWindow::NoPartialUpdate, parent)
    , d_ptr(new QMapboxGLPrivate(this))
{
    QSurfaceFormat format;
    format.setRedBufferSize(8);
    format.setGreenBufferSize(8);
    format.setBlueBufferSize(8);
    format.setStencilBufferSize(8);
    format.setAlphaBufferSize(8);
    format.setDepthBufferSize(16);

    setFormat(format);
}

QMapboxGL::~QMapboxGL()
{
    delete d_ptr;
}

void QMapboxGL::setAccessToken(const QString &token)
{
    d_ptr->fileSource.setAccessToken(token.toUtf8().constData());
}

void QMapboxGL::setStyleJSON(const QString &style)
{
    d_ptr->map.setStyleJSON(style.toUtf8().constData());
}

double QMapboxGL::latitude() const
{
    return d_ptr->map.getLatLng().latitude;
}

void QMapboxGL::setLatitude(double latitude)
{
    d_ptr->map.setLatLng({latitude, longitude()});
}

double QMapboxGL::longitude() const
{
{'fraction_non_alphanumeric': 0.14206484641638226, 'fraction_numerical': 0.008959044368600682, 'mean_word_length': 5.680911680911681, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2801715', 'n_tokens_mistral': 891, 'n_tokens_neox': 884, 'n_words': 119}