#4931 Fix name cache callbacks not having connections

This commit is contained in:
Andrey Kleshchev
2025-11-05 11:27:22 +02:00
parent 695203be48
commit c8d08ee388
10 changed files with 26 additions and 7 deletions
+4 -1
View File
@@ -157,7 +157,10 @@ void LLConversation::setListenIMFloaterOpened()
// if floater is already opened or this conversation doesn't have unread offline messages
if (mHasOfflineIMs && !offline_ims_visible)
{
mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1));
mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id)
{
onIMFloaterShown(session_id);
});
}
else
{
+4 -1
View File
@@ -53,7 +53,10 @@ LLConversationLogListItem::LLConversationLogListItem(const LLConversation* conve
if (mConversation->hasOfflineMessages() && !ims_are_read)
{
mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1));
mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id)
{
onIMFloaterShown(session_id);
});
}
}
+2 -1
View File
@@ -171,7 +171,7 @@ void LLFloaterExperiences::onOpen( const LLSD& key )
refreshContents();
return;
}
region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this));
mCapsReceivedConnection = region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this));
return;
}
}
@@ -231,6 +231,7 @@ bool LLFloaterExperiences::updatePermissions( const LLSD& permission )
void LLFloaterExperiences::onClose( bool app_quitting )
{
mCapsReceivedConnection.disconnect();
LLEventPumps::instance().obtain("experience_permission").stopListening("LLFloaterExperiences");
LLFloater::onClose(app_quitting);
}
+1
View File
@@ -71,6 +71,7 @@ private:
static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent,
NameMap_t tabMapping, std::string errorNotify, Callback_t cback, invokationFn_t invoker);
std::vector<LLUUID> mPrepurchaseIds;
boost::signals2::scoped_connection mCapsReceivedConnection;
};
#endif //LL_LLFLOATEREXPERIENCES_H
+2 -2
View File
@@ -487,13 +487,13 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
names_requested.push_back(owner_id);
if (is_group_owned)
{
gCacheName->getGroup(owner_id,
mGroupNameCacheConnection = gCacheName->getGroup(owner_id,
boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
this, _1, _2));
}
else
{
LLAvatarNameCache::get(owner_id,
mAvatarNameCacheConnection = LLAvatarNameCache::get(owner_id,
boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache,
this, _1, _2));
}
+3
View File
@@ -136,6 +136,9 @@ private:
std::vector<LLSD> mObjectListItems;
boost::signals2::scoped_connection mAvatarNameCacheConnection;
boost::signals2::scoped_connection mGroupNameCacheConnection;
void getLandScriptResourcesCoro(std::string url);
void getLandScriptSummaryCoro(std::string url);
void getLandScriptDetailsCoro(std::string url);
+5 -1
View File
@@ -710,6 +710,10 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife()
{
mAvatarNameCacheConnection.disconnect();
}
if (mMenuNameCacheConnection.connected())
{
mMenuNameCacheConnection.disconnect();
}
}
bool LLPanelProfileSecondLife::postBuild()
@@ -1458,7 +1462,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata)
}
else if (item_name == "edit_display_name")
{
LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2));
mMenuNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2));
LLFirstUse::setDisplayName(false);
}
else if (item_name == "edit_partner")
+1
View File
@@ -212,6 +212,7 @@ private:
bool mAllowEdit;
std::string mDescriptionText;
boost::signals2::connection mAvatarNameCacheConnection;
boost::signals2::connection mMenuNameCacheConnection;
};
+1 -1
View File
@@ -76,7 +76,7 @@ void LLSpeaker::lookupName()
{
if (mDisplayName.empty())
{
LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group???
mAvatarNameCacheConnection = LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group???
}
}
+3
View File
@@ -80,6 +80,9 @@ public:
bool mIsModerator;
bool mModeratorMutedVoice;
bool mModeratorMutedText;
private:
boost::signals2::scoped_connection mAvatarNameCacheConnection;
};
class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent