mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:04:13 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into persist-entities-as-json
This commit is contained in:
commit
b945ce5e7a
2 changed files with 12 additions and 2 deletions
|
@ -1818,6 +1818,9 @@ void Application::initDisplay() {
|
|||
}
|
||||
|
||||
void Application::init() {
|
||||
// Make sure Login state is up to date
|
||||
DependencyManager::get<DialogsManager>()->toggleLoginDialog();
|
||||
|
||||
_environment.init();
|
||||
|
||||
DependencyManager::get<DeferredLightingEffect>()->init(this);
|
||||
|
|
|
@ -17,18 +17,25 @@
|
|||
#include <QSharedPointer>
|
||||
#include <QWeakPointer>
|
||||
|
||||
#include <functional>
|
||||
#include <typeinfo>
|
||||
|
||||
#define SINGLETON_DEPENDENCY \
|
||||
friend class DependencyManager;
|
||||
|
||||
class Dependency {
|
||||
public:
|
||||
typedef std::function<void(Dependency* pointer)> DeleterFunction;
|
||||
|
||||
protected:
|
||||
virtual ~Dependency() {}
|
||||
virtual void customDeleter() {
|
||||
delete this;
|
||||
_customDeleter(this);
|
||||
}
|
||||
|
||||
|
||||
void setCustomDeleter(DeleterFunction customDeleter) { _customDeleter = customDeleter; }
|
||||
DeleterFunction _customDeleter = [](Dependency* pointer) { delete pointer; };
|
||||
|
||||
friend class DependencyManager;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue