core: Simplify core initialization logic
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 29 May 2018 21:11:07 +0000 (23:11 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Jun 2018 19:12:17 +0000 (21:12 +0200)
commitfbb06e36ee772862c0d70ab43c9000225e9f8c42
tree3614ba0f5463def2d4ea3845d95832bc6aadff07
parent4e3b9ea041c45aba5eaea14e4aafd46ee3ed044a
core: Simplify core initialization logic

Move all core initialization into Core::init(), including things
that were previously done in CoreApplication and MonoApplication.
Make several functions private and non-static that no longer need
to be called from the outside.

Allow to construct and destroy the core directly, rather than
relying on Core::instance() and Core::destroy(). Explicitly
create and destroy the instance in the application to better control
lifetime.

Ensure core state is saved and storage synced on destruction, instead
of relying on explicit calls (which were partially missing for mono).
src/core/core.cpp
src/core/core.h
src/core/coreapplication.cpp
src/core/coreapplication.h
src/qtui/monoapplication.cpp
src/qtui/monoapplication.h