Fixed SEGFAULT when shutting down the application
authorSami Rämö <sami.ramo@ixonos.com>
Fri, 7 May 2010 12:45:13 +0000 (15:45 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Fri, 7 May 2010 12:45:13 +0000 (15:45 +0300)
 - FriendLocationItems must not be removed in destructor
   because they are owned by MapScene

src/map/frienditemshandler.cpp
src/map/frienditemshandler.h

index 7b76e7d..ef9b4c5 100644 (file)
@@ -38,16 +38,6 @@ FriendItemsHandler::FriendItemsHandler(MapScene *mapScene, QObject *parent)
     qDebug() << __PRETTY_FUNCTION__;
 }
 
-FriendItemsHandler::~FriendItemsHandler()
-{
-    qDebug() << __PRETTY_FUNCTION__;
-
-    qDeleteAll(m_friendItems.begin(),m_friendItems.end());
-    m_friendItems.clear();
-
-    /// @todo REMOVE GROUP ITEMS
-}
-
 void FriendItemsHandler::checkAllFriendsForCollidingFriends()
 {
     qWarning() << __PRETTY_FUNCTION__;
index d4d28d3..b6fa04e 100644 (file)
@@ -35,7 +35,8 @@ class MapScene;
 /**
  * @brief Handler for friend and friend group items
  *
- * Handles all friend map items. Colliding items and groups are grouped.
+ * Handles all friend map items. Colliding items and groups are grouped. All items are owned
+ * by MapScene.
  *
  * @author Sami Rämö - sami.ramo@ixonos.com
  * @author Ville Tiensuu - ville.tiensuu@ixonos.com
@@ -53,11 +54,6 @@ public:
       */
     FriendItemsHandler(MapScene *mapScene, QObject *parent = 0);
 
-    /**
-      * @brief Destructor
-      */
-    ~FriendItemsHandler();
-
 /*******************************************************************************
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/