From b099ad8ade71736abd003b88af46543bcddf2876 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 2 Mar 2023 21:01:22 +0200 Subject: [PATCH] Drop deprecated Qt::AA_UseHighDpiPixmaps Qt::AA_UseHighDpiPixmaps has no any effect now. We used to rely on the fact that Qt::AA_UseHighDpiPixmaps is disabled by default in Qt 5 in kwin_x11. It's not clear what to do about it now. --- autotests/integration/kwin_wayland_test.h | 7 +++---- src/helpers/killer/killer.cpp | 1 - src/kcms/rules/main.cpp | 1 - src/main_wayland.cpp | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index ac78b1de91..9f311ea5b6 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -700,7 +700,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Test::AdditionalWaylandInterfaces) Q_DECLARE_METATYPE(KWin::Test::XdgToplevel::States) Q_DECLARE_METATYPE(QtWayland::zxdg_toplevel_decoration_v1::mode) -#define WAYLANDTEST_MAIN_HELPER(TestObject, DPI, OperationMode) \ +#define WAYLANDTEST_MAIN_HELPER(TestObject, OperationMode) \ int main(int argc, char *argv[]) \ { \ setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \ @@ -710,7 +710,6 @@ Q_DECLARE_METATYPE(QtWayland::zxdg_toplevel_decoration_v1::mode) qunsetenv("KDE_SESSION_VERSION"); \ qunsetenv("XDG_SESSION_DESKTOP"); \ qunsetenv("XDG_CURRENT_DESKTOP"); \ - DPI; \ KWin::WaylandTestApplication app(OperationMode, argc, argv); \ app.setAttribute(Qt::AA_Use96Dpi, true); \ TestObject tc; \ @@ -718,9 +717,9 @@ Q_DECLARE_METATYPE(QtWayland::zxdg_toplevel_decoration_v1::mode) } #ifdef NO_XWAYLAND -#define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps), KWin::Application::OperationModeWaylandOnly) +#define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, KWin::Application::OperationModeWaylandOnly) #else -#define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps), KWin::Application::OperationModeXwayland) +#define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, KWin::Application::OperationModeXwayland) #endif #endif diff --git a/src/helpers/killer/killer.cpp b/src/helpers/killer/killer.cpp index ed103997a5..0a545b2c1a 100644 --- a/src/helpers/killer/killer.cpp +++ b/src/helpers/killer/killer.cpp @@ -23,7 +23,6 @@ int main(int argc, char *argv[]) KLocalizedString::setApplicationDomain("kwin"); qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("xcb")); QApplication app(argc, argv); - app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("dialog-warning"))); QCoreApplication::setApplicationName(QStringLiteral("kwin_killer_helper")); QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org")); diff --git a/src/kcms/rules/main.cpp b/src/kcms/rules/main.cpp index a5114ce53a..2bc0a59a40 100644 --- a/src/kcms/rules/main.cpp +++ b/src/kcms/rules/main.cpp @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) KLocalizedString::setApplicationDomain("kcm_kwinrules"); - app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); app.setApplicationName("kwin_rules_dialog"); app.setWindowIcon(QIcon::fromTheme("preferences-system-windows-actions")); app.setApplicationVersion("2.0"); diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index 08e91f0cc6..e8a28ddfe5 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -281,7 +281,6 @@ int main(int argc, char *argv[]) qunsetenv("QT_DEVICE_PIXEL_RATIO"); qputenv("QSG_RENDER_LOOP", "basic"); - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); KWin::ApplicationWayland a(argc, argv); a.setupTranslator(); // reset QT_QPA_PLATFORM so we don't propagate it to our children (e.g. apps launched from the overview effect)