cmake: Modernize (and fix) deployment on macOS
[quassel.git] / src / main / monoapplication.cpp
index f6dc522..293c165 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2018 by the Quassel Project                        *
+ *   Copyright (C) 2005-2020 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  ***************************************************************************/
 
 #include "monoapplication.h"
-#include "coreapplication.h"
+
 #include "client.h"
 #include "core.h"
+#include "coreapplication.h"
 #include "internalpeer.h"
-#include "logmessage.h"
 #include "qtui.h"
 
 class InternalPeer;
 
-MonolithicApplication::MonolithicApplication(int &argc, char **argv)
+MonolithicApplication::MonolithicApplication(int& argc, char** argv)
     : QtUiApplication(argc, argv)
 {
+#if QT_VERSION >= 0x050700
+    QGuiApplication::setDesktopFileName(Quassel::buildInfo().applicationName);
+#endif
 }
 
-
 void MonolithicApplication::init()
 {
     QtUiApplication::init();
@@ -48,17 +50,15 @@ void MonolithicApplication::init()
     }
 }
 
-
 Quassel::QuitHandler MonolithicApplication::quitHandler()
 {
     return [this]() {
-        quInfo() << "Client shutting down...";
+        qInfo() << "Client shutting down...";
         connect(_client.get(), &QObject::destroyed, this, &MonolithicApplication::onClientDestroyed);
         _client.release()->deleteLater();
     };
 }
 
-
 void MonolithicApplication::onClientDestroyed()
 {
     if (_core) {
@@ -70,7 +70,6 @@ void MonolithicApplication::onClientDestroyed()
     }
 }
 
-
 void MonolithicApplication::onCoreShutdown()
 {
     if (_core) {
@@ -83,7 +82,6 @@ void MonolithicApplication::onCoreShutdown()
     }
 }
 
-
 void MonolithicApplication::startInternalCore()
 {
     if (_core) {
@@ -106,7 +104,6 @@ void MonolithicApplication::startInternalCore()
     _coreThread.start();
 }
 
-
 void MonolithicApplication::onConnectionRequest(QPointer<InternalPeer> peer)
 {
     if (!_core) {