Skip to content
Snippets Groups Projects
Commit 18b664cd authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-14270 A bit of cleanup #3

Just in case and for clarity
parent 6d842526
No related branches found
No related tags found
No related merge requests found
...@@ -52,11 +52,13 @@ LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon() ...@@ -52,11 +52,13 @@ LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon()
{ {
// Children don't belong to model, but to LLFolderViewItem, just mark them as having no parent // Children don't belong to model, but to LLFolderViewItem, just mark them as having no parent
std::for_each(mChildren.begin(), mChildren.end(), [](LLFolderViewModelItem* c) {c->setParent(NULL); }); std::for_each(mChildren.begin(), mChildren.end(), [](LLFolderViewModelItem* c) {c->setParent(NULL); });
mChildren.clear();
// Don't leave dead pointer in parent // Don't leave dead pointer in parent
if (mParent) if (mParent)
{ {
mParent->removeChild(this); mParent->removeChild(this);
mParent = NULL;
} }
} }
......
...@@ -156,7 +156,8 @@ class LLConversationItemSession : public LLConversationItem ...@@ -156,7 +156,8 @@ class LLConversationItemSession : public LLConversationItem
public: public:
LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
virtual ~LLConversationItemSession() {}
/*virtual*/ bool hasChildren() const; /*virtual*/ bool hasChildren() const;
LLPointer<LLUIImage> getIcon() const { return NULL; } LLPointer<LLUIImage> getIcon() const { return NULL; }
void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment