[wayland] use Qt::AA_DisableHighDpiScaling in Qt 5.6

Review Request #126008 - Created Nov. 9, 2015 and submitted

Information
Takahiro Hashimoto
kwin
master
Reviewers
plasma

Qt::AA_NoHighDpiScaling has been replaced with another HighDpi scale enabler/disabler at Qt 5.6 branch (qt5.git submodule already updated)

https://codereview.qt-project.org/#/c/127895/

This case build error with Qt 5.6 branch as following.

/home/kenya888/devel/kf5/src/kde/workspace/kwin/main_wayland.cpp: In function 'int main(int, char**)':
/home/kenya888/devel/kf5/src/kde/workspace/kwin/main_wayland.cpp:379:36: error: 'AA_NoHighDpiScaling' is not a member of 'Qt'
QCoreApplication::setAttribute(Qt::AA_NoHighDpiScaling, true);


This patch fix this use Qt::AA_DisableHighDpiScaling instead of it.

Build succeeded. Some test are failed, I know Martin is working about kwin wayland forcused on Qt 5.4. More investigation for test error is needed by myself. At the moment I'd like to avoid simply build error.

As reference, I'll paste ninja test log. tested with Qt 5.6 branch latest.

kenya888@xps13 ~/devel/kf5/build/kde/workspace/kwin $ cat ~/kwin-test.log
[1/1] Running tests...
Test project /home/kenya888/devel/kf5/build/kde/workspace/kwin
Start 1: kwineffects-windowquadlisttest
1/23 Test #1: kwineffects-windowquadlisttest ... Passed 0.05 sec
Start 2: kwin-testTabBoxClientModel
2/23 Test #2: kwin-testTabBoxClientModel ....... Passed 0.05 sec
Start 3: kwin-testTabBoxHandler
3/23 Test #3: kwin-testTabBoxHandler ........... Passed 0.05 sec
Start 4: kwin-testTabBoxConfig
4/23 Test #4: kwin-testTabBoxConfig ............ Passed 0.00 sec
Start 5: kwin-testDesktopChain
5/23 Test #5: kwin-testDesktopChain ............ Passed 0.01 sec
Start 6: kwin-testScreenPaintData
6/23 Test #6: kwin-testScreenPaintData ......... Passed 0.05 sec
Start 7: kwin-testWindowPaintData
7/23 Test #7: kwin-testWindowPaintData ......... Passed 0.05 sec
Start 8: kwin-testVirtualDesktops
8/23 Test #8: kwin-testVirtualDesktops ......... Passed 0.49 sec
Start 9: kwin-testClientMachine
9/23 Test #9: kwin-testClientMachine ...........Exception: Other 0.26 sec
Start 10: kwin-testXcbWrapper
10/23 Test #10: kwin-testXcbWrapper .............. Passed 0.06 sec
Start 11: kwin-testXcbSizeHints
11/23 Test #11: kwin-testXcbSizeHints ............ Passed 0.06 sec
Start 12: kwin-testXcbWindow
12/23 Test #12: kwin-testXcbWindow ............... Passed 0.06 sec
Start 13: kwin-testBuiltInEffectLoader
13/23 Test #13: kwin-testBuiltInEffectLoader ..... Passed 0.93 sec
Start 14: kwin-testScriptedEffectLoader
14/23 Test #14: kwin-testScriptedEffectLoader .... Passed 0.93 sec
Start 15: kwin-testPluginEffectLoader
15/23 Test #15: kwin-testPluginEffectLoader ...... Passed 1.26 sec
Start 16: kwin_testScreens
16/23 Test #16: kwin_testScreens ................. Passed 2.51 sec
Start 17: kwin-testXRandRScreens
17/23 Test #17: kwin-testXRandRScreens ...........
Failed 0.01 sec
Start 18: kwin_testScreenEdges
18/23 Test #18: kwin_testScreenEdges .............Failed 1.02 sec
Start 19: kwin-testStart
19/23 Test #19: kwin-testStart ...................
Exception: SegFault 0.08 sec
Start 20: kwin-testTransientNoInput
20/23 Test #20: kwin-testTransientNoInput ........Exception: SegFault 0.07 sec
Start 21: kwin-testQuickTiling
21/23 Test #21: kwin-testQuickTiling .............
Exception: SegFault 0.07 sec
Start 22: kwin-testMoveResize
22/23 Test #22: kwin-testMoveResize ..............Exception: SegFault 0.07 sec
Start 23: kwin-testDontCrashGlxgears
23/23 Test #23: kwin-testDontCrashGlxgears .......
Exception: SegFault 0.07 sec

65% tests passed, 8 tests failed out of 23

Total Test time (real) = 8.22 sec

The following tests FAILED:
9 - kwin-testClientMachine (OTHER_FAULT)
17 - kwin-testXRandRScreens (Failed)
18 - kwin_testScreenEdges (Failed)
19 - kwin-testStart (SEGFAULT)
20 - kwin-testTransientNoInput (SEGFAULT)
21 - kwin-testQuickTiling (SEGFAULT)
22 - kwin-testMoveResize (SEGFAULT)
23 - kwin-testDontCrashGlxgears (SEGFAULT)
Errors while running CTest
FAILED: cd /home/kenya888/devel/kf5/build/kde/workspace/kwin && /usr/bin/ctest --force-new-ctest-process
ninja: build stopped: subcommand failed.

David Edmundson
Takahiro Hashimoto
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 7b9c21d63ca00597812d31d365d50c38af4dfe07 by Takahiro Hashimoto to branch master.
Martin Flöser

sigh now I have to update my Qt...

Thanks for fixing!

  1. Pleasure if helping your hard working of Kwin wayland ;)

    The upstream developtment always excites me :D

Martin Flöser

the crash in the tests is exactly the same line of code missing. We need to disable high dpi scaling also in the tests.

  1. Thank you for your advice. I tried adding the code to WAYLANTEST_MAIN macro (kwin/autotest/wayland/kwin_wayland_test.h) but the result is not changed. Trying more investigation:)

    By the way, WAYLANTEST_MAIN ? WAYLANDTEST_MAIN ? :)

  2. Trying more investigation

    Don't. Just do git pull :-) I fixed it yesterday.

    By the way, WAYLANTEST_MAIN

    Yeah, typo, I noticed some time ago and got rather angry with me ;-)

  3. Wow, thanks!!

    I think less number of charactors help reducing typing ;-)

Loading...