X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreapplication.h;h=6abc595c678e4f6c42d88f2863b8a7eda7e4d94d;hp=b350d52fdb498df33400c5b09510ab914adb1384;hb=HEAD;hpb=25a3ae50ac0d9835283e4f5f10fcfcc10ed5575d diff --git a/src/core/coreapplication.h b/src/core/coreapplication.h index b350d52f..f350ae10 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-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,61 +18,31 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef COREAPPLICATION_H_ -#define COREAPPLICATION_H_ +#pragma once -#include - -#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(); +#include "core-export.h" - bool init(); +#include - /** - * 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(); +#include -private: - bool _coreCreated; -}; +#include "core.h" +#include "quassel.h" +class Core; -class CoreApplication : public QCoreApplication, public Quassel +class CORE_EXPORT CoreApplication : public QCoreApplication { Q_OBJECT + public: - CoreApplication(int &argc, char **argv); - ~CoreApplication(); + CoreApplication(int& argc, char** argv); - 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