Commit 41a46ee8 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Remove code variants for outdated Qt4 Marble versions

parent 099e160c
......@@ -189,14 +189,7 @@ BackendMarble::~BackendMarble()
if (d->marbleWidget)
{
#ifdef KGEOMAP_MARBLE_ADD_LAYER
#if MARBLE_VERSION>=0x000c00
d->marbleWidget->removeLayer(d->bmLayer);
#elif MARBLE_VERSION>=0x000b00
d->marbleWidget->map()->removeLayer(d->bmLayer);
#else
d->marbleWidget->model()->removeLayer(d->bmLayer);
#endif
delete d->bmLayer;
#endif
......@@ -239,14 +232,7 @@ QWidget* BackendMarble::mapWidget()
d->marbleWidget = new Marble::MarbleWidget();
d->bmLayer = new BackendMarbleLayer(this);
#if MARBLE_VERSION>=0x000c00
d->marbleWidget->addLayer(d->bmLayer);
#elif MARBLE_VERSION>=0x000b00
d->marbleWidget->map()->addLayer(d->bmLayer);
#else
d->marbleWidget->model()->addLayer(d->bmLayer);
#endif
#else
d->marbleWidget = new BMWidget(this);
#endif
......@@ -665,9 +651,6 @@ void BackendMarble::marbleCustomPaint(Marble::GeoPainter* painter)
}
painter->save();
#if MARBLE_VERSION < 0x000f14
painter->autoMapQuality();
#endif
if (s->trackManager)
{
......@@ -1109,11 +1092,7 @@ GeoCoordinates::PairList BackendMarble::getNormalizedBounds()
return GeoCoordinates::PairList();
}
#if MARBLE_VERSION < 0x000b00
const Marble::GeoDataLatLonAltBox marbleBounds = d->marbleWidget->map()->viewParams()->viewport()->viewLatLonAltBox();
#else
const Marble::GeoDataLatLonAltBox marbleBounds = d->marbleWidget->viewport()->viewLatLonAltBox();
#endif
// qCDebug(LIBKGEOMAP_LOG)<<marbleBounds.toString(GeoDataCoordinates::Degree);
const GeoCoordinates::Pair boundsPair = GeoCoordinates::makePair(
......@@ -1771,14 +1750,7 @@ void BackendMarble::drawSearchRectangle(Marble::GeoPainter* const painter, const
Marble::GeoDataCoordinates coordBottomRight(lonEast, latSouth, 0, Marble::GeoDataCoordinates::Degree);
Marble::GeoDataLinearRing polyRing;
#if MARBLE_VERSION < 0x000800
polyRing.append(&coordTopLeft);
polyRing.append(&coordTopRight);
polyRing.append(&coordBottomRight);
polyRing.append(&coordBottomLeft);
#else // MARBLE_VERSION < 0x000800
polyRing << coordTopLeft << coordTopRight << coordBottomRight << coordBottomLeft;
#endif // MARBLE_VERSION < 0x000800
QPen selectionPen;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment