summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.h
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-10-30 15:59:42 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-10-30 15:59:42 -0700
commitfb3df4790e27345a1e45f4a4675e756c1e551f21 (patch)
treed6e4d6e082edc1b71275687b1eb5106c5d8cd4d9 /indra/newview/llconversationmodel.h
parent1160d82fb8566d7c76f0c39785c97fcf31768f0c (diff)
CHUI-459: Creating a fetchAvatarName() method for the LLConversationItemParticipant class to allow the class to query for the avatar display name directly. Also, added a field to store the avatar name cache callback connection so that we can disconnect properly on object destruction to avoid a crash with the callback attempting to access recently freed memory.
Diffstat (limited to 'indra/newview/llconversationmodel.h')
-rwxr-xr-xindra/newview/llconversationmodel.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 1d082852f5..481d46af58 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -27,9 +27,11 @@
#ifndef LL_LLCONVERSATIONMODEL_H
#define LL_LLCONVERSATIONMODEL_H
+#include <boost/signals2.hpp>
+
+#include "llavatarname.h"
#include "llfolderviewitem.h"
#include "llfolderviewmodel.h"
-#include "llavatarname.h"
#include "llviewerfoldertype.h"
// Implementation of conversations list
@@ -177,7 +179,7 @@ class LLConversationItemParticipant : public LLConversationItem
public:
LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
- virtual ~LLConversationItemParticipant() {}
+ virtual ~LLConversationItemParticipant();
virtual const std::string& getDisplayName() const { return mDisplayName; }
@@ -189,17 +191,21 @@ public:
void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; }
void buildContextMenu(LLMenuGL& menu, U32 flags);
- void onAvatarNameCache(const LLAvatarName& av_name);
virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); }
+ void fetchAvatarName();
+
void dumpDebugData();
private:
+ void onAvatarNameCache(const LLAvatarName& av_name);
+
bool mIsMuted; // default is false
bool mIsModerator; // default is false
std::string mDisplayName;
F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set.
+ boost::signals2::connection mAvatarNameCacheConnection;
};
// We don't want to ever filter conversations but we need to declare that class to create a conversation view model.