common: Use the Singleton mixin for the Quassel instance
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 28 Sep 2018 19:41:31 +0000 (21:41 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 1 Oct 2018 17:06:49 +0000 (19:06 +0200)
commit493043890c74e4679bb3fdaf512a0e1e52c426d3
treead22ede24af8f48fb6d6c69a8a068fa036e41a75
parentd19063654aa5fc2fd4cf7c111aac00803cf7c845
common: Use the Singleton mixin for the Quassel instance

Make use of the newly added Singleton mixon to remove the custom
handling of Quassel's instance pointer. Clearly define Quassel's
lifetime by making it a local instance in main(), rather than
relying on someone to call Quassel::instance() at the right time.

Now it is also clear that the instance is deleted after main()
returns (which was the case before, however there still was a no-op
Quassel::destroy() method too, which has now been removed). This
is fine, because Quassel does not own resources that should be deleted
before exiting the event loop.
src/common/main.cpp
src/common/quassel.cpp
src/common/quassel.h
src/core/coreapplication.cpp
src/qtui/monoapplication.cpp
src/qtui/qtuiapplication.cpp