Some Qt6 porting

- new ambiguous overloads for mapToGlobal
- some functions now return qsizetype instead of int

Task-number: QTCREATORBUG-24098
Change-Id: I0020e5689e093653e9e0e6f0d6263720bc2e003b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-07-21 15:47:35 +02:00
parent affd4ee658
commit 2d78bd4b19
13 changed files with 17 additions and 15 deletions

View File

@@ -475,7 +475,7 @@ void SyntaxHighlighter::formatSpaces(const QString &text, int start, int count)
{
Q_D(const SyntaxHighlighter);
int offset = start;
const int end = std::min(start + count, text.length());
const int end = std::min(start + count, int(text.length()));
while (offset < end) {
if (text.at(offset).isSpace()) {
int start = offset++;
@@ -503,7 +503,7 @@ void SyntaxHighlighter::setFormatWithSpaces(const QString &text, int start, int
QTextCharFormat visualSpaceFormat = d->whitespaceFormat;
visualSpaceFormat.setBackground(format.background());
const int end = std::min(start + count, text.length());
const int end = std::min(start + count, int(text.length()));
int index = start;
while (index != end) {