ScreenRecorder: Move function into its needed scope

Silences a warning for release build.
Amends 200074c4ac.

Change-Id: Ie657621b0334efd73655e6c15f96335ab75116ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christian Stenger
2025-03-13 06:43:37 +01:00
parent 954d7fc3bc
commit 0fe56faaf9

View File

@@ -137,18 +137,6 @@ bool CropSizeWarningIcon::needsWarning() const
namespace FFmpegUtils { namespace FFmpegUtils {
static QVersionNumber parseVersionNumber(const QByteArray &toolOutput)
{
QVersionNumber result;
const QJsonObject jsonObject = QJsonDocument::fromJson(toolOutput).object();
if (const QJsonObject program_version = jsonObject.value("program_version").toObject();
!program_version.isEmpty()) {
if (const QJsonValue version = program_version.value("version"); !version.isUndefined())
result = QVersionNumber::fromString(version.toString());
}
return result;
}
static ClipInfo parseClipInfo(const QByteArray &toolOutput) static ClipInfo parseClipInfo(const QByteArray &toolOutput)
{ {
ClipInfo result; ClipInfo result;
@@ -248,6 +236,18 @@ using namespace ScreenRecorder::FFmpegUtils;
namespace ScreenRecorder::Internal { namespace ScreenRecorder::Internal {
static QVersionNumber parseVersionNumber(const QByteArray &toolOutput)
{
QVersionNumber result;
const QJsonObject jsonObject = QJsonDocument::fromJson(toolOutput).object();
if (const QJsonObject program_version = jsonObject.value("program_version").toObject();
!program_version.isEmpty()) {
if (const QJsonValue version = program_version.value("version"); !version.isUndefined())
result = QVersionNumber::fromString(version.toString());
}
return result;
}
void FFmpegOutputParserTest::testVersionParser_data() void FFmpegOutputParserTest::testVersionParser_data()
{ {
QTest::addColumn<QByteArray>("ffprobeVersionOutput"); QTest::addColumn<QByteArray>("ffprobeVersionOutput");