This commit is contained in:
Chocobo1 2017-03-16 21:58:43 +08:00 committed by sledgehammer999
parent 8a02a69924
commit d1dfdd1306
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -111,17 +111,20 @@ Application::Application(const QString &id, int &argc, char **argv)
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
} }
#endif #endif
setApplicationName("qBittorrent"); setApplicationName("qBittorrent");
initializeTranslation(); initializeTranslation();
#ifndef DISABLE_GUI
#if !defined(DISABLE_GUI)
#ifdef QBT_USES_QT5 #ifdef QBT_USES_QT5
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
#endif // QBT_USES_QT5 #endif // QBT_USES_QT5
setQuitOnLastWindowClosed(false); 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); connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection);
#endif // Q_OS_WIN #endif
#endif // DISABLE_GUI
connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &))); connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &)));
connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup())); connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup()));