Commit 6a738660 authored by Bernhard Beschow's avatar Bernhard Beschow

remove GeoDataFeature::presetStyle(), use StyleBuilder::presetStyle() directly

parent c68ad733
......@@ -160,12 +160,6 @@ EnumFeatureId GeoDataFeature::featureId() const
return d->featureId();
}
QSharedPointer<const GeoDataStyle> GeoDataFeature::presetStyle( GeoDataVisualCategory category )
{
return GeoDataFeaturePrivate::s_styleBuilder.presetStyle(category);
}
QString GeoDataFeature::name() const
{
return d->m_name;
......
......@@ -633,8 +633,6 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
/// Unserialize the contents of the feature from @p stream.
virtual void unpack( QDataStream& stream );
static QSharedPointer<const GeoDataStyle> presetStyle( GeoDataVisualCategory category );
protected:
// the d-pointer needs to be protected to be accessible from derived classes
GeoDataFeaturePrivate* d;
......
......@@ -15,6 +15,7 @@
#include "GeoDataPlacemark.h"
#include "GeoDataStyle.h"
#include "OsmPlacemarkData.h"
#include "StyleBuilder.h"
#include <QMap>
......@@ -467,8 +468,11 @@ void OsmPresetLibrary::initializeAdditionalOsmTags()
GeoDataStyle::ConstPtr OsmPresetLibrary::presetStyle( const OsmTag &tag )
{
GeoDataFeature::GeoDataVisualCategory category = osmVisualCategory( tag.first + "=" + tag.second );
return GeoDataFeature::presetStyle( category );
static const StyleBuilder styleBuilder;
const GeoDataFeature::GeoDataVisualCategory category = osmVisualCategory(tag.first + "=" + tag.second);
return styleBuilder.presetStyle(category);
}
bool OsmPresetLibrary::hasVisualCategory ( const OsmTag &tag )
......
Markdown is supported
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