Uses static lazy loaded QHash objects instead of static linker initialized
class members. This should fix multi initialization when linking static into DLL and EXE at the same time. Hopefully..
This commit is contained in:
@@ -50,9 +50,12 @@ private:
|
||||
QPointer<QWidget> _title;
|
||||
QPointer<QWidget> _content;
|
||||
|
||||
static int NextUid;
|
||||
static QHash<int, SectionContent::WeakPtr> LookupMap;
|
||||
static QHash<QString, SectionContent::WeakPtr> LookupMapByName;
|
||||
static int GetNextUid();
|
||||
static QHash<int, SectionContent::WeakPtr>& GetLookupMap();
|
||||
static QHash<QString, SectionContent::WeakPtr>& GetLookupMapByName();
|
||||
|
||||
//static QHash<int, SectionContent::WeakPtr> LookupMap;
|
||||
//static QHash<QString, SectionContent::WeakPtr> LookupMapByName;
|
||||
};
|
||||
|
||||
ADS_NAMESPACE_END
|
||||
|
||||
@@ -68,9 +68,13 @@ private:
|
||||
SectionContent::RefPtr _mousePressContent;
|
||||
SectionTitleWidget* _mousePressTitleWidget;
|
||||
|
||||
static int NextUid;
|
||||
static QHash<int, SectionWidget*> LookupMap;
|
||||
static QHash<ContainerWidget*, QHash<int, SectionWidget*> > LookupMapByContainer;
|
||||
static int GetNextUid();
|
||||
static QHash<int, SectionWidget*>& GetLookupMap();
|
||||
static QHash<ContainerWidget*, QHash<int, SectionWidget*> >& GetLookupMapByContainer();
|
||||
|
||||
// static int NextUid;
|
||||
// static QHash<int, SectionWidget*> LookupMap;
|
||||
// static QHash<ContainerWidget*, QHash<int, SectionWidget*> > LookupMapByContainer;
|
||||
};
|
||||
|
||||
ADS_NAMESPACE_END
|
||||
|
||||
Reference in New Issue
Block a user