Changeset 62 in flair-src for trunk/tools


Ignore:
Timestamp:
Aug 22, 2016, 4:33:24 PM (8 years ago)
Author:
Sanahuja Guillaume
Message:

correction bug destruction map

Location:
trunk/tools/FlairGCS/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/Map.cpp

    r15 r62  
    1919#include <qendian.h>
    2020
     21//todo: merge Map and mapwidget
     22
    2123using namespace QtMobility;
    2224
     
    9092}
    9193
    92 Map::~Map() {}
     94Map::~Map() {
     95  for (int i = 0; i < points.count(); i++) delete points.at(i);
     96  delete mapWidget;
     97
     98  if(geoMap!=0) delete geoMap;
     99}
    93100
    94101bool Map::findServices(void) {
  • trunk/tools/FlairGCS/src/mapwidget.cpp

    r15 r62  
    7575  landmarks = new QList<Landmark *>;
    7676  landmarks_old = new QList<Landmark *>;
     77}
     78
     79MapWidget::~MapWidget() {
     80  m_scene->removeItem(geoMap);
     81  delete m_scene;
    7782}
    7883
  • trunk/tools/FlairGCS/src/mapwidget.h

    r15 r62  
    6262public:
    6363  MapWidget(Map *map, QWidget *parent = 0);
     64  ~MapWidget();
    6465  void setMap(QtMobility::QGraphicsGeoMap *geoMap);
    6566  QGraphicsScene *scene() const;
Note: See TracChangeset for help on using the changeset viewer.