summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2020-07-14 15:14:11 +0200
committerFriedemann Kleint <[email protected]>2020-07-17 22:14:43 +0200
commitae5d021f4516a3664565d49f45249e0b48a68c37 (patch)
tree9470e98c840f65f6dcdecfb37866fcca629d5164 /src/gui/text/qtextengine.cpp
parentd145dbc43f667bcb44213cfb3f12590b0dc3c92c (diff)
Fix some MSVC int conversion warnings
kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r--src/gui/text/qtextengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 36405195d80..c04bbba70c5 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2661,8 +2661,8 @@ QTextEngine::LayoutData::LayoutData(const QString &str, void **stack_memory, int
{
allocated = _allocated;
- int space_charAttributes = sizeof(QCharAttributes)*string.length()/sizeof(void*) + 1;
- int space_logClusters = sizeof(unsigned short)*string.length()/sizeof(void*) + 1;
+ int space_charAttributes = int(sizeof(QCharAttributes) * string.length() / sizeof(void*) + 1);
+ int space_logClusters = int(sizeof(unsigned short) * string.length() / sizeof(void*) + 1);
available_glyphs = ((int)allocated - space_charAttributes - space_logClusters)*(int)sizeof(void*)/(int)QGlyphLayout::SpaceNeeded;
if (available_glyphs < str.length()) {
@@ -2703,8 +2703,8 @@ bool QTextEngine::LayoutData::reallocate(int totalGlyphs)
return true;
}
- int space_charAttributes = sizeof(QCharAttributes)*string.length()/sizeof(void*) + 1;
- int space_logClusters = sizeof(unsigned short)*string.length()/sizeof(void*) + 1;
+ int space_charAttributes = int(sizeof(QCharAttributes) * string.length() / sizeof(void*) + 1);
+ int space_logClusters = int(sizeof(unsigned short) * string.length() / sizeof(void*) + 1);
int space_glyphs = (totalGlyphs * QGlyphLayout::SpaceNeeded) / sizeof(void *) + 2;
int newAllocated = space_charAttributes + space_glyphs + space_logClusters;