summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-07-07 10:27:31 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-07-08 22:14:53 +0200
commitf2c9f8c83781fea73b148bf24472f1d3d191c26e (patch)
treec74a86e17311c69cd903787e3593ed350525a256 /src/gui/painting
parent9d29c590f30a04b3dba0b7d1b4918c2db5419e0d (diff)
Port QFontSubset API from int to qsizetype
Removing the impedance mismatch with the Qt containers. Pick-to: 6.4 Task-number: QTBUG-104814 Change-Id: I141d9056249644b90c404219792e0fcd87960f7c Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpdf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index cfb9481ab3..ed0208772a 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1961,7 +1961,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
QByteArray cidSetStream(font->nGlyphs() / 8 + 1, 0);
int byteCounter = 0;
int bitCounter = 0;
- for (int i = 0; i < font->nGlyphs(); ++i) {
+ for (qsizetype i = 0; i < font->nGlyphs(); ++i) {
cidSetStream.data()[byteCounter] |= (1 << (7 - bitCounter));
bitCounter++;
@@ -3081,7 +3081,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
x += .3*y;
x /= stretch;
char buf[5];
- int g = font->addGlyph(glyphs[i]);
+ qsizetype g = font->addGlyph(glyphs[i]);
*currentPage << x - last_x << last_y - y << "Td <"
<< QPdf::toHex((ushort)g, buf) << "> Tj\n";
last_x = x;
@@ -3101,7 +3101,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
x += .3*y;
x /= stretch;
char buf[5];
- int g = font->addGlyph(glyphs[i]);
+ qsizetype g = font->addGlyph(glyphs[i]);
*currentPage << x - last_x << last_y - y << "Td <"
<< QPdf::toHex((ushort)g, buf) << "> Tj\n";
last_x = x;