Actually fix crash 1, 5, and J
Removes a bad fix for beware's crash from forever ago
This commit is contained in:
@@ -4228,9 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
||||
if (always_underline) link_style->mUnderline = true;
|
||||
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
||||
};
|
||||
const auto&& cb = boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3);
|
||||
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : static_cast<LLUrlLabelCallback>(LLUrlRegistryNullCallback);
|
||||
auto& urlr = LLUrlRegistry::instance();
|
||||
while (!text.empty() && (force_replace_links ? urlr.findUrl(text, match, cb) : urlr.findUrl(text, match)))
|
||||
while (!text.empty() && urlr.findUrl(text, match, cb))
|
||||
{
|
||||
start = match.getStart();
|
||||
end = match.getEnd()+1;
|
||||
|
||||
@@ -673,12 +673,9 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -789,12 +786,9 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -928,13 +922,10 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
}
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1029,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
|
||||
std::string parcel_id_string = unescapeUrl(path_array[2]); // parcel id
|
||||
|
||||
// Add an observer to call LLUrlLabelCallback when we have parcel name.
|
||||
if (cb) addObserver(parcel_id_string, url, cb);
|
||||
addObserver(parcel_id_string, url, cb);
|
||||
|
||||
LLUUID parcel_id(parcel_id_string);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class LLAvatarName;
|
||||
typedef boost::signals2::signal<void (const std::string& url,
|
||||
const std::string& label,
|
||||
const std::string& icon)> LLUrlLabelSignal;
|
||||
typedef LLUrlLabelSignal::slot_function_type LLUrlLabelCallback;
|
||||
typedef LLUrlLabelSignal::slot_type LLUrlLabelCallback;
|
||||
|
||||
///
|
||||
/// LLUrlEntryBase is the base class of all Url types registered in the
|
||||
|
||||
Reference in New Issue
Block a user