From b3c73b78682a4e1d1a86dbd8a15973ac1569b840 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 16 Mar 2017 21:58:43 +0800 Subject: [PATCH] Refactor --- src/app/application.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/application.cpp b/src/app/application.cpp index 204550b5f..52108b368 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -133,14 +133,18 @@ Application::Application(const QString &id, int &argc, char **argv) QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); } #endif + + setApplicationName("qBittorrent"); initializeTranslation(); -#ifndef DISABLE_GUI + +#if !defined(DISABLE_GUI) setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support setQuitOnLastWindowClosed(false); -#ifdef Q_OS_WIN +#endif + +#if defined(Q_OS_WIN) && !defined(DISABLE_GUI) connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection); -#endif // Q_OS_WIN -#endif // DISABLE_GUI +#endif connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &))); connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup()));