Browse Source

Disable deprecated Qt functions

Also Qt6 by default set these attributes to our preferred value.
adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
ca28fc27dc
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/app/application.cpp
  2. 2
      src/app/main.cpp

2
src/app/application.cpp

@ -141,7 +141,9 @@ Application::Application(int &argc, char **argv) @@ -141,7 +141,9 @@ Application::Application(int &argc, char **argv)
setOrganizationDomain("qbittorrent.org");
#if !defined(DISABLE_GUI)
setDesktopFileName("org.qbittorrent.qBittorrent");
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
#endif
setQuitOnLastWindowClosed(false);
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
#endif

2
src/app/main.cpp

@ -134,7 +134,7 @@ int main(int argc, char *argv[]) @@ -134,7 +134,7 @@ int main(int argc, char *argv[])
// We must save it here because QApplication constructor may change it
bool isOneArg = (argc == 2);
#if !defined(DISABLE_GUI)
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && !defined(DISABLE_GUI)
// Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);

Loading…
Cancel
Save