From d32fb5f1fe1abf6436ae14ac219dc05b8eb04098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 4 Feb 2022 10:20:41 +0100 Subject: [PATCH] QProcess(Win): change int to qsizetype where appropriate Even if it's unlikely any of those would exceed 2 billion entries. Pick-to: 6.3 6.2 Change-Id: Ib0d4d4e7a64fcde03b7f24bc0667d63c4a737deb Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz --- src/corelib/io/qprocess_win.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index aaaccf4e0d..3e2257109d 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -399,15 +399,15 @@ static QString qt_create_commandline(const QString &program, const QStringList & args = programName + QLatin1Char(' '); } - for (int i=0; i= 0) { // Escape quote tmp.insert(index++, QLatin1Char('\\')); // Double preceding backslashes (ignoring the one we just inserted) - for (int i = index - 2 ; i >= 0 && tmp.at(i) == QLatin1Char('\\') ; --i) { + for (qsizetype i = index - 2 ; i >= 0 && tmp.at(i) == QLatin1Char('\\') ; --i) { tmp.insert(i, QLatin1Char('\\')); index++; } @@ -417,7 +417,7 @@ static QString qt_create_commandline(const QString &program, const QStringList & // The argument must not end with a \ since this would be interpreted // as escaping the quote -- rather put the \ behind the quote: e.g. // rather use "foo"\ than "foo\" - int i = tmp.length(); + qsizetype i = tmp.length(); while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) --i; tmp.insert(i, QLatin1Char('"'));