From 17fae30f721c716bab1dd78cc5f8ac6b0aad49e0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 25 Jul 2019 15:17:11 +0300 Subject: DRTVWR-493 LLImage to LLParamSingleton --- indra/newview/llconversationlog.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationlog.h') diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 035cbcb945..38247f8eff 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -107,11 +107,10 @@ private: * To distinguish two conversations with the same sessionID it's also needed to compare their creation date. */ -class LLConversationLog : public LLSingleton, LLIMSessionObserver +class LLConversationLog : public LLParamSingleton, LLIMSessionObserver { - LLSINGLETON(LLConversationLog); + LLPARAMSINGLETON(LLConversationLog); public: - void removeConversation(const LLConversation& conversation); /** -- cgit v1.2.3 From 98be6e141c1232bad28cc115bc7092f175b18809 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 12 Aug 2019 09:44:56 -0400 Subject: DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton. Simplify LLSingleton::SingletonLifetimeManager to SingletonInitializer: that struct has not been responsible for deletion ever since LLSingletonBase acquired dependency-ordered deleteAll(). Move SingletonData::mInitState changes from SingletonLifetimeManager to constructSingleton() method. Similarly, constructSingleton() now sets SingletonData::mInstance instead of making its caller store the pointer. Add variadic arguments to LLSingleton::constructSingleton() so we can reuse it for LLParamSingleton. Add finishInitializing() method to encapsulate logic reused for getInstance()'s INITIALIZING and DELETED cases. Make LLParamSingleton a subclass of LLSingleton, just as LLLockedSingleton is a subclass of LLParamSingleton. Make LLParamSingleton a friend of LLSingleton, so it can access private members of LLSingleton without also granting access to any DERIVED_CLASS subclass. This eliminates the need for protected getInitState(). LLParamSingleton::initParamSingleton() reuses LLSingleton::constructSingleton() and finishInitializing(). Its getInstance() method completely replaces LLSingleton::getInstance(): in most EInitStates, LLParamSingleton::getInstance() is an error. Use a std::mutex to serialize calls to LLParamSingleton::initParamSingleton() and getInstance(). While LLSingleton::getInstance() relies on the "initialized exactly once" guarantee for block-scope static declarations, LLParamSingleton cannot rely on the same mechanism. LLLockedSingleton is now a very succinct subclass of LLParamSingleton -- they have very similar functionality. Giving the LLSINGLETON() macro variadic arguments eliminates the need for a separate LLPARAMSINGLETON() macro, while continuing to support existing usage. --- indra/newview/llconversationlog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationlog.h') diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 38247f8eff..f241276abb 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -109,7 +109,7 @@ private: class LLConversationLog : public LLParamSingleton, LLIMSessionObserver { - LLPARAMSINGLETON(LLConversationLog); + LLSINGLETON(LLConversationLog); public: void removeConversation(const LLConversation& conversation); -- cgit v1.2.3 From bd42fd13b038dea5bddf06ed8da7b51d08b38bae Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 14 Oct 2019 20:49:16 +0300 Subject: SL-11719 Fixed init of conversation log --- indra/newview/llconversationlog.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llconversationlog.h') diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index f241276abb..46e46a3278 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -107,7 +107,7 @@ private: * To distinguish two conversations with the same sessionID it's also needed to compare their creation date. */ -class LLConversationLog : public LLParamSingleton, LLIMSessionObserver +class LLConversationLog : public LLSingleton, LLIMSessionObserver { LLSINGLETON(LLConversationLog); public: @@ -147,6 +147,12 @@ public: bool getIsLoggingEnabled() { return mLoggingEnabled; } bool isLogEmpty() { return mConversations.empty(); } + /** + * inits connection to per account settings, + * loads saved file and inits enabled state + */ + void initLoggingState(); + /** * constructs file name in which conversations log will be saved * file name is conversation.log -- cgit v1.2.3