X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;fp=src%2Fcore%2Fcore.cpp;h=7f69869a5c7d0dcf2a90a131d9a6372a99b2a618;hp=9b7af58d03184a289e921dd94a13fe48362ebc07;hb=41b33277b11c69ae0138e8b463a4c695e9a80d14;hpb=1f2784bfa1c1ce90defa32f13c78afd72c227bfd diff --git a/src/core/core.cpp b/src/core/core.cpp index 9b7af58d..7f69869a 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -67,22 +67,10 @@ public: // ============================== // Core // ============================== -Core *Core::_instance{nullptr}; - -Core *Core::instance() -{ - return _instance; -} - Core::Core() + : Singleton{this} { - if (_instance) { - qWarning() << "Recreating core instance!"; - delete _instance; - } - _instance = this; - // Parent all QObject-derived attributes, so when the Core instance gets moved into another // thread, they get moved with it _server.setParent(this); @@ -97,7 +85,6 @@ Core::~Core() qDeleteAll(_connectingClients); qDeleteAll(_sessions); syncStorage(); - _instance = nullptr; }