core: Improve handling of core initialization errors
[quassel.git] / src / qtui / qtuiapplication.h
index e5e5d07..508bea5 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  *
@@ -18,8 +18,7 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef QTUIAPPLICATION_H_
-#define QTUIAPPLICATION_H_
+#pragma once
 
 #ifdef HAVE_KDE4
 #  include <KApplication>
 class QtUi;
 
 #ifdef HAVE_KDE4
-class QtUiApplication : public KApplication, public Quassel
+class QtUiApplication : public KApplication
 {
 #else
-class QtUiApplication : public QApplication, public Quassel
+class QtUiApplication : public QApplication
 {
 #endif
 
@@ -48,7 +47,7 @@ class QtUiApplication : public QApplication, public Quassel
 public:
     QtUiApplication(int &, char **);
     ~QtUiApplication();
-    virtual bool init();
+    virtual void init();
 
     void resumeSessionIfPossible();
     inline bool isAboutToQuit() const { return _aboutToQuit; }
@@ -61,9 +60,6 @@ public:
     void saveState(QSessionManager &manager);
 #endif
 
-protected:
-    virtual void quit();
-
 private:
     /**
      * Migrate settings if neccessary and possible
@@ -87,8 +83,9 @@ private:
      */
     bool applySettingsMigration(QtUiSettings settings, const uint newVersion);
 
-    bool _aboutToQuit;
-};
-
+private slots:
+    void initUi();
 
-#endif
+private:
+    bool _aboutToQuit{false};
+};