From 49d60e0ded52c095c834e9ca134b67282728b389 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 1 Jul 2024 22:24:32 -0400 Subject: Reduce string temporaries from LLFloaterReg find/get --- indra/newview/llfloatersidepanelcontainer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatersidepanelcontainer.h') diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index d5d0c43cae..19d6c747cb 100644 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -55,17 +55,17 @@ public: void cleanup() { destroy(); } - LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params); + LLPanel* openChildPanel(std::string_view panel_name, const LLSD& params); static LLFloater* getTopmostInventoryFloater(); - static void showPanel(const std::string& floater_name, const LLSD& key); + static void showPanel(std::string_view floater_name, const LLSD& key); - static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key); + static void showPanel(std::string_view floater_name, std::string_view panel_name, const LLSD& key); - static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName); + static LLPanel* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName); - static LLPanel* findPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName); + static LLPanel* findPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName); /** * Gets the panel of given type T (doesn't show it or do anything else with it). @@ -75,7 +75,7 @@ public: * @returns a pointer to the panel of given type T. */ template - static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName) + static T* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName) { T* panel = dynamic_cast(getPanel(floater_name, panel_name)); if (!panel) -- cgit v1.2.3 From ace506cc8aec370b739b40ab2afa7c1fef4cc030 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 18 Jul 2024 07:38:36 +0300 Subject: viewer#1997 Warn user if closing appearance with unsaved changes --- indra/newview/llfloatersidepanelcontainer.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatersidepanelcontainer.h') diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index 19d6c747cb..d7f6c309c4 100644 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -49,9 +49,11 @@ public: LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams()); ~LLFloaterSidePanelContainer(); - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; - /*virtual*/ void closeFloater(bool app_quitting = false); + void closeFloater(bool app_quitting = false) override; + + void onClickCloseBtn(bool app_qutting) override; void cleanup() { destroy(); } @@ -84,6 +86,9 @@ public: } return panel; } + +protected: + void onCloseMsgCallback(const LLSD& notification, const LLSD& response); }; #endif // LL_LLFLOATERSIDEPANELCONTAINER_H -- cgit v1.2.3