modernize: Reformat ALL the source... again!
[quassel.git] / src / core / coreapplication.h
index 4c72b6b..f2f076f 100644 (file)
@@ -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  *
 
 #pragma once
 
-#include <QCoreApplication>
-
-#include "quassel.h"
+#include "core-export.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 <memory>
 
-    bool init();
+#include <QCoreApplication>
 
-private:
-    bool _coreCreated;
-};
+#include "core.h"
+#include "quassel.h"
 
+class Core;
 
-class CoreApplication : public QCoreApplication
+class CORE_EXPORT CoreApplication : public QCoreApplication
 {
     Q_OBJECT
+
 public:
-    CoreApplication(int &argc, char **argv);
-    ~CoreApplication();
+    CoreApplication(int& argc, char** argv);
+
+    void init();
 
-    bool init();
+private slots:
+    void onShutdownComplete();
 
 private:
-    CoreApplicationInternal *_internal;
+    std::unique_ptr<Core> _core;
 };