From 8830a38c7dfaab9ec7fba6196082ab027b95b8d0 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 19 Jul 2024 16:16:23 +0200 Subject: [PATCH] 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 --- src/plugins/clangtools/clangtoolssettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangtools/clangtoolssettings.cpp b/src/plugins/clangtools/clangtoolssettings.cpp index 0441e93d6c8..8cb2517085c 100644 --- a/src/plugins/clangtools/clangtoolssettings.cpp +++ b/src/plugins/clangtools/clangtoolssettings.cpp @@ -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); }