X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreapplication.h;h=216eda0ffb5a2a9651f3a66b8252c911120603ca;hb=4ce53949ab7d52a49ae79b8817bd3aa50fada0d1;hp=b350d52fdb498df33400c5b09510ab914adb1384;hpb=25a3ae50ac0d9835283e4f5f10fcfcc10ed5575d;p=quassel.git diff --git a/src/core/coreapplication.h b/src/core/coreapplication.h index b350d52f..216eda0f 100644 --- a/src/core/coreapplication.h +++ b/src/core/coreapplication.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,61 +18,29 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef COREAPPLICATION_H_ -#define COREAPPLICATION_H_ +#pragma once + +#include #include +#include "core.h" #include "quassel.h" -/// Encapsulates CoreApplication's logic. -/** This allows it to be reused within MonolithicApplication as well. - */ -class CoreApplicationInternal -{ - Q_DECLARE_TR_FUNCTIONS(CoreApplicationInternal) - -public: - CoreApplicationInternal(); - ~CoreApplicationInternal(); +class Core; - bool init(); - - /** - * Requests a reload of relevant runtime configuration. - * - * In particular, signals to the Core to reload SSL certificates. - * - * @return True if configuration reload successful, otherwise false - */ - bool reloadConfig(); - -private: - bool _coreCreated; -}; - - -class CoreApplication : public QCoreApplication, public Quassel +class CoreApplication : public QCoreApplication { Q_OBJECT + public: CoreApplication(int &argc, char **argv); - ~CoreApplication(); - bool init(); + void init(); - /** - * Requests a reload of relevant runtime configuration. - * - * @see Quassel::reloadConfig() - * - * @return True if configuration reload successful, otherwise false - */ - bool reloadConfig(); +private slots: + void onShutdownComplete(); private: - CoreApplicationInternal *_internal; + std::unique_ptr _core; }; - - -#endif