summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-11-16 13:26:11 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2017-07-25 14:08:47 +0000
commit3ff2d70a15fc198f1f5b986d3e738c2150b9595c (patch)
tree10e74f9db5f2ab6ca1cbca06460f2ea7d4e43400 /tests/auto
parent03bb4fe6b1910603b5cca1a8f9b2e761ac8299a0 (diff)
Rework qAppFileName() on MS-Win to handle problems gracefully
Using a stack buffer and then a growing realloc() buffer can be tidily packaged by using a QVLA. Passing the reported name length to QString::fromWCharArray() saves the need for 0-termination, even if it has been missed. This also degrades gracefully to produce an empty QString when GetModuleFileName fails (returning 0). Change-Id: If58f5ad8505f66fb67e59572af1ceb60a068f0ab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Diffstat (limited to 'tests/auto')
0 files changed, 0 insertions, 0 deletions