From 050294a23cffe41ca59581d4b73c881d484c8f5a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 16 Dec 2016 19:14:55 -0500 Subject: DRTVWR-418: Fix a (correct) clang correctness complaint. LLStatGraph::Threshold has an operator<(const Threshold& other) -- but because the method itself wasn't marked const, it could only be used on a non-const instance. This change fixes a case when it was applied to const instances. --- indra/llui/llstatgraph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index f381e92a4d..ba7cfc5d10 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -126,7 +126,7 @@ private: F32 mValue; LLUIColor mColor; - bool operator <(const Threshold& other) + bool operator <(const Threshold& other) const { return mValue < other.mValue; } -- cgit v1.2.3 From f0a79147210c4ef402dce10a0a3c796807298033 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 3 Feb 2017 10:43:47 -0500 Subject: DRTVWR-418: INTEGRATION_TEST_llurlentry depends on Hunspell. --- indra/llui/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 7fb1db15fb..8054eb3619 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -3,6 +3,7 @@ project(llui) include(00-Common) +include(Hunspell) include(LLCommon) include(LLImage) include(LLInventory) @@ -294,7 +295,11 @@ if(LL_TESTS) ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcorehttp llcommon ${LLCOMMON_LIBRARIES} ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llcommon + ${HUNSPELL_LIBRARY} + ${LLCOMMON_LIBRARIES} + ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} + ${WINDOWS_LIBRARIES}) if(NOT LINUX) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(NOT LINUX) -- cgit v1.2.3 From 4436e808b16b873d21b40ccf3f9f52b352faeca0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 3 Feb 2017 12:49:19 -0500 Subject: DRTVWR-418: Eliminate llui reference to newview's gSavedSettings. Instead, since gSavedSettings is an LLControlGroup and LLControlGroup derives from LLInstanceTracker, just look up the LLControlGroup with canonical name. --- indra/llui/llfloater.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4f664a1ccc..e0f2a12a27 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -64,8 +64,6 @@ // use this to control "jumping" behavior when Ctrl-Tabbing const S32 TABBED_FLOATER_OFFSET = 0; -extern LLControlGroup gSavedSettings; - namespace LLInitParam { void TypeValues::declareValues() @@ -653,13 +651,22 @@ void LLFloater::openFloater(const LLSD& key) && !getFloaterHost() && (!getVisible() || isMinimized())) { - //Don't play a sound for incoming voice call based upon chat preference setting - bool playSound = !(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE); + // gSavedSettings is a global instance of LLControlGroup, but since + // LLControlGroup is derived from LLInstanceTracker, we can also look + // it up by name. + LLControlGroup* gSavedSettingsp = LLControlGroup::getInstance("Global"); + //Play a sound for incoming voice call based upon chat preference setting. + //If it's not an incoming call, play it anyway. + //If we can't find gSavedSettings, play it anyway. + //If the setting is ON, play it anyway. + bool playSound = (getName() != "incoming call" || + (! gSavedSettingsp) || + gSavedSettingsp->getBOOL("PlaySoundIncomingVoiceCall")); - if(playSound) - { - make_ui_sound("UISndWindowOpen"); - } + if(playSound) + { + make_ui_sound("UISndWindowOpen"); + } } //RN: for now, we don't allow rehosting from one multifloater to another -- cgit v1.2.3 From ead15a8ff5cfbfbb15f42c1f73910a3fa65d4741 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 3 Feb 2017 16:46:46 -0500 Subject: DRTVWR-418: Remove most (all?) of the "stubs" from llurlentry_test. At some point the INTEGRATION_TEST_llurlentry build changed so that the library(ies) we attempted to stub out got linked in anyway, so that instead of simplifying the test, the stubs broke it with "duplicate symbol" errors. Commenting out the stubs permits the test program to succeed. --- indra/llui/tests/llurlentry_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 233fb6da23..119cbebc81 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -28,7 +28,7 @@ #include "linden_common.h" #include "../llurlentry.h" #include "../lluictrl.h" -#include "llurlentry_stub.cpp" +//#include "llurlentry_stub.cpp" #include "lltut.h" #include "../lluicolortable.h" #include "../llrender/lluiimage.h" @@ -49,6 +49,7 @@ // // } +/*==========================================================================*| typedef std::map settings_map_t; settings_map_t LLUI::sSettingGroups; @@ -83,6 +84,7 @@ S32 LLUIImage::getHeight() const { return 0; } +|*==========================================================================*/ namespace tut { -- cgit v1.2.3 From 3e4f6d7d501a80020d7763a46e987f013a7010f7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 4 Feb 2017 08:52:59 -0500 Subject: DRTVWR-418: Finish cleaning up merge from viewer-release. --- indra/llui/llfloater.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index ccf666bd67..3ece1c12bf 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -651,15 +651,6 @@ void LLFloater::openFloater(const LLSD& key) && !getFloaterHost() && (!getVisible() || isMinimized())) { - // it up by name. - LLControlGroup* gSavedSettingsp = LLControlGroup::getInstance("Global"); - //Play a sound for incoming voice call based upon chat preference setting. - //If it's not an incoming call, play it anyway. - //If we can't find gSavedSettings, play it anyway. - //If the setting is ON, play it anyway. - bool playSound = (getName() != "incoming call" || - (! gSavedSettingsp) || - gSavedSettingsp->getBOOL("PlaySoundIncomingVoiceCall")); make_ui_sound("UISndWindowOpen"); } -- cgit v1.2.3