[Qt] setStyleURL and setStyleJSON name review

Qt uses URL as Url and JSON as Json.
This commit is contained in:
Thiago Marcos P. Santos
2016-08-25 18:18:05 +03:00
parent e9a453271b
commit 9605cac3e9
4 changed files with 10 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ void MapWindow::changeStyle()
auto& styles = QMapbox::defaultStyles();
m_map.setStyleURL(styles[currentStyleIndex].first);
m_map.setStyleUrl(styles[currentStyleIndex].first);
setWindowTitle(QString("Mapbox GL: ") + styles[currentStyleIndex].second);
if (++currentStyleIndex == styles.size()) {

View File

@@ -119,11 +119,11 @@ public:
void cycleDebugOptions();
QString styleJSON() const;
QString styleURL() const;
QString styleJson() const;
QString styleUrl() const;
void setStyleJSON(const QString &);
void setStyleURL(const QString &);
void setStyleJson(const QString &);
void setStyleUrl(const QString &);
double latitude() const;
void setLatitude(double latitude);

View File

@@ -231,22 +231,22 @@ void QMapboxGL::cycleDebugOptions()
d_ptr->mapObj->cycleDebugOptions();
}
QString QMapboxGL::styleJSON() const
QString QMapboxGL::styleJson() const
{
return QString::fromStdString(d_ptr->mapObj->getStyleJSON());
}
QString QMapboxGL::styleURL() const
QString QMapboxGL::styleUrl() const
{
return QString::fromStdString(d_ptr->mapObj->getStyleURL());
}
void QMapboxGL::setStyleJSON(const QString &style)
void QMapboxGL::setStyleJson(const QString &style)
{
d_ptr->mapObj->setStyleJSON(style.toStdString());
}
void QMapboxGL::setStyleURL(const QString &url)
void QMapboxGL::setStyleUrl(const QString &url)
{
d_ptr->mapObj->setStyleURL(url.toStdString());
}

View File

@@ -85,7 +85,7 @@ void QQuickMapboxGLRenderer::synchronize(QQuickFramebufferObject *item)
}
if (syncStatus & QQuickMapboxGL::StyleNeedsSync && quickMap->style()) {
m_map->setStyleURL(quickMap->style()->url());
m_map->setStyleUrl(quickMap->style()->url());
m_styleLoaded = false;
}