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.
This commit is contained in:
Vlad Zahorodnii 2023-03-02 21:01:22 +02:00
parent f16814811b
commit b099ad8ade
4 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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"));

View file

@ -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");

View file

@ -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)