diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-13 07:30:10 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-17 16:31:32 -0800 |
commit | 1a440e557b0efa9758f7d41112f09016ad385bab (patch) | |
tree | 444fdc4ab17d517b25a0acf7c2b99ea12bf833ca /src/corelib/tools/qversionnumber.cpp | |
parent | f718c35055dc52120ff8e034d47c678ba80ef3af (diff) |
QVersionNumber: change int to qsizetype in fromString()
This completes the update to qsizetype in this class, adding a couple of
methods that need to be removed in Qt 7. They're only required where int
is not qsizetype (i.e., 64-bit platforms).
Change-Id: I0e5f6bec596a4a78bd3bfffd16c9de29bec4c637
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/tools/qversionnumber.cpp')
-rw-r--r-- | src/corelib/tools/qversionnumber.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qversionnumber.cpp b/src/corelib/tools/qversionnumber.cpp index 54524c4405..d30608534f 100644 --- a/src/corelib/tools/qversionnumber.cpp +++ b/src/corelib/tools/qversionnumber.cpp @@ -413,7 +413,7 @@ QString QVersionNumber::toString() const \sa isNull() */ -QVersionNumber QVersionNumber::fromString(const QString &string, int *suffixIndex) +QVersionNumber QVersionNumber::fromString(const QString &string, qsizetype *suffixIndex) { return fromString(QLatin1String(string.toLatin1()), suffixIndex); } @@ -434,7 +434,7 @@ QVersionNumber QVersionNumber::fromString(const QString &string, int *suffixInde \sa isNull() */ -QVersionNumber QVersionNumber::fromString(QStringView string, int *suffixIndex) +QVersionNumber QVersionNumber::fromString(QStringView string, qsizetype *suffixIndex) { return fromString(QLatin1String(string.toLatin1()), suffixIndex); } @@ -454,7 +454,7 @@ QVersionNumber QVersionNumber::fromString(QStringView string, int *suffixIndex) \sa isNull() */ -QVersionNumber QVersionNumber::fromString(QLatin1String string, int *suffixIndex) +QVersionNumber QVersionNumber::fromString(QLatin1String string, qsizetype *suffixIndex) { QList<int> seg; @@ -474,7 +474,7 @@ QVersionNumber QVersionNumber::fromString(QLatin1String string, int *suffixIndex } while (start < endOfString && (end < endOfString && *end == '.')); if (suffixIndex) - *suffixIndex = int(lastGoodEnd - string.begin()); + *suffixIndex = lastGoodEnd - string.begin(); return QVersionNumber(std::move(seg)); } |