forked from qt-creator/qt-creator
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:
@@ -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");
|
||||||
|
Reference in New Issue
Block a user