-CoreApplicationInternal::CoreApplicationInternal()
- : _coreCreated(false)
-{
-}
-
-
-CoreApplicationInternal::~CoreApplicationInternal()
-{
- if (_coreCreated) {
- Core::saveState();
- Core::destroy();
- }
-}
-
-
-bool CoreApplicationInternal::init()
-{
- Core::instance(); // create and init the core
- _coreCreated = true;
-
- Quassel::registerReloadHandler([]() {
- // Currently, only reloading SSL certificates and the sysident cache is supported
- Core::cacheSysIdent();
- return Core::reloadCerts();
- });
-
- if (!Quassel::isOptionSet("norestore"))
- Core::restoreState();
-
- return true;
-}
-
-
-/*****************************************************************************/