From 11e6cf4980c8a882476d8f6eed105a21230d81c3 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 10 Aug 2022 19:32:37 +0200 Subject: [PATCH 01/81] Fix wrong name --- autobuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild.xml b/autobuild.xml index 5a5d70e85f..e80b916201 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2975,7 +2975,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors http://3p.firestormviewer.org/threejs-0.132.2-linux64-213500940.tar.bz2 name - darwin64 + linux64 darwin64 From 4d5b5a5ae3b2ebbc420065c623586c3c10b3d380 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 11 Aug 2022 21:56:48 +0200 Subject: [PATCH 02/81] Enable c++17 since it seems LL is hesitant to finally do it... --- autobuild.xml | 8 +- indra/CMakeLists.txt | 2 + indra/llcommon/llsd.h | 43 ----- indra/llcommon/llstl.h | 238 +------------------------- indra/llcommon/tests/llleap_test.cpp | 2 +- indra/llinventory/llparcel.cpp | 2 +- indra/llmessage/llcircuit.cpp | 11 +- indra/llmessage/lldispatcher.cpp | 2 +- indra/llmessage/llmessagethrottle.cpp | 22 --- indra/llui/lldockablefloater.h | 4 +- indra/newview/llappearancemgr.h | 2 +- indra/newview/llfavoritesbar.cpp | 2 +- indra/newview/llfloater360capture.cpp | 2 +- indra/newview/llfloaterregioninfo.cpp | 4 +- indra/newview/llgesturemgr.cpp | 2 +- indra/newview/lltoast.h | 2 +- indra/newview/llwatchdog.cpp | 4 +- indra/test/lldoubledispatch_tut.cpp | 8 +- 18 files changed, 30 insertions(+), 330 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index e80b916201..35295621f3 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -748,9 +748,9 @@ archive hash - 343e46ea49a08ad6596d3dc702d5b812 + 1c094d709a35b252bba7b6ef1871085c url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95883/856128/colladadom-2.3.569219-windows-569219.tar.bz2 + http://3p.firestormviewer.org/colladadom-2.3.222231850-windows-222231850.tar.bz2 name windows @@ -760,9 +760,9 @@ archive hash - de5bdfb61b31db56c5fe7d0962ad11e2 + a7596da3696fc423ec1bc7d6764c01ab url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95884/856129/colladadom-2.3.569219-windows64-569219.tar.bz2 + http://3p.firestormviewer.org/colladadom-2.3.222231903-windows64-222231903.tar.bz2 name windows64 diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 962f9d006c..9386de5302 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -6,6 +6,8 @@ ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR) +set(CMAKE_CXX_STANDARD 17) # Enable c++17 on all platforms + set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") project(${ROOT_PROJECT_NAME}) diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 24cb9bbce1..1f503938b5 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -421,49 +421,6 @@ public: static std::string typeString(Type type); // Return human-readable type as a string }; -struct llsd_select_bool : public std::unary_function -{ - LLSD::Boolean operator()(const LLSD& sd) const - { - return sd.asBoolean(); - } -}; -struct llsd_select_integer : public std::unary_function -{ - LLSD::Integer operator()(const LLSD& sd) const - { - return sd.asInteger(); - } -}; -struct llsd_select_real : public std::unary_function -{ - LLSD::Real operator()(const LLSD& sd) const - { - return sd.asReal(); - } -}; -struct llsd_select_float : public std::unary_function -{ - F32 operator()(const LLSD& sd) const - { - return (F32)sd.asReal(); - } -}; -struct llsd_select_uuid : public std::unary_function -{ - LLSD::UUID operator()(const LLSD& sd) const - { - return sd.asUUID(); - } -}; -struct llsd_select_string : public std::unary_function -{ - LLSD::String operator()(const LLSD& sd) const - { - return sd.asString(); - } -}; - LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd); namespace llsd diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index a90c2c7e08..3e81179957 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -40,31 +40,6 @@ // For strcmp #include #endif -// Use to compare the first element only of a pair -// e.g. typedef std::set, compare_pair > some_pair_set_t; -template -struct compare_pair_first -{ - bool operator()(const std::pair& a, const std::pair& b) const - { - return a.first < b.first; - } -}; - -template -struct compare_pair_greater -{ - bool operator()(const std::pair& a, const std::pair& b) const - { - if (!(a.first < b.first)) - return true; - else if (!(b.first < a.first)) - return false; - else - return !(a.second < b.second); - } -}; - // Use to compare the contents of two pointers (e.g. std::string*) template struct compare_pointer_contents @@ -123,58 +98,6 @@ struct DeletePairedPointerArray }; -// Alternate version of the above so that has a more cumbersome -// syntax, but it can be used with compositional functors. -// NOTE: The functor retuns a bool because msdev bombs during the -// composition if you return void. Once we upgrade to a newer -// compiler, the second unary_function template parameter can be set -// to void. -// -// Here's a snippet showing how you use this object: -// -// typedef std::map map_type; -// map_type widget_map; -// ... // add elements -// // delete them all -// for_each(widget_map.begin(), -// widget_map.end(), -// llcompose1(DeletePointerFunctor(), -// llselect2nd())); - -template -struct DeletePointerFunctor : public std::unary_function -{ - bool operator()(T* ptr) const - { - delete ptr; - return true; - } -}; - -// See notes about DeleteArray for why you should consider avoiding this. -template -struct DeleteArrayFunctor : public std::unary_function -{ - bool operator()(T* ptr) const - { - delete[] ptr; - return true; - } -}; - -// CopyNewPointer is a simple helper which accepts a pointer, and -// returns a new pointer built with the copy constructor. Example: -// -// transform(in.begin(), in.end(), out.end(), CopyNewPointer()); - -struct CopyNewPointer -{ - template T* operator()(const T* ptr) const - { - return new T(*ptr); - } -}; - template void delete_and_clear(std::list& list) { @@ -363,161 +286,6 @@ OutputIter ll_transform_n( } - -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - - -// helper to deal with the fact that MSDev does not package -// select... with the stl. Look up usage on the sgi website. - -template -struct _LLSelect1st : public std::unary_function<_Pair, typename _Pair::first_type> { - const typename _Pair::first_type& operator()(const _Pair& __x) const { - return __x.first; - } -}; - -template -struct _LLSelect2nd : public std::unary_function<_Pair, typename _Pair::second_type> -{ - const typename _Pair::second_type& operator()(const _Pair& __x) const { - return __x.second; - } -}; - -template struct llselect1st : public _LLSelect1st<_Pair> {}; -template struct llselect2nd : public _LLSelect2nd<_Pair> {}; - -// helper to deal with the fact that MSDev does not package -// compose... with the stl. Look up usage on the sgi website. - -template -class ll_unary_compose : - public std::unary_function -{ -protected: - _Operation1 __op1; - _Operation2 __op2; -public: - ll_unary_compose(const _Operation1& __x, const _Operation2& __y) - : __op1(__x), __op2(__y) {} - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { - return __op1(__op2(__x)); - } -}; - -template -inline ll_unary_compose<_Operation1,_Operation2> -llcompose1(const _Operation1& __op1, const _Operation2& __op2) -{ - return ll_unary_compose<_Operation1,_Operation2>(__op1, __op2); -} - -template -class ll_binary_compose - : public std::unary_function { -protected: - _Operation1 _M_op1; - _Operation2 _M_op2; - _Operation3 _M_op3; -public: - ll_binary_compose(const _Operation1& __x, const _Operation2& __y, - const _Operation3& __z) - : _M_op1(__x), _M_op2(__y), _M_op3(__z) { } - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { - return _M_op1(_M_op2(__x), _M_op3(__x)); - } -}; - -template -inline ll_binary_compose<_Operation1, _Operation2, _Operation3> -llcompose2(const _Operation1& __op1, const _Operation2& __op2, - const _Operation3& __op3) -{ - return ll_binary_compose<_Operation1,_Operation2,_Operation3> - (__op1, __op2, __op3); -} - -// helpers to deal with the fact that MSDev does not package -// bind... with the stl. Again, this is from sgi. -template -class llbinder1st : - public std::unary_function { -protected: - _Operation op; - typename _Operation::first_argument_type value; -public: - llbinder1st(const _Operation& __x, - const typename _Operation::first_argument_type& __y) - : op(__x), value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::second_argument_type& __x) const { - return op(value, __x); - } -}; - -template -inline llbinder1st<_Operation> -llbind1st(const _Operation& __oper, const _Tp& __x) -{ - typedef typename _Operation::first_argument_type _Arg1_type; - return llbinder1st<_Operation>(__oper, _Arg1_type(__x)); -} - -template -class llbinder2nd - : public std::unary_function { -protected: - _Operation op; - typename _Operation::second_argument_type value; -public: - llbinder2nd(const _Operation& __x, - const typename _Operation::second_argument_type& __y) - : op(__x), value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::first_argument_type& __x) const { - return op(__x, value); - } -}; - -template -inline llbinder2nd<_Operation> -llbind2nd(const _Operation& __oper, const _Tp& __x) -{ - typedef typename _Operation::second_argument_type _Arg2_type; - return llbinder2nd<_Operation>(__oper, _Arg2_type(__x)); -} - /** * Compare std::type_info* pointers a la std::less. We break this out as a * separate function for use in two different std::less specializations. @@ -548,8 +316,7 @@ bool before(const std::type_info* lhs, const std::type_info* rhs) namespace std { template <> - struct less: - public std::binary_function + struct less { bool operator()(const std::type_info* lhs, const std::type_info* rhs) const { @@ -558,8 +325,7 @@ namespace std }; template <> - struct less: - public std::binary_function + struct less { bool operator()(std::type_info* lhs, std::type_info* rhs) const { diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 9754353ab0..d12f2935e8 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -531,7 +531,7 @@ namespace tut result.ensure(); } - struct TestLargeMessage: public std::binary_function + struct TestLargeMessage { TestLargeMessage(const std::string& PYTHON_, const std::string& reader_module_, const std::string& test_name_): diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index b39407f54f..e195d33f18 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1269,5 +1269,5 @@ U32 LLParcel::countExperienceKeyType( U32 type ) return std::count_if( boost::begin(mExperienceKeys | boost::adaptors::map_values), boost::end(mExperienceKeys | boost::adaptors::map_values), - std::bind2nd(std::equal_to(), type)); + [type](U32 key) { return key == type; }); } diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 5e5639da19..bb04590758 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -443,12 +443,11 @@ LLCircuit::LLCircuit(const F32Seconds circuit_heartbeat_interval, const F32Secon LLCircuit::~LLCircuit() { - // delete pointers in the map. - std::for_each(mCircuitData.begin(), - mCircuitData.end(), - llcompose1( - DeletePointerFunctor(), - llselect2nd())); + // delete pointers in the map. + for (auto circ_pair : mCircuitData) + { + delete circ_pair.second; + } } LLCircuitData *LLCircuit::addCircuitData(const LLHost &host, TPACKETID in_id) diff --git a/indra/llmessage/lldispatcher.cpp b/indra/llmessage/lldispatcher.cpp index 717ef10f70..278b3023f8 100644 --- a/indra/llmessage/lldispatcher.cpp +++ b/indra/llmessage/lldispatcher.cpp @@ -62,7 +62,7 @@ void LLDispatcher::copyAllHandlerNames(keys_t& names) const mHandlers.begin(), mHandlers.end(), std::back_insert_iterator(names), - llselect1st()); + [](const dispatch_map_t::value_type& pair) { return pair.first; }); } bool LLDispatcher::dispatch( diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 579d6d7187..c5ae8b4547 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -32,18 +32,8 @@ #include "llframetimer.h" // This is used for the stl search_n function. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n -struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool > -{ - bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const - { - return a.getHash() == b.getHash(); - } -}; -#else bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b) { return a.getHash() == b.getHash(); } -#endif const U64 SEC_TO_USEC = 1000000; @@ -118,14 +108,8 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif if (found == message_list->end()) { // This message was not found. Add it to the list. @@ -152,14 +136,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif if (found == message_list->end()) { diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 0e7c201bdf..326cc57b89 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -108,7 +108,7 @@ public: * * By default returns false. */ - virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); } + virtual bool overlapsScreenChannel() const { return mOverlapsScreenChannel && getVisible() && isDocked(); } virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; } bool getUniqueDocking() { return mUniqueDocking; } @@ -131,7 +131,7 @@ protected: boost::function mIsDockedStateForcedCallback; //private: // Make mDockControl accessible from children because of FIRE-16803 - std::auto_ptr mDockControl; + std::unique_ptr mDockControl; private: // Make mDockControl accessible from children because of FIRE-16803 LLUIImagePtr mDockTongue; static LLHandle sInstanceHandle; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 75e3275a91..c445b6f06d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -305,7 +305,7 @@ private: LLUUID mCOFImageID; - std::auto_ptr mUnlockOutfitTimer; + std::unique_ptr mUnlockOutfitTimer; // Set of temp attachment UUIDs that should be removed typedef std::set doomed_temp_attachments_t; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index c843fd0f7c..028689fb00 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1002,7 +1002,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) { //find last visible child to get the rightest button offset child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(), - std::mem_fun(&LLView::getVisible)); + [](child_list_t::value_type child){ return child->getVisible(); }); if(last_visible_it != childs->rend()) { last_right_edge = (*last_visible_it)->getRect().mRight; diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 6eec980da8..fb20144a54 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -892,7 +892,7 @@ const std::string LLFloater360Capture::generate_proposed_filename() // this looks complex but it's straightforward - removes all non-alpha chars from a string // which in this case is the SL region name - we use it as a proposed filename but the user is free to change std::string region_name = region->getName(); - std::replace_if(region_name.begin(), region_name.end(), std::not1(std::ptr_fun(isalnum)), '_'); + std::replace_if(region_name.begin(), region_name.end(), [](const auto& c) { return isalnum(c) == 0; }, '_'); if (region_name.length() > 0) { filename << region_name; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 1061bdb6ec..03c74a8747 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -719,9 +719,7 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) std::for_each( mInfoPanels.begin(), mInfoPanels.end(), - llbind2nd( - std::mem_fun(&LLPanelRegionInfo::refreshFromRegion), - region)); + [region](info_panels_t::value_type panel) { panel->refreshFromRegion(region); }); mEnvironmentPanel->refreshFromRegion(region); } diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index c03821490d..ef6d91efe6 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -773,7 +773,7 @@ S32 LLGestureMgr::getPlayingCount() const } -struct IsGesturePlaying : public std::unary_function +struct IsGesturePlaying { bool operator()(const LLMultiGesture* gesture) const { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 69074b1670..2b1fedf74d 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -222,7 +222,7 @@ private: LLPanel* mWrapperPanel; // timer counts a lifetime of a toast - std::auto_ptr mTimer; + std::unique_ptr mTimer; F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index 152f957cc5..83d88c6af4 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -231,7 +231,7 @@ void LLWatchdog::run() LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL; std::for_each(mSuspects.begin(), mSuspects.end(), - std::mem_fun(&LLWatchdogEntry::reset) + [](SuspectsRegistry::value_type suspect) { suspect->reset(); } ); } else @@ -239,7 +239,7 @@ void LLWatchdog::run() SuspectsRegistry::iterator result = std::find_if(mSuspects.begin(), mSuspects.end(), - std::not1(std::mem_fun(&LLWatchdogEntry::isAlive)) + [](SuspectsRegistry::value_type suspect) { return !suspect->isAlive(); } ); if(result != mSuspects.end()) { diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp index ad8f6454d4..e38d0e92a3 100644 --- a/indra/test/lldoubledispatch_tut.cpp +++ b/indra/test/lldoubledispatch_tut.cpp @@ -135,10 +135,10 @@ namespace tut // Instantiate a few GameObjects. Make sure we refer to them // polymorphically, and don't let them leak. - std::auto_ptr home; - std::auto_ptr obstacle; - std::auto_ptr tug; - std::auto_ptr patrol; + std::unique_ptr home; + std::unique_ptr obstacle; + std::unique_ptr tug; + std::unique_ptr patrol; // prototype objects Asteroid dummyAsteroid; From c7e04f0cae61f989b1fe4fdfb2cc787c8163ee4b Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 11 Aug 2022 22:28:22 +0200 Subject: [PATCH 03/81] Mac; Update Collada with a C++17 compatible version. --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 35295621f3..1fda1cd8b8 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -724,9 +724,9 @@ archive hash - 4699b8389dfb754da0393ddb5d325722 + f283a064c30695bd7bf071f1bd481f32 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95882/856117/colladadom-2.3.569219-darwin64-569219.tar.bz2 + https://3p.firestormviewer.org/colladadom-2.3.222232011-darwin64-222232011.tar.bz2 name darwin64 @@ -738,7 +738,7 @@ hash e1a8e9eca2894687b3532474ffc9b326 url - http://3p.firestormviewer.org/colladadom-2.3.222130404-linux64-222130404.tar.bz2 + https://3p.firestormviewer.org/colladadom-2.3.222130404-linux64-222130404.tar.bz2 name linux64 @@ -750,7 +750,7 @@ hash 1c094d709a35b252bba7b6ef1871085c url - http://3p.firestormviewer.org/colladadom-2.3.222231850-windows-222231850.tar.bz2 + https://3p.firestormviewer.org/colladadom-2.3.222231850-windows-222231850.tar.bz2 name windows @@ -762,7 +762,7 @@ hash a7596da3696fc423ec1bc7d6764c01ab url - http://3p.firestormviewer.org/colladadom-2.3.222231903-windows64-222231903.tar.bz2 + https://3p.firestormviewer.org/colladadom-2.3.222231903-windows64-222231903.tar.bz2 name windows64 From dcfe6760e9dd645b7c8657b70fd343b8595dfd81 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 12 Aug 2022 12:04:06 +0200 Subject: [PATCH 04/81] Wrap these - might be the reason GCC is complaining --- indra/llmath/llcalcparser.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index 387f93b98e..7054abd5bc 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -141,14 +141,14 @@ struct LLCalcParser : grammar power = unary_expr[power.value = arg1] >> - *('^' >> assert_syntax(unary_expr[power.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&powf)(power.value, arg1)])) + *('^' >> assert_syntax(unary_expr[power.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_pow)(self, power.value, arg1)])) ; term = power[term.value = arg1] >> *(('*' >> assert_syntax(power[term.value *= arg1])) | ('/' >> assert_syntax(power[term.value /= arg1])) | - ('%' >> assert_syntax(power[term.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&fmodf)(term.value, arg1)])) + ('%' >> assert_syntax(power[term.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_fmod)(self, term.value, arg1)])) ) ; @@ -195,6 +195,8 @@ private: F32 _floor(const F32& a) const { return (F32)llfloor(a); } F32 _ceil(const F32& a) const { return llceil(a); } F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); } + F32 _pow(const F32& a, const F32& b) const { return powf(a, b); } + F32 _fmod(const F32&a, const F32& b) const { return fmodf(a, b); } LLCalc::calc_map_t* mConstants; LLCalc::calc_map_t* mVariables; From 62ecb566401c835a54ea19128a081ed1decf77d5 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 12 Aug 2022 18:14:52 +0200 Subject: [PATCH 05/81] Move viewer specific warnings from variables to viewer cmake. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index e34283d728..791cd08a27 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -276,7 +276,7 @@ if (LINUX OR DARWIN) set(GCC_CXX_WARNINGS "$[GCC_WARNINGS] -Wno-reorder -Wno-unused-const-variable -Wno-format-extra-args -Wno-unused-private-field -Wno-unused-function -Wno-tautological-compare -Wno-empty-body -Wno-unused-variable -Wno-unused-value") else (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND DARWIN AND XCODE_VERSION GREATER 4.9) #elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-unused-but-set-variable") endif () set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") From 9e0104810904284a91fac8f2a1db6e068e1844d6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 12 Aug 2022 18:15:39 +0200 Subject: [PATCH 06/81] Make the collada includes sysrem incudes (lets compilers be way lss picky about warnings in them). --- indra/llprimitive/CMakeLists.txt | 6 +----- indra/newview/CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index fa1e01d22c..c2069ce3f8 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -19,17 +19,13 @@ include_directories( ${LLXML_INCLUDE_DIRS} # ${LIBS_PREBUILT_DIR}/include/collada # ${LIBS_PREBUILT_DIR}/include/collada/1.4 - ${COLLADA_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) include_directories(SYSTEM ${LLCOMMON_SYSTEM_INCLUDE_DIRS} ${LLXML_SYSTEM_INCLUDE_DIRS} ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} + ${COLLADA_INCLUDE_DIRS} ) set(llprimitive_SOURCE_FILES diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a438ae61de..a61387d1db 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -104,12 +104,8 @@ include_directories( ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ${LLLOGIN_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada - ${LIBS_PREBUILD_DIR}/include/hunspell ${OPENAL_LIB_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada/1.4 ${GROWL_INCLUDE_DIRS} - ${COLLADA_INCLUDE_DIRS} ${LLAPPEARANCE_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} @@ -120,6 +116,10 @@ include_directories(SYSTEM ${LLCOMMON_SYSTEM_INCLUDE_DIRS} ${LLXML_SYSTEM_INCLUDE_DIRS} ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} + ${LIBS_PREBUILT_DIR}/include/collada + ${LIBS_PREBUILT_DIR}/include/collada/1.4 + ${LIBS_PREBUILD_DIR}/include/hunspell + ${COLLADA_INCLUDE_DIRS} ) if (USE_BUGSPLAT) From 178631838a6c913a26b8571d0aa5e5c255218bd9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 12 Aug 2022 20:11:36 +0200 Subject: [PATCH 07/81] FIRE-31882 / FIRE-31896 / FIRE-31913 / FIRE-31920: Fix all kind of weird menu focus issues by undoing LL's garbage truck full of nonsense change --- indra/llui/llmenugl.cpp | 8 ++++---- indra/newview/skins/default/xui/en/main_view.xml | 16 ++-------------- .../default/xui/en/panel_navigation_bar.xml | 1 + .../skins/default/xui/en/panel_status_bar.xml | 1 + 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 0616ed179c..6a024c3ff6 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1545,16 +1545,16 @@ void LLMenuItemBranchDownGL::onFocusLost() { // needed for tab-based selection LLMenuItemBranchGL::onFocusLost(); - LLMenuGL::setKeyboardMode(FALSE); - setHighlight(FALSE); + //LLMenuGL::setKeyboardMode(FALSE); + //setHighlight(FALSE); } void LLMenuItemBranchDownGL::setFocus(BOOL b) { // needed for tab-based selection LLMenuItemBranchGL::setFocus(b); - LLMenuGL::setKeyboardMode(b); - setHighlight(b); + //LLMenuGL::setKeyboardMode(b); + //setHighlight(b); } BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 566b55b687..2c0966030c 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -23,16 +23,6 @@ visible="false" width="1024" /> - - - - - + - [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights More info] + [secondlife:///app/openfloater/object_weights More info] - - Paste Position + +Paste Position [VALUE] - - Paste Size + +Paste Size [VALUE] - - Paste Rotation + +Paste Rotation [VALUE] - + + + width="149"> Mesh Information: @@ -2628,7 +2622,7 @@ Lowest: left="125" halign="left" name="LOD_swap_label" - top_pad="3" + top_pad="3" value="LOD Swap" visible="false" width="60" /> @@ -2654,7 +2648,7 @@ Lowest: name="LOD_swap_fs_default" top_delta="0" visible="false" - width="30"> + width="30" > [APP_NAME_ABBR] [FACTOR] @@ -2795,6 +2789,34 @@ Low ↔ Lwst tool_tip="Allows object to flex about the Z axis (Client-side only)" top_pad="5" width="121" /> + + Physics Shape Type: @@ -3051,7 +3073,7 @@ Low ↔ Lwst layout="topleft" name="material" top_pad="5" - width="150" + width="134" left="144"> Nothing selected. + - [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights More info] + [secondlife:///app/openfloater/object_weights More info] - - Paste Position + +Paste Position [VALUE] - - Paste Size + +Paste Size [VALUE] - - Paste Rotation + +Paste Rotation [VALUE] - + + + width="149"> Mesh Information: @@ -2628,7 +2622,7 @@ Lowest: left="125" halign="left" name="LOD_swap_label" - top_pad="3" + top_pad="3" value="LOD Swap" visible="false" width="60" /> @@ -2654,7 +2648,7 @@ Lowest: name="LOD_swap_fs_default" top_delta="0" visible="false" - width="30"> + width="30" > [APP_NAME_ABBR] [FACTOR] @@ -2795,6 +2789,34 @@ Low ↔ Lwst tool_tip="Allows object to flex about the Z axis (Client-side only)" top_pad="5" width="121" /> + + Physics Shape Type: @@ -3051,7 +3073,7 @@ Low ↔ Lwst layout="topleft" name="material" top_pad="5" - width="150" + width="134" left="144"> Date: Sun, 14 Aug 2022 12:52:13 +0200 Subject: [PATCH 22/81] Make LLCOREHTTP_INCLUDE_DIRS system include directories, lets see if this makes never GCCs happy (in llcorehttp) --- indra/llcorehttp/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 1074f111d3..b7dfb5ba71 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -24,9 +24,11 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}) include_directories( ${LLMESSAGE_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} +# ${LLCOREHTTP_INCLUDE_DIRS} Make this system include directories. ) +include_directories( SYSTEM ${LLCOREHTTP_INCLUDE_DIRS} ) + set(llcorehttp_SOURCE_FILES bufferarray.cpp bufferstream.cpp From fe4826be2de43dd7f87612812f785076151253e0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 14 Aug 2022 12:59:22 +0200 Subject: [PATCH 23/81] Fix Starlight once again --- indra/newview/skins/starlight/xui/en/floater_tools.xml | 2 +- indra/newview/skins/starlightcui/xui/en/floater_tools.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/starlight/xui/en/floater_tools.xml b/indra/newview/skins/starlight/xui/en/floater_tools.xml index c7391345a3..0b8542ecde 100644 --- a/indra/newview/skins/starlight/xui/en/floater_tools.xml +++ b/indra/newview/skins/starlight/xui/en/floater_tools.xml @@ -871,7 +871,7 @@ top_pad="-5" visible="false" width="280"> - [secondlife:///app/openfloater/object_weights More info] + [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights More info] - [secondlife:///app/openfloater/object_weights More info] + [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights More info] Date: Sun, 14 Aug 2022 13:02:51 +0200 Subject: [PATCH 24/81] Stop this spam! --- indra/newview/llworldmipmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 32c2a4a2fe..c283c65999 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -201,7 +201,7 @@ LLPointer LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 //LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL; LLPointer img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL; + //LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL; img->setBoostLevel(LLGLTexture::BOOST_MAP); From 69b2092963937f0e74a3ba2af5fef1e31b01e00d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 14 Aug 2022 13:50:32 +0200 Subject: [PATCH 25/81] Refactor chatbar_as_cmdline - Or: What is all this??? --- indra/newview/chatbar_as_cmdline.cpp | 163 +++++++++++++-------------- indra/newview/chatbar_as_cmdline.h | 6 +- 2 files changed, 83 insertions(+), 86 deletions(-) diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 7181c9dddd..55e76122f3 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -72,9 +72,9 @@ std::string cmd_line_mPackagerTargetFolderName; LLUUID cmd_line_mPackagerTargetFolder; LLUUID cmd_line_mPackagerDest; -LLViewerInventoryItem::item_array_t findInventoryInFolder(const std::string& ifolder) +LLViewerInventoryItem::item_array_t findInventoryInFolder(std::string_view ifolder) { - LLUUID folder = gInventory.findCategoryByName(ifolder); + LLUUID folder = gInventory.findCategoryByName(ifolder.data()); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; gInventory.collectDescendents(folder, cats, items, FALSE); @@ -88,14 +88,15 @@ class JCZdrop : public LLEventTimer public: BOOL mRunning; - JCZdrop(std::stack stack, LLUUID dest, std::string sFolder, std::string sUUID, bool package = false) : LLEventTimer(1.f), mRunning(FALSE) - { - mPackage = package; - mStack = stack; - mDestination = dest; - mFolderName = sFolder; - mDropUUID = sUUID; - } + JCZdrop(std::stack stack, LLUUID dest, std::string_view sFolder, std::string_view sUUID, bool package = false) + : LLEventTimer(1.f), + mRunning(FALSE), + mPackage(package), + mStack(stack), + mDestination(dest), + mFolderName(sFolder), + mDropUUID(sUUID) + { } ~JCZdrop() { @@ -129,7 +130,7 @@ public: LLViewerObject* objectp = gObjectList.findObject(mDestination); if (objectp) { - report_to_nearby_chat(std::string("transferring ") + subj->getName()); + report_to_nearby_chat(std::string("Transferring ") + subj->getName()); LLToolDragAndDrop::dropInventory(objectp, subj, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); if (mStack.size() > 0) { @@ -137,7 +138,7 @@ public: } else { - return (mStack.size() == 0); + return (mStack.empty()); } } else @@ -156,7 +157,7 @@ private: bool mPackage; }; -JCZdrop* zdrop; +JCZdrop* gZDrop{ nullptr }; class ZdCleanup: public LLEventTimer { @@ -168,7 +169,7 @@ public: BOOL tick() { - zdrop = NULL; + gZDrop = nullptr; return TRUE; } }; @@ -193,7 +194,7 @@ class JCZtake : public LLEventTimer public: BOOL mRunning; - JCZtake(const LLUUID& target, bool package = false, LLUUID destination = LLUUID::null, std::string dtarget = "", EDeRezDestination dest = DRD_TAKE_INTO_AGENT_INVENTORY, bool use_selection = true, std::vector to_take = std::vector()) : + JCZtake(const LLUUID& target, bool package = false, const LLUUID& destination = LLUUID::null, std::string_view dtarget = "", EDeRezDestination dest = DRD_TAKE_INTO_AGENT_INVENTORY, bool use_selection = true, std::vector to_take = std::vector()) : LLEventTimer(0.66f), mTarget(target), mRunning(FALSE), @@ -255,11 +256,14 @@ public: mToTake.push_back(localid); } } - if (mToTake.size() > 0) mState = ZTS_TAKE; + if (!mToTake.empty()) + { + mState = ZTS_TAKE; + } break; case ZTS_TAKE: - if (mToTake.size() > 0) + if (!mToTake.empty()) { std::vector > inventory = findInventoryInFolder(mFolderName); mPackSize = mToTake.size() + inventory.size(); @@ -285,7 +289,7 @@ public: if (mToTake.size() % 10 == 0) { - if (mToTake.size() == 0) + if (mToTake.empty()) { if (mPackage) { @@ -348,7 +352,8 @@ public: if (itemstack.size() >= mPackSize || mCountdown == 0) { - if (itemstack.size() < mPackSize) { + if (itemstack.size() < mPackSize) + { report_to_nearby_chat("Phase 1 of the packager finished, but some items mave have been missed."); } else @@ -358,8 +363,8 @@ public: report_to_nearby_chat("Do not have the destination prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); - LLUUID sdest = LLUUID(mPackageDest); - new JCZdrop(itemstack, sdest, mFolderName.c_str(), mPackageDest.asString().c_str(), true); + LLUUID sdest{ mPackageDest }; + gZDrop = new JCZdrop(itemstack, sdest, mFolderName.c_str(), mPackageDest.asString().c_str(), true); doZtCleanup(); mState = ZTS_DONE; @@ -388,7 +393,7 @@ private: EZtakeState mState; }; -JCZtake* ztake; +JCZtake* gZTake{ nullptr }; class LOZtCleanup: public LLEventTimer { @@ -400,9 +405,9 @@ public: BOOL tick() { - ztake->mRunning = TRUE; - delete ztake; - ztake = NULL; + gZTake->mRunning = TRUE; + delete gZTake; + gZTake = nullptr; return TRUE; } }; @@ -470,7 +475,7 @@ public: { report_to_nearby_chat(llformat("%i...", mCountdown--)); } - else if (mToTake.size() > 0) + else if (!mToTake.empty()) { msg->newMessageFast(_PREHASH_DeRezObject); msg->nextBlockFast(_PREHASH_AgentData); @@ -492,7 +497,7 @@ public: if (mToTake.size() % 10 == 0) { - if (mToTake.size() == 0) + if (mToTake.empty()) { report_to_nearby_chat("Mtake has taken all selected objects. Say \"mtake off\" to deactivate Mtake or select more objects to continue."); } @@ -515,7 +520,7 @@ private: S32 zeroClearY; S32 zeroClearZ; }; -TMZtake* mtake; +TMZtake* gMTake; void invrepair() { @@ -534,7 +539,7 @@ void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) report_to_nearby_chat(llformat("%s: (%s)", id.asString().c_str(), name.c_str())); } -bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_gesture) +bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gesture) { static LLCachedControl sFSCmdLine(gSavedSettings, "FSCmdLine"); static LLCachedControl sFSCmdLinePos(gSavedSettings, "FSCmdLinePos"); @@ -556,12 +561,11 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge static LLCachedControl sFSCmdLineMusic(gSavedSettings, "FSCmdLineMusic"); static LLCachedControl sFSCmdLineCopyCam(gSavedSettings, "FSCmdLineCopyCam"); static LLCachedControl sFSCmdLineRollDice(gSavedSettings, "FSCmdLineRollDice"); - // FIRE-6340, FIRE-6567 - Setting Bandwidth issues static LLCachedControl sFSCmdLineBandwidth(gSavedSettings, "FSCmdLineBandWidth"); if (sFSCmdLine) { - std::istringstream i(revised_text); + std::istringstream i(revised_text.data()); std::string command; i >> command; if (!command.empty()) @@ -651,7 +655,6 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge return false; } } - // FIRE-6340, FIRE-6567 - Setting Bandwidth issues else if (command == sFSCmdLineBandwidth()) { S32 band_width; @@ -667,7 +670,6 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge return false; } } - // FIRE-6340, FIRE-6567 - Setting Bandwidth issues else if (command == sFSCmdLineAO()) { std::string status; @@ -936,7 +938,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else { - region_name = LLWeb::escapeURL(revised_text.substr(command.length() + 1)); + region_name = LLWeb::escapeURL(revised_text.substr(command.length() + 1).data()); LLVector3d agentPos = gAgent.getPositionGlobal(); agent_x = ll_round((F32)agentPos.mdV[VX]); agent_y = ll_round((F32)agentPos.mdV[VY]); @@ -961,7 +963,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge F32 result = 0.f; if (revised_text.length() > command.length() + 1) { - std::string expr = revised_text.substr(command.length()+1); + std::string expr = revised_text.substr(command.length() + 1).data(); LLStringUtil::toUpper(expr); std::string original_expr = expr; @@ -1024,7 +1026,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (revised_text.length() > command.length() + 1) //Typing this command with no argument was causing a crash. -Madgeek { - std::string name = revised_text.substr(command.length() + 1); + std::string_view name = revised_text.substr(command.length() + 1); cmdline_tp2name(name); } return false; @@ -1047,7 +1049,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (setting == "on") { - if (zdrop) + if (gZDrop) { report_to_nearby_chat("Zdrop is already active."); } @@ -1083,12 +1085,11 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge report_to_nearby_chat("Verifying folder location..."); std::stack inventorystack; std::vector > inventory = findInventoryInFolder(folder); - for (std::vector >::iterator it = inventory.begin(); it != inventory.end(); ++it) + for (const auto& item : inventory) { - LLViewerInventoryItem* item = *it; - inventorystack.push(item); + inventorystack.emplace(item); } - if (inventorystack.size()) + if (!inventorystack.empty()) { report_to_nearby_chat(llformat("Found folder \"%s\".", folder.c_str())); report_to_nearby_chat(llformat("Found prim \"%s\".", destination.c_str())); @@ -1097,7 +1098,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge report_to_nearby_chat("Do not have the prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); report_to_nearby_chat("Use \"zdrop off\" to stop the transfer"); LLUUID sdest = LLUUID(destination); - zdrop = new JCZdrop(inventorystack, sdest, folder.c_str(), destination.c_str()); + gZDrop = new JCZdrop(inventorystack, sdest, folder.c_str(), destination.c_str()); } } else @@ -1121,15 +1122,15 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else if (setting == "off") { - if (!zdrop) + if (!gZDrop) { report_to_nearby_chat("Zdrop is already deactivated."); } else { - zdrop ->mRunning = TRUE; - delete zdrop; - zdrop = NULL; + gZDrop->mRunning = TRUE; + delete gZDrop; + gZDrop = nullptr; } } else @@ -1151,7 +1152,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (setting == "on") { - if (ztake) + if (gZTake) { report_to_nearby_chat("Ztake is already active."); } @@ -1172,7 +1173,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (folder.notNull()) { report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); - ztake = new JCZtake(folder); + gZTake = new JCZtake(folder); } else { @@ -1188,15 +1189,15 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else if (setting == "off") { - if (!ztake) + if (!gZTake) { report_to_nearby_chat("Ztake is already deactivated."); } else { - ztake->mRunning = TRUE; - delete ztake; - ztake = NULL; + gZTake->mRunning = TRUE; + delete gZTake; + gZTake = nullptr; } } else @@ -1241,7 +1242,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (folder.notNull()) { report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); - ztake = new JCZtake(folder, true, LLUUID(destination), folder_name, (command == "cpackage") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY); + gZTake = new JCZtake(folder, true, LLUUID(destination), folder_name, (command == "cpackage") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY); } else { @@ -1307,7 +1308,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge U32 localid = objectp->getLocalID(); if (std::find(to_take.begin(), to_take.end(), localid) == to_take.end()) { - to_take.push_back(localid); + to_take.emplace_back(localid); } } } @@ -1320,7 +1321,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge else { report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); - ztake = new JCZtake(folder, true, LLUUID(destination), folder_name, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, to_take); + gZTake = new JCZtake(folder, true, LLUUID(destination), folder_name, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, to_take); } } else @@ -1438,7 +1439,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge U32 localid = objectp->getLocalID(); if (std::find(to_take.begin(), to_take.end(), localid) == to_take.end()) { - to_take.push_back(localid); + to_take.emplace_back(localid); } } } @@ -1451,7 +1452,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge else { report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); - ztake = new JCZtake(folder, true, LLUUID::null, folder_name, (command == "kcopy") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY, false, to_take); + gZTake = new JCZtake(folder, true, LLUUID::null, folder_name, (command == "kcopy") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY, false, to_take); } } else @@ -1474,7 +1475,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (setting == "on") { - if (mtake) + if (gMTake) { report_to_nearby_chat("Mtake is already active."); } @@ -1495,7 +1496,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (folder.notNull()) { report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); - mtake = new TMZtake(folder); + gMTake = new TMZtake(folder); } else { @@ -1511,15 +1512,15 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else if (setting == "off") { - if (!mtake) + if (!gMTake) { report_to_nearby_chat("Mtake is already deactivated."); } else { - mtake->mRunning = TRUE; - delete mtake; - mtake = NULL; + gMTake->mRunning = TRUE; + delete gMTake; + gMTake = nullptr; } } else @@ -1729,29 +1730,25 @@ LLUUID cmdline_partial_name2key(std::string partial_name) LLStringUtil::toLower(partial_name); LLStringUtil::replaceString(partial_name, ".", " "); - FSRadar* radar = FSRadar::getInstance(); - if (radar) + FSRadar::entry_map_t radar_list = FSRadar::getInstance()->getRadarList(); + FSRadar::entry_map_t::iterator it_end = radar_list.end(); + for (const auto& [avid, entry] : radar_list) { - FSRadar::entry_map_t radar_list = radar->getRadarList(); - FSRadar::entry_map_t::iterator it_end = radar_list.end(); - for (FSRadar::entry_map_t::iterator it = radar_list.begin(); it != it_end; ++it) - { - FSRadarEntry* entry = it->second; - av_name = entry->getUserName(); + av_name = entry->getUserName(); - LLStringUtil::toLower(av_name); - if (strstr(av_name.c_str(), partial_name.c_str())) - { - return entry->getId(); - } + LLStringUtil::toLower(av_name); + if (strstr(av_name.c_str(), partial_name.c_str())) + { + return entry->getId(); } } + return LLUUID::null; } -void cmdline_tp2name(const std::string& target) +void cmdline_tp2name(std::string_view target) { - LLUUID avkey = cmdline_partial_name2key(target); + LLUUID avkey = cmdline_partial_name2key(target.data()); if (avkey.notNull() && avkey != gAgentID) { LLAvatarActions::teleportTo(avkey); @@ -1822,17 +1819,17 @@ void cmdline_rezplat(bool use_saved_value, F32 visual_radius) //cmdline_rezplat( msg->sendReliable(gAgent.getRegionHost()); } -bool cmdline_packager(const std::string& message, const LLUUID& fromID, const LLUUID& ownerID) +bool cmdline_packager(std::string_view message, const LLUUID& fromID, const LLUUID& ownerID) { if (message.empty() || cmd_line_mPackagerDest.isNull() || fromID != cmd_line_mPackagerDest) { return false; } - std::string cmd = message.substr(0, 12); + std::string_view cmd = message.substr(0, 12); if (cmd == "kpackageradd") { - std::string csv = message.substr(13, -1); + std::string_view csv = message.substr(13, -1); std::string::size_type start = 0; std::string::size_type comma = 0; do @@ -1863,13 +1860,13 @@ bool cmdline_packager(const std::string& message, const LLUUID& fromID, const LL } while(comma < csv.length()); - report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", csv.c_str())); + report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", csv.data())); return true; } else if (cmd == "kpackagerend") { report_to_nearby_chat("Packager: finalizing."); - ztake = new JCZtake(cmd_line_mPackagerTargetFolder, true, cmd_line_mPackagerDest, cmd_line_mPackagerTargetFolderName, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, cmd_line_mPackagerToTake); + gZTake = new JCZtake(cmd_line_mPackagerTargetFolder, true, cmd_line_mPackagerDest, cmd_line_mPackagerTargetFolderName, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, cmd_line_mPackagerToTake); cmd_line_mPackagerToTake.clear(); cmd_line_mPackagerTargetFolderName = ""; cmd_line_mPackagerTargetFolder.setNull(); diff --git a/indra/newview/chatbar_as_cmdline.h b/indra/newview/chatbar_as_cmdline.h index e233d77db9..b6ae8e4707 100644 --- a/indra/newview/chatbar_as_cmdline.h +++ b/indra/newview/chatbar_as_cmdline.h @@ -36,11 +36,11 @@ #include "llchat.h" -bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_gesture = false); +bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gesture = false); void cmdline_rezplat(bool use_saved_value = true, F32 visual_radius = 30.f); -void cmdline_tp2name(const std::string& target); +void cmdline_tp2name(std::string_view target); LLUUID cmdline_partial_name2key(std::string name); -bool cmdline_packager(const std::string& message, const LLUUID& fromID, const LLUUID& ownerID); +bool cmdline_packager(std::string_view message, const LLUUID& fromID, const LLUUID& ownerID); #endif // CHATBAR_AS_CMDLINE_H From 593e9f139d0ee098040920c657cc05dd246ccb25 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 14 Aug 2022 14:22:28 +0200 Subject: [PATCH 26/81] Could optimize this I guess... --- indra/newview/chatbar_as_cmdline.cpp | 12 ++++++------ indra/newview/fscommon.cpp | 10 +++++----- indra/newview/fscommon.h | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 55e76122f3..c2c57bc14d 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -74,7 +74,7 @@ LLUUID cmd_line_mPackagerDest; LLViewerInventoryItem::item_array_t findInventoryInFolder(std::string_view ifolder) { - LLUUID folder = gInventory.findCategoryByName(ifolder.data()); + LLUUID folder = gInventory.findCategoryByName(static_cast(ifolder)); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; gInventory.collectDescendents(folder, cats, items, FALSE); @@ -565,7 +565,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (sFSCmdLine) { - std::istringstream i(revised_text.data()); + std::istringstream i(static_cast(revised_text)); std::string command; i >> command; if (!command.empty()) @@ -938,7 +938,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else { - region_name = LLWeb::escapeURL(revised_text.substr(command.length() + 1).data()); + region_name = LLWeb::escapeURL(static_cast(revised_text.substr(command.length() + 1))); LLVector3d agentPos = gAgent.getPositionGlobal(); agent_x = ll_round((F32)agentPos.mdV[VX]); agent_y = ll_round((F32)agentPos.mdV[VY]); @@ -963,7 +963,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest F32 result = 0.f; if (revised_text.length() > command.length() + 1) { - std::string expr = revised_text.substr(command.length() + 1).data(); + std::string expr = static_cast(revised_text.substr(command.length() + 1)); LLStringUtil::toUpper(expr); std::string original_expr = expr; @@ -1748,7 +1748,7 @@ LLUUID cmdline_partial_name2key(std::string partial_name) void cmdline_tp2name(std::string_view target) { - LLUUID avkey = cmdline_partial_name2key(target.data()); + LLUUID avkey = cmdline_partial_name2key(static_cast(target)); if (avkey.notNull() && avkey != gAgentID) { LLAvatarActions::teleportTo(avkey); @@ -1860,7 +1860,7 @@ bool cmdline_packager(std::string_view message, const LLUUID& fromID, const LLUU } while(comma < csv.length()); - report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", csv.data())); + report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", static_cast(csv).c_str())); return true; } else if (cmd == "kpackagerend") { diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index f000dd3040..d5bb19e095 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -67,7 +67,7 @@ extern S32 gMaxAgentGroups; S32 FSCommon::sObjectAddMsg = 0; -void report_to_nearby_chat(const std::string& message) +void report_to_nearby_chat(std::string_view message) { LLChat chat; chat.mText = message; @@ -81,16 +81,16 @@ std::string format_string(std::string text, const LLStringUtil::format_map_t& ar return text; } -bool is_irc_me_prefix(const std::string& text) +bool is_irc_me_prefix(std::string_view text) { - const std::string prefix = text.substr(0, 4); + const std::string_view prefix = text.substr(0, 4); return (prefix == "/me " || prefix == "/me'"); } -std::string unescape_name(const std::string& name) +std::string unescape_name(std::string_view name) { // bugfix for SL-46920: preventing filenames that break stuff. - char * curl_str = curl_unescape(name.c_str(), name.size()); + char * curl_str = curl_unescape(name.data(), name.size()); // Calling data() should be ok here because we also pass the length std::string unescaped_name(curl_str); curl_free(curl_str); curl_str = NULL; diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index a7d8d350d6..4653b1a402 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -37,10 +37,10 @@ class LLViewerParcelMgr; const F64 AVATAR_UNKNOWN_Z_OFFSET = -1.0; // Const value for avatars at unknown height const F32 AVATAR_UNKNOWN_RANGE = -1.f; -void report_to_nearby_chat(const std::string& message); +void report_to_nearby_chat(std::string_view message); std::string format_string(std::string text, const LLStringUtil::format_map_t& args); -bool is_irc_me_prefix(const std::string& text); -std::string unescape_name(const std::string& name); +bool is_irc_me_prefix(std::string_view text); +std::string unescape_name(std::string_view name); namespace FSCommon { From 6f2265d387526bcd3fe6a17ed5ecb0fa5bd1c396 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 14 Aug 2022 16:03:39 +0200 Subject: [PATCH 27/81] Linux; Updated colladadom, compiled for C++17 support; Original author "Pork Chop " --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 1fda1cd8b8..77bbbb4c9a 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -736,9 +736,9 @@ archive hash - e1a8e9eca2894687b3532474ffc9b326 + 30b1a9b7637f7a1546d38430064ca582 url - https://3p.firestormviewer.org/colladadom-2.3.222130404-linux64-222130404.tar.bz2 + https://3p.firestormviewer.org/colladadom-2.3.222261253-linux64-222261253.tar.bz2 name linux64 From a9ddc0982480403d8db22ed543ad48f26f1d1241 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 14 Aug 2022 16:18:04 +0200 Subject: [PATCH 28/81] Split Linux warning supression into their own block, disable deprecation warnings thanks to our old boost library ... --- indra/cmake/00-Common.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 055041d70e..bce9b7e00d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -251,9 +251,13 @@ if (LINUX OR DARWIN) set(GCC_CXX_WARNINGS "$[GCC_WARNINGS] -Wno-reorder -Wno-unused-const-variable -Wno-format-extra-args -Wno-unused-private-field -Wno-unused-function -Wno-tautological-compare -Wno-empty-body -Wno-unused-variable -Wno-unused-value") else (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND DARWIN AND XCODE_VERSION GREATER 4.9) #elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-unused-but-set-variable -Wno-pragmas") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") endif () + if(LINUX) + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-unused-but-set-variable -Wno-pragmas -Wno-deprecated") + endif() + set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") From 78d8048f38cf2b0c020c23a5b74355f5c77805d1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 14 Aug 2022 19:56:40 +0200 Subject: [PATCH 29/81] Add -Wno-unused-variable for Mac. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index bce9b7e00d..1045a6efae 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -251,7 +251,7 @@ if (LINUX OR DARWIN) set(GCC_CXX_WARNINGS "$[GCC_WARNINGS] -Wno-reorder -Wno-unused-const-variable -Wno-format-extra-args -Wno-unused-private-field -Wno-unused-function -Wno-tautological-compare -Wno-empty-body -Wno-unused-variable -Wno-unused-value") else (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND DARWIN AND XCODE_VERSION GREATER 4.9) #elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable") endif () if(LINUX) From 1c3c35b2a67a4b6eddd439672c69f2cb7fe403c2 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 12:59:45 +0200 Subject: [PATCH 30/81] FIRE-31917: Fix 100% transparent objects on HUD not shown when highlighting transparent --- indra/newview/llvovolume.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5473d1456c..b25568d42b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1915,7 +1915,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) break; // - LLFace *face = mDrawable->getFace(i); + LLFace* face = mDrawable->getFace(i); if (!face) { continue; @@ -6549,7 +6549,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } #endif - + //calculate maximum number of vertices to store in a single buffer static LLCachedControl max_vbo_size(gSavedSettings, "RenderMaxVBOSize", 512); U32 max_vertices = (max_vbo_size * 1024)/LLVertexBuffer::calcVertexSize(group->getSpatialPartition()->mVertexDataMask); max_vertices = llmin(max_vertices, (U32) 65535); @@ -7031,7 +7031,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace // can we safely treat this as an alpha mask? // Nothing actually sets facecolor use the TE alpha instead. // if (facep->getFaceColor().mV[3] <= 0.f) - if ((te->getAlpha() <=0.f || facep->getFaceColor().mV[3] <= 0.f) && te->getGlow() == 0.0 ) + if ((te->getAlpha() <= 0.f || facep->getFaceColor().mV[3] <= 0.f) && te->getGlow() == 0.0 && !LLDrawPoolAlpha::sShowDebugAlpha) // { //100% transparent, don't render unless we're highlighting transparent LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("facep->alpha -> invisible"); From 7d4c73b7b51ca3735497071019333229ea2f8cb0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 13:15:58 +0200 Subject: [PATCH 31/81] FIRE-31852: Now it aggressively executes gestures within focussed floaters... --- indra/newview/llviewerwindow.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 29e1f6d5a4..e0d48ee176 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -293,7 +293,8 @@ static const F32 MIN_UI_SCALE = 0.75f; static const F32 MAX_UI_SCALE = 7.0f; static const F32 MIN_DISPLAY_SCALE = 0.75f; -static const char KEY_MOUSELOOK = 'M'; +// FIRE-31852: Now it aggressively executes gestures within focussed floaters... +//static const char KEY_MOUSELOOK = 'M'; static LLCachedControl sSnapshotBaseName(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); static LLCachedControl sSnapshotDir(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseDir", "")); @@ -3300,13 +3301,15 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { //Most things should fall through, but mouselook is an exception, //don't switch to mouselook if any floater has focus - if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT))) - { - return TRUE; - } + // FIRE-31852: Now it aggressively executes gestures within focussed floaters... + //if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT))) + //{ + // return TRUE; + //} - LLUICtrl* cur_focus = dynamic_cast(keyboard_focus); - if (cur_focus && cur_focus->acceptsTextInput()) + //LLUICtrl* cur_focus = dynamic_cast(keyboard_focus); + //if (cur_focus && cur_focus->acceptsTextInput()) + // { #ifdef LL_WINDOWS // On windows Alt Gr key generates additional Ctrl event, as result handling situations From 714f669c06b89d4ee87fd6f41cd10ffc7ce50f46 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 14:41:11 +0200 Subject: [PATCH 32/81] FIRE-31816: Include selection count when deleting more than one object from inventory --- indra/newview/llinventoryfunctions.cpp | 33 ++++++++++++++++++- .../newview/skins/default/xui/de/strings.xml | 4 +-- .../newview/skins/default/xui/en/strings.xml | 4 +-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c0577920be..4f2fbedc15 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2653,7 +2653,38 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root // LLSD args; - args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + // FIRE-31816: Include selection count when deleting more than one object from inventory + //args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + //args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem", args); + LLLocale locale(""); + std::string count_str{}; + S32 selection_count = root->getSelectedCount(); + S32 total_count{ 0 }; + + for (const auto item : root->getSelectedItems()) + { + total_count++; + + LLFolderViewModelItemInventory * view_model = dynamic_cast(item->getViewModelItem()); + if (view_model) + { + auto cat = model->getCategory(view_model->getUUID()); + if (cat) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + model->collectDescendents(cat->getUUID(), cats, items, TRUE); + total_count += (S32)(cats.size() + items.size()); + } + } + } + + LLResMgr::instance().getIntegerString(count_str, selection_count); + args["COUNT_SELECTION"] = count_str; + LLResMgr::instance().getIntegerString(count_str, total_count); + args["COUNT_TOTAL"] = count_str; + args["QUESTION"] = LLTrans::getString(selection_count > 1 ? "DeleteItems" : "DeleteItem", args); + // LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); } // Note: marketplace listings will be updated in the callback if delete confirmed diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 7973c4a97c..eace383097 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -5458,10 +5458,10 @@ Falls der Fehler weiterhin auftritt, überprüfen Sie bitte Ihre Netzwerk- und F Meine Premium-Mitgliedschaft - Ausgewählte Objekte löschen? + Ausgewählte [COUNT_SELECTION] Objekte löschen ([COUNT_TOTAL] insgesamt)? - Ausgewähltes Objekt löschen? + Ausgewähltes Objekt löschen ([COUNT_TOTAL] insgesamt)? Keine Objekte in diesem Outfit diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 55cc5a0094..63e44f256d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2502,8 +2502,8 @@ If you continue to experience problems, please check your network and firewall s My Premium membership - Delete selected items? - Delete selected item? + Delete selected [COUNT_SELECTION] items ([COUNT_TOTAL]] total)? + Delete selected item ([COUNT_TOTAL]] total)? There are no items in this outfit From 598abe531c9ed7b39624960882479c8dca45b2ed Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 15 Aug 2022 14:41:52 +0200 Subject: [PATCH 33/81] Add missing settings.xml entry for 360 snapshot --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6b135f3429..60ce26c1e9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -22110,6 +22110,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 3 + 360QualitySelection + + Comment + Quality level for the 360 snapshot + Persist + 1 + Type + S32 + Value + 0 + MFAHash Comment From e7bf9eb8d76b32b76ff4cc8ba54ed6731d3972bd Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 15 Aug 2022 14:49:29 +0200 Subject: [PATCH 34/81] Correct type and default value for the previous commit --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 60ce26c1e9..8fa3b56a2e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -22117,9 +22117,9 @@ Change of this parameter will affect the layout of buttons in notification toast Persist 1 Type - S32 + U32 Value - 0 + 128 MFAHash From 5dda6abee71c461e3b41dd2e8543c892b5425676 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 14:53:35 +0200 Subject: [PATCH 35/81] Fix invalid default value for 360QualitySelection and restore last quality setting since LL UX/UI obviously has no clue --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloater360capture.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 60ce26c1e9..becdf332f9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -22119,7 +22119,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type S32 Value - 0 + 128 MFAHash diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index fb20144a54..139cfeb3ac 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -112,7 +112,8 @@ BOOL LLFloater360Capture::postBuild() // UX/UI called for preview mode (always the first index/option) // by default each time vs restoring the last value - mQualityRadioGroup->setSelectedIndex(0); + // UX/UI has no clue what the users actually want! + //mQualityRadioGroup->setSelectedIndex(0); // Construct a URL pointing to the first page to load. Although // we do not use this page for anything (after some significant From d88b0910e4b222c4cf0fa391e9ee0f704f637b16 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 15:15:52 +0200 Subject: [PATCH 36/81] Open create landmark floater centered on screen by default --- indra/newview/skins/default/xui/en/floater_create_landmark.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/floater_create_landmark.xml b/indra/newview/skins/default/xui/en/floater_create_landmark.xml index c8b3d9c664..b938f6af3c 100644 --- a/indra/newview/skins/default/xui/en/floater_create_landmark.xml +++ b/indra/newview/skins/default/xui/en/floater_create_landmark.xml @@ -7,6 +7,7 @@ height="305" layout="topleft" name="create_landmark" + positioning="centered" title="Create Landmark" width="330"> From 0dc8290e5a8839660dd94cf07f39e5e5aaeb565f Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 15 Aug 2022 15:19:04 +0200 Subject: [PATCH 37/81] Updated Polish translation --- indra/newview/skins/default/xui/pl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 6a55a5b910..ea9b45125f 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -5135,10 +5135,10 @@ Jeśli problemy będą występowały nadal, proszę sprawdź sieć i ustawienia Moje członkostwo Premium - Usunąć zaznaczone obiekty? + Usunąć [COUNT_SELECTION] zaznaczonych obiektów ([COUNT_TOTAL]] łącznie)? - Usunąć zaznaczony obiekt? + Usunąć zaznaczony obiekt ([COUNT_TOTAL]] łącznie)? W tym stroju nie ma elementów From 4e83e5ab8b4868345aaf5fd21d8502bdfc9958a4 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 15 Aug 2022 15:23:40 +0200 Subject: [PATCH 38/81] FIRE-31938 French translation update, by Laurent Bechir --- indra/newview/skins/default/xui/fr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 97f722906a..b532a4ed85 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -5346,10 +5346,10 @@ Si le problème persiste, vérifiez la configuration de votre réseau et de votr Mon abonnement Premium - Supprimer les articles sélectionnés ? + Supprimer les [COUNT_SELECTION] articles sélectionnés ([COUNT_TOTAL]] total) ? - Supprimer l'article sélectionné ? + Supprimer l'article sélectionné ([COUNT_TOTAL]] total) ? Cette tenue ne contient aucun article. From 419a2bfe110a06679c6cf08ffaf70372ed6af570 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 15 Aug 2022 18:05:16 +0200 Subject: [PATCH 39/81] Some loop refactoring and index out of bounds protection --- indra/newview/aoengine.cpp | 92 +++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index d9f39434fc..e649c2a879 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -223,19 +223,18 @@ bool AOEngine::foreignAnimations() LL_DEBUGS("AOEngine") << "Checking for foreign animation on seat " << seat << LL_ENDL; - for (LLVOAvatar::AnimSourceIterator sourceIterator = gAgentAvatarp->mAnimationSources.begin(); - sourceIterator != gAgentAvatarp->mAnimationSources.end(); ++sourceIterator) + for (const auto&[source_id, animation_id] : gAgentAvatarp->mAnimationSources) { // skip animations run by the avatar itself - if (sourceIterator->first != gAgentID) + if (source_id != gAgentID) { // find the source object where the animation came from - LLViewerObject* source = gObjectList.findObject(sourceIterator->first); + LLViewerObject* source = gObjectList.findObject(source_id); // proceed if it's not an attachment if (source && !source->isAttachment()) { - LL_DEBUGS("AOEngine") << "Source " << sourceIterator->first << " is running animation " << sourceIterator->second << LL_ENDL; + LL_DEBUGS("AOEngine") << "Source " << source_id << " is running animation " << animation_id << LL_ENDL; // get the source's root prim LLViewerObject* sourceRoot = dynamic_cast(source->getRoot()); @@ -243,7 +242,7 @@ bool AOEngine::foreignAnimations() // if the root prim is the same as the animation source, report back as TRUE if (sourceRoot && sourceRoot->getID() == seat) { - LL_DEBUGS("AOEngine") << "foreign animation " << sourceIterator->second << " found on seat." << LL_ENDL; + LL_DEBUGS("AOEngine") << "foreign animation " << animation_id << " found on seat." << LL_ENDL; return true; } } @@ -1018,12 +1017,12 @@ bool AOEngine::createAnimationLink(const AOSet* set, AOSet::AOState* state, cons if (cats) { - for (S32 index = 0; index < cats->size(); ++index) + for (auto cat : *cats) { - if (cats->at(index)->getName().compare(state->mName) == 0) + if (cat->getName().compare(state->mName) == 0) { LL_DEBUGS("AOEngine") << "UUID found!" << LL_ENDL; - newStateFolderUUID = cats->at(index)->getUUID(); + newStateFolderUUID = cat->getUUID(); state->mInventoryUUID = newStateFolderUUID; break; } @@ -1195,8 +1194,7 @@ bool AOEngine::removeAnimation(const AOSet* set, AOSet::AOState* state, S32 inde // this item was not an animation link, move it to lost and found if (move) { - LLInventoryModel* model = &gInventory; - model->changeItemParent(item, gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND), false); + gInventory.changeItemParent(item, gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND), false); LLNotificationsUtil::add("AOForeignItemsFound", LLSD()); update(); return false; @@ -1209,7 +1207,7 @@ bool AOEngine::removeAnimation(const AOSet* set, AOSet::AOState* state, S32 inde state->mAnimations.erase(state->mAnimations.begin() + index); - if (state->mAnimations.size() == 0) + if (state->mAnimations.empty()) { LL_DEBUGS("AOEngine") << "purging folder " << state->mName << " from inventory because it's empty." << LL_ENDL; @@ -1219,12 +1217,18 @@ bool AOEngine::removeAnimation(const AOSet* set, AOSet::AOState* state, S32 inde if (cats) { - for (LLInventoryModel::cat_array_t::iterator it = cats->begin(); it != cats->end(); ++it) + for (auto cat : *cats) { - LLPointer cat = (*it); std::vector params; LLStringUtil::getTokens(cat->getName(), params, ":"); - std::string stateName = params[0]; + + if (params.empty()) + { + LL_WARNS("AOEngine") << "Unexpected folder found in ao set folder: " << cat->getName() << LL_ENDL; + return false; + } + + const std::string& stateName = params[0]; if (state->mName.compare(stateName) == 0) { @@ -1290,25 +1294,25 @@ void AOEngine::reloadStateAnimations(AOSet::AOState* state) if (items) { - for (S32 num = 0; num < items->size(); ++num) + for (auto item : *items) { - LL_DEBUGS("AOEngine") << "Found animation link " << items->at(num)->LLInventoryItem::getName() - << " desc " << items->at(num)->LLInventoryItem::getDescription() - << " asset " << items->at(num)->getAssetUUID() << LL_ENDL; + LL_DEBUGS("AOEngine") << "Found animation link " << item->LLInventoryItem::getName() + << " desc " << item->LLInventoryItem::getDescription() + << " asset " << item->getAssetUUID() << LL_ENDL; AOSet::AOAnimation anim; - anim.mAssetUUID = items->at(num)->getAssetUUID(); - LLViewerInventoryItem* linkedItem = items->at(num)->getLinkedItem(); + anim.mAssetUUID = item->getAssetUUID(); + LLViewerInventoryItem* linkedItem = item->getLinkedItem(); if (!linkedItem) { - LL_WARNS("AOEngine") << "linked item for link " << items->at(num)->LLInventoryItem::getName() << " not found (broken link). Skipping." << LL_ENDL; + LL_WARNS("AOEngine") << "linked item for link " << item->LLInventoryItem::getName() << " not found (broken link). Skipping." << LL_ENDL; continue; } anim.mName = linkedItem->LLInventoryItem::getName(); - anim.mInventoryUUID = items->at(num)->getUUID(); + anim.mInventoryUUID = item->getUUID(); S32 sortOrder; - if (!LLStringUtil::convertToS32(items->at(num)->LLInventoryItem::getDescription(), sortOrder)) + if (!LLStringUtil::convertToS32(item->LLInventoryItem::getDescription(), sortOrder)) { sortOrder = -1; } @@ -1370,9 +1374,8 @@ void AOEngine::update() if (categories) { - for (S32 index = 0; index < categories->size(); ++index) + for (auto currentCategory : *categories) { - LLViewerInventoryCategory* currentCategory = categories->at(index); const std::string& setFolderName = currentCategory->getName(); if (setFolderName.empty()) @@ -1383,6 +1386,11 @@ void AOEngine::update() std::vector params; LLStringUtil::getTokens(setFolderName, params, ":"); + if (params.empty()) + { + LL_WARNS("AOEngine") << "Unexpected folder found in ao set folder: " << currentCategory->getName() << LL_ENDL; + continue; + } AOSet* newSet = getSetByName(params[0]); if (!newSet) @@ -1440,11 +1448,16 @@ void AOEngine::update() gInventory.getDirectDescendentsOf(currentCategory->getUUID(), stateCategories, items); newSet->setComplete(true); - for (S32 state_index = 0; state_index < stateCategories->size(); ++state_index) + for (auto stateCategory : *stateCategories) { std::vector state_params; - LLStringUtil::getTokens(stateCategories->at(state_index)->getName(), state_params, ":"); - std::string stateName = state_params[0]; + LLStringUtil::getTokens(stateCategory->getName(), state_params, ":"); + if (params.empty()) + { + LL_WARNS("AOEngine") << "Unexpected state folder found in ao set: " << stateCategory->getName() << LL_ENDL; + continue; + } + const std::string& stateName = state_params[0]; AOSet::AOState* state = newSet->getStateByName(stateName); if (!state) @@ -1454,7 +1467,7 @@ void AOEngine::update() } LL_DEBUGS("AOEngine") << "Reading state " << stateName << LL_ENDL; - state->mInventoryUUID = stateCategories->at(state_index)->getUUID(); + state->mInventoryUUID = stateCategory->getUUID(); for (U32 num = 1; num < state_params.size(); ++num) { if (state_params[num] == "CY") @@ -1544,11 +1557,11 @@ void AOEngine::reload(bool aFromTimer) AOSet* AOEngine::getSetByName(const std::string& name) const { AOSet* found = nullptr; - for (U32 index = 0; index < mSets.size(); ++index) + for (auto set : mSets) { - if (mSets[index]->getName().compare(name) == 0) + if (set->getName().compare(name) == 0) { - found = mSets[index]; + found = set; break; } } @@ -1692,9 +1705,8 @@ void AOEngine::saveState(const AOSet::AOState* state) void AOEngine::saveSettings() { - for (U32 index = 0; index < mSets.size(); ++index) + for (auto set : mSets) { - AOSet* set = mSets[index]; if (set->getDirty()) { saveSet(set); @@ -1772,9 +1784,9 @@ void AOEngine::inMouselook(bool mouselook) void AOEngine::setDefaultSet(AOSet* set) { mDefaultSet = set; - for (U32 index = 0; index < mSets.size(); ++index) + for (auto set : mSets) { - mSets[index]->setDirty(true); + set->setDirty(true); } } @@ -1910,12 +1922,12 @@ void AOEngine::tick() gInventory.getDirectDescendentsOf(categoryID, categories, items); LL_DEBUGS("AOEngine") << "cat " << categories->size() << " items " << items->size() << LL_ENDL; - for (S32 index = 0; index < categories->size(); ++index) + for (auto cat : *categories) { - const std::string& catName = categories->at(index)->getName(); + const std::string& catName = cat->getName(); if (catName.compare(ROOT_AO_FOLDER) == 0) { - mAOFolder = categories->at(index)->getUUID(); + mAOFolder = cat->getUUID(); break; } } From 94eff7cb1f949be1905c5aac90dfc0163d40904f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Aug 2022 13:18:08 +0200 Subject: [PATCH 40/81] Remove remnants of a change long gone already - maybe this might be a reason it causes FIRE-31473 now in conjunction with 83127d22992e055b40298724d0cac0de108b6116 --- indra/llwindow/llwindowmacosx-objc.mm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 41db6ae98e..2a88049c5c 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -476,14 +476,6 @@ long showAlert(std::string text, std::string title, int type) unsigned int getModifiers() { - // Try current event of app first, otherwise we might get wrong results - NSEvent *pEvent = [NSApp currentEvent]; - if( pEvent != nil ) - { - return [pEvent modifierFlags]; - } - // - return [NSEvent modifierFlags]; } From 2205a61ae6a2abb4c54a5ff0b7e01bf25157b484 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Aug 2022 13:41:27 +0200 Subject: [PATCH 41/81] Speculative fix for FIRE-31473: Accessing "characters" property outside key-up or key-down event is not allowed according to the API doc - not sure if flagsChanged does count as such though (hopefully it compiles...) --- indra/llwindow/llopenglview-objc.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 475eb5489b..896ee1ce62 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -549,7 +549,9 @@ attributedStringInfo getSegments(NSAttributedString *str) if (mModifiers & mask) { eventData.mKeyEvent = NativeKeyEventData::KEYDOWN; - callKeyDown(&eventData, [theEvent keyCode], 0, [[theEvent characters] characterAtIndex:0]); + // Speculative fix for FIRE-31473 + //callKeyDown(&eventData, [theEvent keyCode], 0, [[theEvent characters] characterAtIndex:0]); + callKeyDown(&eventData, [theEvent keyCode], 0, L'\0']); } else { From e2bfa14556c61d83d42c5a38bbda207881e60f37 Mon Sep 17 00:00:00 2001 From: Pantera Date: Tue, 16 Aug 2022 13:41:38 +0200 Subject: [PATCH 42/81] FIRE-31944 Russian translation update, by Romka Swallowtail --- indra/newview/skins/default/xui/ru/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 26aecee3e4..843d5aacb2 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -5372,10 +5372,10 @@ https://www.firestormviewer.org/support за помощь в решении эт Мое Премиум-членство - Удалить выбранные объекты? + Удалить выбранные [COUNT_SELECTION] объекты? ([COUNT_TOTAL]] всего) - Удалить выбранный объект? + Удалить выбранный объект? ([COUNT_TOTAL]] всего) Для этого комплекта одежды нет вещей From 0243626011d67be2499d9bfff2eac77f6f11ea71 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 11 Mar 2022 13:41:06 +0200 Subject: [PATCH 43/81] SL-16985 FIXED [Mac] Key combinations for diacritical marks are not working --- indra/llwindow/llopenglview-objc.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 896ee1ce62..2fe8d4b69f 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -505,14 +505,14 @@ attributedStringInfo getSegments(NSAttributedString *str) // e.g. OS Window for upload something or Input Window... // mModifiers instance variable is for insertText: or insertText:replacementRange: (by Pell Smit) mModifiers = [theEvent modifierFlags]; + unichar ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; + bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, ch); - bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, [[theEvent characters] characterAtIndex:0]); - unichar ch; if (acceptsText && !mMarkedTextAllowed && !(mModifiers & (NSControlKeyMask | NSCommandKeyMask)) && // commands don't invoke InputWindow ![(LLAppDelegate*)[NSApp delegate] romanScript] && - (ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]) > ' ' && + ch > ' ' && ch != NSDeleteCharacter && (ch < 0xF700 || ch > 0xF8FF)) // 0xF700-0xF8FF: reserved for function keys on the keyboard(from NSEvent.h) { From c85bcbd7de25f5aa252fd85d953341c5c79010fc Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Aug 2022 18:27:13 +0200 Subject: [PATCH 44/81] FIRE-29425: User-selectable font and size for notecards --- indra/llui/lltextbase.cpp | 12 ++++++ indra/newview/app_settings/settings.xml | 22 ++++++++++ indra/newview/llpreviewnotecard.cpp | 31 +++++++++++++ indra/newview/llpreviewnotecard.h | 6 +++ indra/newview/llpreviewscript.cpp | 2 - indra/newview/llviewertexteditor.cpp | 10 ++++- .../default/xui/de/panel_preferences_UI.xml | 17 ++++++++ .../default/xui/en/panel_preferences_UI.xml | 43 +++++++++++++++++++ 8 files changed, 139 insertions(+), 4 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 4babd5028d..b74f2bf00a 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2454,6 +2454,18 @@ void LLTextBase::setFont(const LLFontGL* font) { mFont = font; mStyleDirty = true; + + // FIRE-29425: User-selectable font and size for notecards + for (auto segment : mSegments) + { + LLStyleConstSP style = segment->getStyle(); + LLStyleSP new_style(new LLStyle(*style)); + new_style->setFont(mFont); + LLStyleConstSP sp(new_style); + segment->setStyle(sp); + } + needsReflow(); + // } void LLTextBase::needsReflow(S32 index) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8fa3b56a2e..f46e0cd086 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25664,6 +25664,28 @@ Change of this parameter will affect the layout of buttons in notification toast Value Scripting + FSNotecardFontName + + Comment + The name of the font used for the notecard editor + Persist + 1 + Type + String + Value + SansSerif + + FSNotecardFontSize + + Comment + The size of the font used for the notecard editor + Persist + 1 + Type + String + Value + Medium + FSEnableRightclickOnTransparentObjects Comment diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index e6eedd76bf..280611329b 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -76,6 +76,10 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, // FIRE-24306: Retain cursor position when saving notecards ,mCursorPos(0) ,mScrollPos(0) + // FIRE-29425: User-selectable font and size for notecards + ,mFontNameChangedCallbackConnection() + ,mFontSizeChangedCallbackConnection() + // { const LLInventoryItem *item = getItem(); if (item) @@ -87,6 +91,17 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, LLPreviewNotecard::~LLPreviewNotecard() { delete mLiveFile; + + // FIRE-29425: User-selectable font and size for notecards + if (mFontNameChangedCallbackConnection.connected()) + { + mFontNameChangedCallbackConnection.disconnect(); + } + if (mFontSizeChangedCallbackConnection.connected()) + { + mFontSizeChangedCallbackConnection.disconnect(); + } + // } BOOL LLPreviewNotecard::postBuild() @@ -118,6 +133,12 @@ BOOL LLPreviewNotecard::postBuild() } getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); + // FIRE-29425: User-selectable font and size for notecards + mFontNameChangedCallbackConnection = gSavedSettings.getControl("FSNotecardFontName")->getSignal()->connect(boost::bind(&LLPreviewNotecard::onFontChanged, this)); + mFontSizeChangedCallbackConnection = gSavedSettings.getControl("FSNotecardFontSize")->getSignal()->connect(boost::bind(&LLPreviewNotecard::onFontChanged, this)); + onFontChanged(); + // + return LLPreview::postBuild(); } @@ -983,5 +1004,15 @@ void LLPreviewNotecard::checkCloseAfterSave() } // +// FIRE-29425: User-selectable font and size for notecards +void LLPreviewNotecard::onFontChanged() +{ + LLFontGL* font = LLFontGL::getFont(LLFontDescriptor(gSavedSettings.getString("FSNotecardFontName"), gSavedSettings.getString("FSNotecardFontSize"), LLFontGL::NORMAL)); + if (font) + { + mEditor->setFont(font); + } +} +// // EOF diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 69d949da7c..09a61ea45f 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -129,6 +129,12 @@ protected: bool writeToFile(const std::string& filename); std::string getTmpFileName(); + // FIRE-29425: User-selectable font and size for notecards + boost::signals2::connection mFontNameChangedCallbackConnection; + boost::signals2::connection mFontSizeChangedCallbackConnection; + void onFontChanged(); + // + protected: LLViewerTextEditor* mEditor; LLButton* mSaveBtn; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 0a081176ba..08176044dd 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1839,11 +1839,9 @@ void LLScriptEdCore::onFontChanged() if (font) { mEditor->setFont(font); - mEditor->needsReflow(); if (mPostEditor) { mPostEditor->setFont(font); - mPostEditor->needsReflow(); } } } diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 18096a7f35..bfe83fe944 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -211,7 +211,9 @@ public: // [/SL:KB] { - mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif())); + // FIRE-29425: User-selectable font and size for notecards + //mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif())); + mStyle = new LLStyle(LLStyle::Params().font(mEditor.getFont())); mToolTip = inv_item->getName() + '\n' + inv_item->getDescription(); } @@ -328,11 +330,15 @@ public: // [/SL:KB] /*virtual*/ LLStyleConstSP getStyle() const { return mStyle; } + /*virtual*/ void setStyle(LLStyleConstSP style) { mStyle = style; } // FIRE-29425: User-selectable font and size for notecards private: LLUIImagePtr mImage; LLWString mLabel; - LLStyleSP mStyle; + // FIRE-29425: User-selectable font and size for notecards + //LLStyleSP mStyle; + LLStyleConstSP mStyle; + // std::string mToolTip; LLPointer mItem; LLTextEditor& mEditor; diff --git a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml index d28f52b3fc..55ccfc05be 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml @@ -264,6 +264,23 @@ Standard 0. Größere Werte können nicht korrekt funktionieren. Pixel (Erfordert Neustart) [VIEWER_GENERATION]-Standard 20. Viewer 1-Standard 18. + + Schrift für Notizkarten: + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index dc98ebf690..7d1166bcfe 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -1734,6 +1734,49 @@ Default 0. Larger values may not work well. [VIEWER_GENERATION] default 20. Viewer 1 default 18. + + Notecard Editor Font: + + + + + + + + + + + + + + + + From 90b964a61f150535837b090dbcc06b538be216da Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 26 Aug 2022 19:48:42 +0100 Subject: [PATCH 79/81] FIRE-31942 - Disable CoRo for 360 by default to avoid heap corruption --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloater360capture.cpp | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 14a9d015b5..5732231741 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26203,5 +26203,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value 473405 + FSUseCoRoFor360Capture + + Comment + Use co-routine to extract 360 photos. + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 139cfeb3ac..610746ca80 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -320,6 +320,11 @@ const std::string LLFloater360Capture::getHTMLBaseFolder() // triggered when the 'capture' button in the UI is pressed void LLFloater360Capture::onCapture360ImagesBtn() { + // FIRE-31942 Avoid CoRo that appears to never usefully yield + // Allow option to re-enable on the off chance a low power machine can benefit + if(gSavedSettings.getBOOL("FSUseCoRoFor360Capture")) + { + // // launch the main capture code in a coroutine so we can // yield/suspend at some points to give the main UI // thread a look-in occasionally. @@ -327,6 +332,13 @@ void LLFloater360Capture::onCapture360ImagesBtn() { capture360Images(); }); + // FIRE-31942 Avoid CoRo that appears to never usefully yield + } + else + { + capture360Images(); + } + // } // Gets the full path name for a given JavaScript file in the HTML folder. We @@ -683,6 +695,7 @@ void LLFloater360Capture::capture360Images() // allow the UI to update by suspending and waiting for the // main render loop to update the UI + if(gSavedSettings.getBOOL("FSUseCoRoFor360Capture")) // FIRE-31942 - make apparently pointless CoRo optional (just in case) suspendForAFrame(); } From 1ba248b3ace10c68df8505b3938fb14bfab8f493 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 27 Aug 2022 16:46:19 +0200 Subject: [PATCH 80/81] Move development branch to 6.3.4 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index e411592c25..b22e754ac6 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.3 +6.6.4 From e89717da5c883e40feadb50dddfd5294fafd95b0 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 28 Aug 2022 23:23:45 +0200 Subject: [PATCH 81/81] The newline characters do not really work in these notifications --- indra/newview/skins/default/xui/de/notifications.xml | 4 ++-- indra/newview/skins/default/xui/en/notifications.xml | 4 ++-- indra/newview/skins/default/xui/es/notifications.xml | 4 ++-- indra/newview/skins/default/xui/fr/notifications.xml | 4 ++-- indra/newview/skins/default/xui/ja/notifications.xml | 4 ++-- indra/newview/skins/default/xui/pl/notifications.xml | 4 ++-- indra/newview/skins/default/xui/pt/notifications.xml | 4 ++-- indra/newview/skins/default/xui/ru/notifications.xml | 4 ++-- indra/newview/skins/default/xui/tr/notifications.xml | 4 ++-- indra/newview/skins/default/xui/zh/notifications.xml | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 242b34e719..f4389a2ee2 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -4329,7 +4329,7 @@ Sie ist voll oder startet in Kürze neu. Sie können die Form eines Mesh-Objekts nicht ändern. - Sie können diese Region nicht betreten, \nda die Region voll ist. + Sie können diese Region nicht betreten, da die Region voll ist. Verknüpfungsfehler – Eigentümer sind unterschiedlich @@ -4633,7 +4633,7 @@ Wählen Sie eine kleinere Landfläche aus. Passkauf momentan nicht möglich. Versuchen Sie es später erneut. - Objekt kann nicht erstellt werden, \nda die Parzelle voll ist. + Objekt kann nicht erstellt werden, da die Parzelle voll ist. Objekt konnte nicht an festgelegtem Ort platziert werden. Versuchen Sie es erneut. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9295f68efc..7fd4e56493 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11749,7 +11749,7 @@ You may not alter the shape of a mesh object name="FullRegionCantEnter" type="notify"> fail -You can't enter this region because \nthe region is full. +You can't enter this region because the region is full. fail -Can't create object because \nthe parcel is full. +Can't create object because the parcel is full. - No puedes entrar en esta región porque \nla región está llena. + No puedes entrar en esta región porque la región está llena. Error de vínculo: los propietarios son diferentes @@ -4447,7 +4447,7 @@ Prueba a seleccionar un terreno más pequeño. No se puede comprar el pase ahora mismo. Vuelve a intentarlo más tarde. - No se puede crear el objeto porque \nla parcela está llena. + No se puede crear el objeto porque la parcela está llena. Error al colocar el objeto en el lugar especificado. Vuelve a intentarlo. diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index f1b5f3adb7..b3198d8102 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -4635,7 +4635,7 @@ Elle est peut-être pleine ou sur le point de redémarrer. Vous ne pouvez pas changer la forme d'un objet avec maillage. - Vous ne pouvez pas pénétrer dans cette région car \ncar la région est pleine. + Vous ne pouvez pas pénétrer dans cette région car car la région est pleine. Échec du lien -- les propriétaires sont différents @@ -4939,7 +4939,7 @@ Veuillez sélectionner un terrain plus petit. Impossible d'acheter le pass actuellement. Réessayez ultérieurement. - Création de l'objet impossible car \nla parcelle est pleine. + Création de l'objet impossible car la parcelle est pleine. Échec du placement de l'objet à l'emplacement spécifié. Veuillez réessayer. diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index 63cffdd740..4027cbda16 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -4756,7 +4756,7 @@ Phoenix/Firestorm ビューワのサポート・グループへようこそ! メッシュオブジェクトの形状を変更することはできません - リージョンが埋まっているため、\nこのリージョンに入場できません。 + リージョンが埋まっているため、このリージョンに入場できません。 リンクエラー -- 所有者が違います @@ -5060,7 +5060,7 @@ Phoenix/Firestorm ビューワのサポート・グループへようこそ! 今すぐには入場許可を購入できません。後でもう一度お試しください。 - 区画が埋まっているため、オブジェクトを\n作成することができません。 + 区画が埋まっているため、オブジェクトを 作成することができません。 指定した場所にオブジェクトを配置できませんでした。もう一度お試しください。 diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index ffca45ba4b..e3cee645f9 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -4398,7 +4398,7 @@ Spróbuj ponownie za minutę. Nie możesz zmieniać kształtu obiektu meszowego. - Nie możesz wejść do tego regionu, \nponieważ jest pełny. + Nie możesz wejść do tego regionu, ponieważ jest pełny. Scalanie nie powiodło się -- właściciele są różni @@ -4706,7 +4706,7 @@ Spróbuj zaznaczyć mniejszy obszar ziemi. Nie można w tej chwili kupić przepustki. Spróbuj ponownie później. - Nie można utworzyć obiektu, \n ponieważ działka jest pełna. + Nie można utworzyć obiektu, ponieważ działka jest pełna. Nie udało się umieścić obiektu w żądanej lokalizacji. Spróbuj ponownie. diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index efe8b4f04a..d60e08fc17 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -3953,7 +3953,7 @@ Tente novamente em instantes. Você não pode alterar a forma de um objeto mesh - Você não pode entrar nesta região porque \nela está cheia. + Você não pode entrar nesta região porque ela está cheia. Falha na vinculação -- proprietários diferentes @@ -4254,7 +4254,7 @@ Tente selecionar uma quantidade menor de terreno. Não é possível comprar passe no momento. Tente novamente mais tarde. - Não é possível criar objeto porque \no lote está cheio. + Não é possível criar objeto porque o lote está cheio. Falha ao posicionar objeto em local específico. Tente novamente. diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index 25251e610e..a4bc0d9416 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -4514,7 +4514,7 @@ https://wiki.firestormviewer.org/fs_voice Не разрешается изменять форму меш-объекта - Вам нет доступа в этот регион: \nрегион заполнен. + Вам нет доступа в этот регион: регион заполнен. Связь невозможна -- разные владельцы @@ -4818,7 +4818,7 @@ https://wiki.firestormviewer.org/fs_voice Сейчас нельзя купить пропуск. Повторите попытку позже. - Невозможно создать объект:\nучасток заполнен. + Невозможно создать объект: участок заполнен. Не удалось поместить объект в указанное место. Повторите попытку. diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index adc71e1287..30e259ecdb 100644 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -4058,7 +4058,7 @@ Lütfen bir dakika sonra tekrar deneyin. Bir örgü nesnesinin şeklini değiştiremezsiniz - Bu bölgeye giremezsiniz çünkü \nbölge dolu. + Bu bölgeye giremezsiniz çünkü bölge dolu. Bağlantı başarısız oldu -- sahipler farklı @@ -4359,7 +4359,7 @@ Daha küçük bir arazi parçası seçmeyi deneyin. Şu anda geçiş hakkı satın alınamıyor. Daha sonra tekrar deneyin. - Nesne oluşturulamıyor çünkü \nparsel dolu. + Nesne oluşturulamıyor çünkü parsel dolu. Belirtilen konuma nesne yerleştirilemedi. Lütfen tekrar deneyin. diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index d1560648da..a0a6d969eb 100644 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -3926,7 +3926,7 @@ SHA1 指紋:[MD5_DIGEST] 網面物件的形狀不得變更。 - 你無法進入這地區,\n因為地區滿載。 + 你無法進入這地區,因為地區滿載。 聯結失敗——所有人不同 @@ -4227,7 +4227,7 @@ SHA1 指紋:[MD5_DIGEST] 此時無法購買通行權。 請稍候再試一次。 - 無法建立物件,\n地段滿載。 + 無法建立物件,地段滿載。 無法將物件置於指定地點。 請再試一次。