ClangTools: Handle a Qt deprecation warning

Q_WEAK_OVERLOAD
    QT_DEPRECATED_VERSION_X_6_4("Use the 'qsizetype *suffixIndex' overload.")
    [[nodiscard]] static QVersionNumber fromString(QAnyStringView string, int *suffixIndex)

We are now well-prepared to handle Qt version strings with more than
two billion characters before the suffix.

Change-Id: I2aed2c3b8650ff6fba68a174b13d826dc9ab446e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2024-07-19 16:16:23 +02:00
parent e9e793fb6a
commit 8830a38c7d

View File

@@ -167,7 +167,7 @@ static VersionAndSuffix getVersionNumber(VersionAndSuffix &version, const FilePa
{
if (version.first.isNull() && !toolFilePath.isEmpty()) {
const QString versionString = queryVersion(toolFilePath, QueryFailMode::Silent);
int suffixIndex = versionString.length() - 1;
qsizetype suffixIndex = versionString.length() - 1;
version.first = QVersionNumber::fromString(versionString, &suffixIndex);
version.second = versionString.mid(suffixIndex);
}