RideMap : no currentData() in QT 4

This commit is contained in:
grauser
2016-06-12 15:50:56 +02:00
parent ea82b2c533
commit 0ca2575bc4
2 changed files with 2 additions and 2 deletions

View File

@@ -226,7 +226,7 @@ void
RideMapWindow::osmCustomTSURLTextChanged(QString text)
{
if (first) {
if (tileCombo->currentData().toInt() == 1000 && (text.length() > 0)) {
if (tileCombo->itemData(tileCombo->currentIndex()).toInt() == 1000 && (text.length() > 0)) {
osmCurrentTileServerUrl = text;
// only do this once when the text is set automatically by properties
first = false;

View File

@@ -150,7 +150,7 @@ class RideMapWindow : public GcChartWindow
bool showMarkers() const { return ( showMarkersCk->checkState() == Qt::Checked); }
void setShowMarkers(bool x) { if (x) showMarkersCk->setCheckState(Qt::Checked); else showMarkersCk->setCheckState(Qt::Unchecked) ;}
int osmTS() const { return ( tileCombo->currentData().toInt()); }
int osmTS() const { return ( tileCombo->itemData(tileCombo->currentIndex()).toInt()); }
void setOsmTS(int x) { tileCombo->setCurrentIndex(tileCombo->findData(x)); /*setTileServerUrlForTileType(x);*/}
QString osmTSUrl() const { return osmCustomTSUrl->text(); }