summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2022-11-10 08:57:19 +0100
committerAxel Spoerl <axel.spoerl@qt.io>2022-11-10 17:16:59 +0100
commitbaa1228b4348ef70d525165062eef8ee37919433 (patch)
treed98af3359dfd2c18ed2556d0cca6e629a7bf045e /tests
parent3cadb68a593d4c5ecb0fbb55e5b38c42be73a530 (diff)
Fix type mismatch compiler warning in tst_QGlyphRun
When comparing a glyphIndex with a hard coded number, the number is cast to an int, whereas the glyphIndex is an unsigned int. That causes a compiler warning. This patch forces the numbers to be cast to an unsigned int. Change-Id: I8a31124c6afacfc4ecfb13caf2cb8133dad44a21 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index 9fbc2bebc0..3f6915ebcf 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -676,7 +676,7 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 1);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 233);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(233));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 1);
@@ -688,7 +688,7 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 1);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 233);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(233));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 1);
@@ -710,15 +710,15 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 3);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 71);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 233);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), 74);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(71));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(233));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), uint(74));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 3);
- QCOMPARE(stringIndexes.at(0), 0);
- QCOMPARE(stringIndexes.at(1), 1);
- QCOMPARE(stringIndexes.at(2), 3);
+ QCOMPARE(stringIndexes.at(0), uint(0));
+ QCOMPARE(stringIndexes.at(1), uint(1));
+ QCOMPARE(stringIndexes.at(2), uint(3));
}
{
@@ -726,11 +726,11 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 1);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 233);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(233));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 1);
- QCOMPARE(stringIndexes.at(0), 1);
+ QCOMPARE(stringIndexes.at(0), uint(1));
}
{
@@ -738,11 +738,11 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 1);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 233);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(233));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 1);
- QCOMPARE(stringIndexes.at(0), 1);
+ QCOMPARE(stringIndexes.at(0), uint(1));
}
{
@@ -750,8 +750,8 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 2);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 233);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 74);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(233));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(74));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 2);
@@ -774,13 +774,13 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 2);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 66);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 70);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(66));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(70));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 2);
- QCOMPARE(stringIndexes.at(0), 0);
- QCOMPARE(stringIndexes.at(1), 0);
+ QCOMPARE(stringIndexes.at(0), uint(0));
+ QCOMPARE(stringIndexes.at(1), uint(0));
}
// Three characters -> four glyphs
@@ -797,10 +797,10 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 4);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 71);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 66);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), 70);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(3), 74);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(71));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(66));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), uint(70));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(3), uint(74));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 4);
@@ -815,9 +815,9 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 3);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 66);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 70);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), 74);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(66));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(70));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), uint(74));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 3);
@@ -831,9 +831,9 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 3);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 71);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 66);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), 70);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(71));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(66));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), uint(70));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 3);
@@ -858,11 +858,11 @@ void tst_QGlyphRun::stringIndexes()
QCOMPARE(glyphRuns.size(), 1);
QCOMPARE(glyphRuns.at(0).glyphIndexes().size(), 5);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), 71);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), 233);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), 66);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(3), 70);
- QCOMPARE(glyphRuns.at(0).glyphIndexes().at(4), 74);
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(0), uint(71));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(1), uint(233));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(2), uint(66));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(3), uint(70));
+ QCOMPARE(glyphRuns.at(0).glyphIndexes().at(4), uint(74));
QList<qsizetype> stringIndexes = glyphRuns.at(0).stringIndexes();
QCOMPARE(stringIndexes.size(), 5);