Closed add-uos closed 2 months ago
关键摘要:
main.cpp
文件中,新增代码中使用了qgetenv
和qputenv
,但没有检查这些函数是否正确处理了环境变量。QStringList factors = QString(qgetenv("QT_SCREEN_SCALE_FACTORS")).split(";", QString::SkipEmptyParts);
这行代码假设QT_SCREEN_SCALE_FACTORS
环境变量总是以分号分隔的字符串,这可能不总是正确的。factors.at(0).toDouble(&ok);
这行代码尝试将第一个元素转换为双精度浮点数,但如果该元素不能转换为数字,ok
将为false
,但代码没有处理这种情况。qputenv
函数的使用可能会覆盖现有的环境变量,这可能不是预期的行为。Qt::AA_EnableHighDpiScaling
设置为true
时的情况,这可能会导致应用程序在在高分辨率屏幕上运行时出现问题。是否建议立即修改: 是
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: add-uos, lzwind
The full list of commands accepted by this bot can be found here.
/merge
Part of the screenshot is black in screen expansion and zoom mode.
Log: fix the black part in screen recorder Bug: https://pms.uniontech.com/bug-view-205567.html