From d3448fa204a648d61d07f12ecc982841160380d2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 30 Jan 2024 01:50:15 +0200 Subject: BugSplat Crash #1409959 onTopLost onTopLost crashed 1. It contradicts callstack, but clearPopups() definetely has an issue due to not checking the pointer prior to calling onTopLost 2. According to callstack, crash happened around ~LLFolderViewFolder and while it does call removePopup for itself, it isn't a popup, the only one in the list would be the renamer, which calls back to parent, so made sure to secure it. 3. mFlashTimer was never deleted 4. Some explicit cleanup for TopLost --- indra/newview/llsplitbutton.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsplitbutton.h') diff --git a/indra/newview/llsplitbutton.h b/indra/newview/llsplitbutton.h index 4f20c8b379..dbb18c0c62 100644 --- a/indra/newview/llsplitbutton.h +++ b/indra/newview/llsplitbutton.h @@ -67,7 +67,7 @@ public: }; - virtual ~LLSplitButton() {}; + virtual ~LLSplitButton(); //Overridden virtual void onFocusLost(); @@ -99,6 +99,8 @@ protected: LLButton* mShownItem; EArrowPosition mArrowPosition; + boost::signals2::connection mTopLostSignalConnection; + commit_callback_t mSelectionCallback; }; -- cgit v1.2.3 From 1b68f71348ecf3983b76b40d7940da8377f049b7 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 29 Apr 2024 07:43:28 +0300 Subject: #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed --- indra/newview/llsplitbutton.h | 100 +++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'indra/newview/llsplitbutton.h') diff --git a/indra/newview/llsplitbutton.h b/indra/newview/llsplitbutton.h index 4f20c8b379..427ed7ba76 100644 --- a/indra/newview/llsplitbutton.h +++ b/indra/newview/llsplitbutton.h @@ -1,25 +1,25 @@ -/** +/** * @file llsplitbutton.h * @brief LLSplitButton base class * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -37,69 +37,69 @@ #define LL_LLSPLITBUTTON_H class LLSplitButton - : public LLUICtrl + : public LLUICtrl { public: - typedef enum e_arrow_position - { - LEFT, - RIGHT - } EArrowPosition; + typedef enum e_arrow_position + { + LEFT, + RIGHT + } EArrowPosition; - struct ArrowPositionValues : public LLInitParam::TypeValuesHelper - { - static void declareValues(); - }; + struct ArrowPositionValues : public LLInitParam::TypeValuesHelper + { + static void declareValues(); + }; - struct ItemParams : public LLInitParam::Block - { - ItemParams(); - }; + struct ItemParams : public LLInitParam::Block + { + ItemParams(); + }; - struct Params : public LLInitParam::Block - { - Optional arrow_position; - Optional arrow_button; - Optional items_panel; - Multiple items; + struct Params : public LLInitParam::Block + { + Optional arrow_position; + Optional arrow_button; + Optional items_panel; + Multiple items; - Params(); - }; + Params(); + }; - virtual ~LLSplitButton() {}; + virtual ~LLSplitButton() {}; - //Overridden - virtual void onFocusLost(); - virtual void setFocus(BOOL b); - virtual void setEnabled(BOOL enabled); + //Overridden + virtual void onFocusLost(); + virtual void setFocus(BOOL b); + virtual void setEnabled(BOOL enabled); - //Callbacks - void onArrowBtnDown(); - void onHeldDownShownButton(); - void onItemSelected(LLUICtrl* ctrl); - void setSelectionCallback(commit_callback_t cb) { mSelectionCallback = cb; } + //Callbacks + void onArrowBtnDown(); + void onHeldDownShownButton(); + void onItemSelected(LLUICtrl* ctrl); + void setSelectionCallback(commit_callback_t cb) { mSelectionCallback = cb; } - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); - virtual void showButtons(); - virtual void hideButtons(); + virtual void showButtons(); + virtual void hideButtons(); protected: - friend class LLUICtrlFactory; - LLSplitButton(const LLSplitButton::Params& p); + friend class LLUICtrlFactory; + LLSplitButton(const LLSplitButton::Params& p); - LLButton* prepareItemButton(LLButton::Params params); - LLPanel* prepareItemsPanel(LLPanel::Params params, S32 items_count); + LLButton* prepareItemButton(LLButton::Params params); + LLPanel* prepareItemsPanel(LLPanel::Params params, S32 items_count); - LLPanel* mItemsPanel; - std::list mHidenItems; - LLButton* mArrowBtn; - LLButton* mShownItem; - EArrowPosition mArrowPosition; + LLPanel* mItemsPanel; + std::list mHidenItems; + LLButton* mArrowBtn; + LLButton* mShownItem; + EArrowPosition mArrowPosition; - commit_callback_t mSelectionCallback; + commit_callback_t mSelectionCallback; }; -- cgit v1.2.3