Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.h
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 192 | { \ | |||
---|---|---|---|---|---|
195 | setenv("KWIN_FORCE_OWN_QPA", "1", true); \ | 195 | setenv("KWIN_FORCE_OWN_QPA", "1", true); \ | ||
196 | qunsetenv("KDE_FULL_SESSION"); \ | 196 | qunsetenv("KDE_FULL_SESSION"); \ | ||
197 | qunsetenv("KDE_SESSION_VERSION"); \ | 197 | qunsetenv("KDE_SESSION_VERSION"); \ | ||
198 | qunsetenv("XDG_SESSION_DESKTOP"); \ | 198 | qunsetenv("XDG_SESSION_DESKTOP"); \ | ||
199 | qunsetenv("XDG_CURRENT_DESKTOP"); \ | 199 | qunsetenv("XDG_CURRENT_DESKTOP"); \ | ||
200 | DPI; \ | 200 | DPI; \ | ||
201 | KWin::WaylandTestApplication app(OperationMode, argc, argv); \ | 201 | KWin::WaylandTestApplication app(OperationMode, argc, argv); \ | ||
202 | app.setAttribute(Qt::AA_Use96Dpi, true); \ | 202 | app.setAttribute(Qt::AA_Use96Dpi, true); \ | ||
203 | const auto ownPath = app.libraryPaths().last(); \ | | |||
204 | app.removeLibraryPath(ownPath); \ | | |||
205 | app.addLibraryPath(ownPath); \ | | |||
206 | TestObject tc; \ | 203 | TestObject tc; \ | ||
207 | return QTest::qExec(&tc, argc, argv); \ | 204 | return QTest::qExec(&tc, argc, argv); \ | ||
208 | } | 205 | } | ||
209 | 206 | | |||
210 | #ifdef NO_XWAYLAND | 207 | #ifdef NO_XWAYLAND | ||
211 | #define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling), KWin::Application::OperationModeWaylandOnly) | 208 | #define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling), KWin::Application::OperationModeWaylandOnly) | ||
212 | #else | 209 | #else | ||
213 | #define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling), KWin::Application::OperationModeXwayland) | 210 | #define WAYLANDTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling), KWin::Application::OperationModeXwayland) | ||
214 | #endif | 211 | #endif | ||
215 | 212 | | |||
216 | #endif | 213 | #endif |