Browse Source

added self-injection to coreapp

pull/2/head
Skycoder42 7 years ago
parent
commit
d1d6a30dd0
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 5
      src/mvvmcore/coreapp.cpp

5
src/mvvmcore/coreapp.cpp

@ -41,11 +41,14 @@ void CoreApp::registerApp()
qRegisterMetaType<QtMvvm::SettingsElements::Setup>(); qRegisterMetaType<QtMvvm::SettingsElements::Setup>();
registerInterfaceConverter<IPresenter>(); registerInterfaceConverter<IPresenter>();
//setup //setup
setParent(qApp); setParent(qApp);
CoreAppPrivate::instance = this; CoreAppPrivate::instance = this;
performRegistrations(); performRegistrations();
//self-inject properties (after performRegistrations, as they might register an interface converter)
ServiceRegistry::instance()->injectServices(this);
if(CoreAppPrivate::bootEnabled) if(CoreAppPrivate::bootEnabled)
QMetaObject::invokeMethod(this, "bootApp", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "bootApp", Qt::QueuedConnection);
} }

Loading…
Cancel
Save