summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-13 18:26:53 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-05-13 21:25:58 +0300
commit2008f87f10d51a2f9372aa4a4d72e86ac94e1e81 (patch)
tree2f9f228e3e08380ddad59539669f31667d3dd4a7 /indra/newview
parentad6425173900855852b8c8437cc88120ea46cc53 (diff)
Revert "viewer#819 Avoid reading the same XML file multiple times"
This reverts commit a865d423974ea06dffa47798c81e98e7570b02ec. Reason for revert: viewer#1420, reverting to not hold maint-A (is deepCopy not full?)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llblocklist.cpp5
-rw-r--r--indra/newview/llchathistory.cpp6
-rw-r--r--indra/newview/llcommandlineparser.cpp7
-rw-r--r--indra/newview/llfavoritesbar.cpp5
-rw-r--r--indra/newview/llmediactrl.cpp2
-rw-r--r--indra/newview/llnotificationlistitem.cpp2
-rw-r--r--indra/newview/lltoast.cpp2
-rw-r--r--indra/newview/lltoastnotifypanel.cpp4
-rw-r--r--indra/newview/lltoastscriptquestion.cpp2
-rw-r--r--indra/newview/llviewertexturelist.cpp2
11 files changed, 19 insertions, 20 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a73885549a..56521895c1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2995,7 +2995,7 @@ void LLAppViewer::initStrings()
{
std::string strings_file = "strings.xml";
std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file);
- if (strings_path_full.empty() || !gDirUtilp->fileExists(strings_path_full))
+ if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
{
if (strings_path_full.empty())
{
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 16db32862d..29be2aaa6d 100644
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -61,9 +61,8 @@ LLBlockList::LLBlockList(const Params& p)
LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_people_blocked_gear.xml",
gMenuHolder,
- LLViewerMenuHolderGL::child_registry_t::instance(),
- true);
- if (context_menu)
+ LLViewerMenuHolderGL::child_registry_t::instance());
+ if(context_menu)
{
mContextMenu = context_menu->getHandle();
}
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 0c365d33c4..7d9fa2a475 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -131,7 +131,7 @@ public:
static LLChatHistoryHeader* createInstance(const std::string& file_name)
{
LLChatHistoryHeader* pInstance = new LLChatHistoryHeader;
- pInstance->buildFromFile(file_name, true);
+ pInstance->buildFromFile(file_name);
return pInstance;
}
@@ -587,7 +587,7 @@ public:
mUserNameTextBox = getChild<LLTextBox>("user_name");
mTimeBoxTextBox = getChild<LLTextBox>("time_box");
- mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance(), true);
+ mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
if (mInfoCtrl)
{
mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
@@ -1181,7 +1181,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)
LLView* LLChatHistory::getSeparator()
{
- LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance(), true);
+ LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance());
return separator;
}
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 030d24bed8..bc61fac00b 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -657,11 +657,12 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
// This method reads the llsd based config file, and uses it to set
// members of a control group.
LLSD clpConfigLLSD;
+
+ llifstream input_stream;
+ input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary);
- std::string xml = gDirUtilp->getFileContents(config_filename);
- if (!xml.empty())
+ if(input_stream.is_open())
{
- std::stringstream input_stream(xml);
LLSDSerialize::fromXML(clpConfigLLSD, input_stream);
for(LLSD::map_iterator option_itr = clpConfigLLSD.beginMap();
option_itr != clpConfigLLSD.endMap();
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a46cc0ce30..727f5592cd 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -886,11 +886,10 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
if (!params_initialized)
{
LLXMLNodePtr button_xml_node;
- static const std::string filename("favorites_bar_button.xml");
- if (LLUICtrlFactory::getLayeredXMLNode(filename, button_xml_node, LLDir::CURRENT_SKIN, true))
+ if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node))
{
LLXUIParser parser;
- parser.readXUI(button_xml_node, button_params, filename);
+ parser.readXUI(button_xml_node, button_params, "favorites_bar_button.xml");
}
params_initialized = true;
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 72fbab406b..5461f98624 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -633,7 +633,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool cl
void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
{
std::string filename(gDirUtilp->add(subdir, filename_in));
- std::string expanded_filename = gDirUtilp->findSkinnedFilename(LLDir::HTML, filename);
+ std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", filename);
if (expanded_filename.empty())
{
diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index 79a90c4f4c..75edac105a 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -594,7 +594,7 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p)
mSystemNotificationIcon(NULL),
mIsCaution(false)
{
- buildFromFile("panel_notification_list_item.xml", true);
+ buildFromFile("panel_notification_list_item.xml");
mIsCaution = p.notification_priority >= NOTIFICATION_PRIORITY_HIGH;
if (mIsCaution)
{
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 5cf2e89c63..f6fadf276c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -119,7 +119,7 @@ LLToast::LLToast(const LLToast::Params& p)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
- buildFromFile("panel_toast.xml", true);
+ buildFromFile("panel_toast.xml");
setCanDrag(false);
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index f7bebf08aa..1f6a88cd95 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -266,9 +266,9 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
LLRect current_rect = getRect();
setXMLFilename("");
- buildFromFile("panel_notification.xml", true);
+ buildFromFile("panel_notification.xml");
- if (rect != LLRect::null)
+ if(rect != LLRect::null)
{
this->setShape(rect);
}
diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp
index 49fbf885eb..f6fc9e7889 100644
--- a/indra/newview/lltoastscriptquestion.cpp
+++ b/indra/newview/lltoastscriptquestion.cpp
@@ -37,7 +37,7 @@ LLToastScriptQuestion::LLToastScriptQuestion(const LLNotificationPtr& notificati
:
LLToastPanel(notification)
{
- buildFromFile("panel_script_question_toast.xml", true);
+ buildFromFile("panel_script_question_toast.xml");
}
bool LLToastScriptQuestion::postBuild()
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 67ce589142..9ed96a22d6 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -416,7 +416,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
return NULL ;
}
- std::string full_path = gDirUtilp->findSkinnedFilename(LLDir::TEXTURES, filename);
+ std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL;