[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/handlers/gpx
Thibaut Gridel
tgridel at free.fr
Mon Jun 7 22:34:14 CEST 2010
SVN commit 1135640 by tgridel:
fixing leak
Thanks: jmho
M +5 -5 GPXgpxTagHandler.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/gpx/GPXgpxTagHandler.cpp #1135639:1135640
@@ -40,18 +40,18 @@
{
GeoDataDocument* doc = geoDataDoc( parser );
- GeoDataStyle *style = new GeoDataStyle();
+ GeoDataStyle style;
GeoDataLineStyle lineStyle;
lineStyle.setColor(Qt::green);
lineStyle.setWidth(2);
- style->setLineStyle(lineStyle);
- style->setStyleId("track");
+ style.setLineStyle(lineStyle);
+ style.setStyleId("track");
GeoDataStyleMap *styleMap = new GeoDataStyleMap();
styleMap->setStyleId("map-track");
- styleMap->insert("normal", QString("#").append(style->styleId()));
+ styleMap->insert("normal", QString("#").append(style.styleId()));
doc->addStyleMap(*styleMap);
- doc->addStyle(*style);
+ doc->addStyle(style);
#ifdef DEBUG_TAGS
mDebug() << "Parsed <" << gpxTag_gpx << "> document: " << doc;
More information about the Marble-commits
mailing list