mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Move function-scope static QThreadStorage objects to namespace scope
to ensure destruction after all function-scope statics and avoid warning "thread exited after QThreadStorage destroyed".
This commit is contained in:
@@ -114,7 +114,7 @@ namespace BlackMisc
|
||||
static const CLogCategoryList &fromClass()
|
||||
{
|
||||
static_assert(sizeof(T) > 0, "T must be a complete type, not forward declared");
|
||||
static QThreadStorage<CLogCategoryList> list;
|
||||
static QThreadStorage<CLogCategoryList> list; //! \todo C++17: make list an inline static member variable template
|
||||
if (! list.hasLocalData())
|
||||
{
|
||||
list.localData().appendCategoriesFromMemberFunction(tag<T>(), THasGetLogCategories<T>());
|
||||
|
||||
Reference in New Issue
Block a user