summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Hallamaa <[email protected]>2025-04-23 14:36:19 +0200
committerMikko Hallamaa <[email protected]>2025-07-03 14:32:53 +0200
commit6171a6af3f5bfc132a28cf2797543a150a459470 (patch)
tree5e894f169b4639cf19b76e42c7fc0ef3de1b9d98
parent0658aced75ec92ff4e798dee4b45b17493afc0c5 (diff)
tst_qvideoframecolormanagement: Fix string typesHEADdev
This patch updates tst_qvideoframecolormanagement to get rid of warnings regarding string types. Pick-to: 6.10 6.9 6.8 Change-Id: I9dd7b42fb4d8940865cdae6288093863bfddf6a0 Reviewed-by: Tim Blechmann <[email protected]>
-rw-r--r--tests/auto/unit/multimedia/qvideoframecolormanagement/tst_qvideoframecolormanagement.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/tests/auto/unit/multimedia/qvideoframecolormanagement/tst_qvideoframecolormanagement.cpp b/tests/auto/unit/multimedia/qvideoframecolormanagement/tst_qvideoframecolormanagement.cpp
index 63b9beada..29ec8378d 100644
--- a/tests/auto/unit/multimedia/qvideoframecolormanagement/tst_qvideoframecolormanagement.cpp
+++ b/tests/auto/unit/multimedia/qvideoframecolormanagement/tst_qvideoframecolormanagement.cpp
@@ -74,12 +74,12 @@ QString toString(QVideoFrameFormat::ColorRange r)
{
switch (r) {
case QVideoFrameFormat::ColorRange_Video:
- return "Video";
+ return QStringLiteral("Video");
case QVideoFrameFormat::ColorRange_Full:
- return "Full";
+ return QStringLiteral("Full");
default:
QTEST_ASSERT(false);
- return "";
+ return QString();
}
}
@@ -158,16 +158,16 @@ QString toString(QVideoFrameFormat::ColorSpace s)
{
switch (s) {
case QVideoFrameFormat::ColorSpace_BT601:
- return "BT601";
+ return QStringLiteral("BT601");
case QVideoFrameFormat::ColorSpace_BT709:
- return "BT709";
+ return QStringLiteral("BT709");
case QVideoFrameFormat::ColorSpace_AdobeRgb:
- return "AdobeRgb";
+ return QStringLiteral("AdobeRgb");
case QVideoFrameFormat::ColorSpace_BT2020:
- return "BT2020";
+ return QStringLiteral("BT2020");
default:
QTEST_ASSERT(false);
- return "";
+ return QString();
}
}
@@ -296,7 +296,9 @@ QString fileName(const TestParams &p, FileType fileType)
else if (fileType == FileType::Diff)
fileNameParts.append(QStringLiteral("diff"));
- QString name = fileNameParts.join('_').toLower().replace(" ", "_");
+ QString name = fileNameParts.join(QStringLiteral("_"))
+ .toLower()
+ .replace(QStringLiteral(" "), QStringLiteral("_"));
if (fileType != FileType::TestName)
name += u".png";
@@ -423,7 +425,7 @@ class ReferenceData
public:
ReferenceData()
{
- m_testdataDir = QTest::qExtractTestData("testdata");
+ m_testdataDir = QTest::qExtractTestData(QStringLiteral("testdata"));
if (!m_testdataDir)
m_testdataDir = QSharedPointer<QTemporaryDir>(new QTemporaryDir);
}
@@ -554,14 +556,18 @@ private slots:
for (const QVideoFrameFormat::ColorRange colorRange : colorRanges()) {
for (const RenderingMode renderingMode : renderingModes(pixelFormat)) {
if (renderingMode == RenderingMode::Cpu) {
- TestParams param{ file, pixelFormat, colorSpace,
- colorRange, renderingMode, Exclude_None };
+ TestParams param{ QString::fromLatin1(file),
+ pixelFormat,
+ colorSpace,
+ colorRange,
+ renderingMode,
+ Exclude_None };
QTest::newRow(testName(param).toLatin1().data()) << file << param;
} else {
for (const ExcludableTextures excludableTextureCombination :
excludableTextureCombinations(pixelFormat)) {
TestParams param{
- file,
+ QString::fromLatin1(file),
pixelFormat,
colorSpace,
colorRange,