Page MenuHomePhabricator

qt: Set AA_EnableHighDpiScaling attribute early
ClosedPublic

Authored by Fabien on Apr 16 2020, 09:42.

Details

Summary
Enables high-DPI scaling in Qt on supported platforms (see also High DPI
Displays). Supported platforms are X11, Windows and Android. Enabling
makes Qt scale the main (device independent) coordinate system according
to display scale factors provided by the operating system. This
corresponds to setting the QT_AUTO_SCREEN​_SCALE_FACTOR environment
variable to 1. This attribute must be set before QGuiApplication is
constructed. This value was added in Qt 5.6.

Backport of core PR16254.

Fixes https://github.com/Bitcoin-ABC/bitcoin-abc/issues/378

Test Plan
ninja check-bitcoin-qt

Run bitcoin-qt with Qt > 5.12.4 and check the warning is gone.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Snippet of first build failure:

[09:43:17] :		 [VCS Root: Bitcoin ABC Staging] Git version: 2.20.1.0
[09:43:17] :		 [VCS Root: Bitcoin ABC Staging] Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git) (3s)
[09:43:17] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git config http.sslCAInfo
[09:43:17] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git show-ref
[09:43:17] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git -c credential.helper= ls-remote origin
[09:43:18] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git show-ref refs/tags/phabricator/diff/18854
[09:43:18] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git show-ref refs/tags/phabricator/diff/18854
[09:43:19] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854 (1s)
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Enumerating objects: 9, done.        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  11% (1/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  22% (2/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  33% (3/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  44% (4/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  55% (5/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  66% (6/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  77% (7/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects:  88% (8/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects: 100% (9/9)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Counting objects: 100% (9/9), done.        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects:  20% (1/5)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects:  40% (2/5)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects:  60% (3/5)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects:  80% (4/5)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects: 100% (5/5)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Compressing objects: 100% (5/5), done.        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] remote: Total 5 (delta 4), reused 0 (delta 0)        
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854] From ssh://reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854]  * [new tag]             phabricator/diff/18854 -> phabricator/diff/18854
[09:43:20]i:				 [/usr/bin/git -c credential.helper= fetch --progress origin +refs/tags/phabricator/diff/18854:refs/tags/phabricator/diff/18854]  * [new tag]             phabricator/base/18854 -> phabricator/base/18854
[09:43:20] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git log -n1 --pretty=format:%H%x20%s 0d056af2b7cd3d06313a55cd34f655ede6ed7420 --
[09:43:20] :			 [Update git mirror (/home/teamcity/buildAgent/system/git/git-48AA3180.git)] /usr/bin/git pack-refs --all
[09:43:20] :		 [VCS Root: Bitcoin ABC Staging] Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] The .git directory is missing in '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc'. Running 'git init'...
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git init
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git config lfs.storage /home/teamcity/buildAgent/system/git/git-48AA3180.git/lfs
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git config core.sparseCheckout true
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git config http.sslCAInfo
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git show-ref
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git show-ref refs/tags/phabricator/diff/18854
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git log -n1 --pretty=format:%H%x20%s 0d056af2b7cd3d06313a55cd34f655ede6ed7420 --
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git -c credential.helper= checkout -q -f phabricator/diff/18854
[09:43:20] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git show-ref refs/tags/phabricator/diff/18854
[09:43:21] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] Cleaning Bitcoin ABC Staging in /home/teamcity/buildAgent/work/jailed-build/bitcoin-abc the file set ALL_UNTRACKED
[09:43:21] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git clean -f -d -x
[09:43:21] : Build preparation done
[09:43:21]E: Step 1/2: Command Line (3m:01s)
[09:43:21] :	 [Step 1/2] Ant JUnit report watcher
[09:43:21] :		 [Ant JUnit report watcher] Watching paths:
[09:43:21] :		 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[09:43:21] :		 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[09:43:21] :	 [Step 1/2] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script379445410787364323
[09:43:21] :	 [Step 1/2] in directory: /home/teamcity/buildAgent/work/jailed-build
[09:43:21] :	 [Step 1/2] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:43:21] :	 [Step 1/2] ~/buildAgent/work/jailed-build
[09:43:21] :	 [Step 1/2] Building base image for: 0d056af2b...
[09:43:21] :	 [Step 1/2] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:43:21] :	 [Step 1/2] ~/buildAgent/work/jailed-build
[09:43:21] :	 [Step 1/2] Tag name: abc-base-image-0d056af2b
[09:46:21]W:	 [Step 1/2] Process exited with code 1
[09:46:21]E:	 [Step 1/2] Process exited with code 1 (Step: Command Line)
rex4539 added a subscriber: rex4539.

Tested ACK.

This revision is now accepted and ready to land.Apr 16 2020, 09:56