[autotests/wayland] Fix with Qt 5.6
Test need to disable HighDPI, otherwise they crash.
This commit is contained in:
parent
1998d5ac1a
commit
51b44f4a87
1 changed files with 8 additions and 1 deletions
|
@ -51,16 +51,23 @@ private:
|
|||
|
||||
}
|
||||
|
||||
#define WAYLANTEST_MAIN(TestObject) \
|
||||
#define WAYLANDTEST_MAIN_HELPER(TestObject, DPI) \
|
||||
int main(int argc, char *argv[]) \
|
||||
{ \
|
||||
setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \
|
||||
setenv("QT_QPA_PLATFORM_PLUGIN_PATH", KWINQPAPATH, true); \
|
||||
setenv("KWIN_FOCRE_OWN_QPA", "1", true); \
|
||||
DPI; \
|
||||
KWin::WaylandTestApplication app(argc, argv); \
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true); \
|
||||
TestObject tc; \
|
||||
return QTest::qExec(&tc, argc, argv); \
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
||||
#define WAYLANTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject, QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling) )
|
||||
#else
|
||||
#define WAYLANTEST_MAIN(TestObject) WAYLANDTEST_MAIN_HELPER(TestObject,)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue