forked from qt-creator/qt-creator
Fix some more *::count() deprecation warnings
Change-Id: Ib7d1552a6f7b167e15beb7ca1ef26c7d57e090e9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -272,10 +272,10 @@ CMakeConfigItem CMakeConfigItem::fromString(const QString &s)
|
||||
|
||||
static QByteArray trimCMakeCacheLine(const QByteArray &in) {
|
||||
int start = 0;
|
||||
while (start < in.count() && (in.at(start) == ' ' || in.at(start) == '\t'))
|
||||
while (start < in.size() && (in.at(start) == ' ' || in.at(start) == '\t'))
|
||||
++start;
|
||||
|
||||
return in.mid(start, in.count() - start - 1);
|
||||
return in.mid(start, in.size() - start - 1);
|
||||
}
|
||||
|
||||
static QByteArrayList splitCMakeCacheLine(const QByteArray &line) {
|
||||
@@ -377,9 +377,9 @@ CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *err
|
||||
const QByteArray value = pieces.at(2);
|
||||
|
||||
if (key.endsWith("-ADVANCED") && value == "1") {
|
||||
advancedSet.insert(key.left(key.count() - 9 /* "-ADVANCED" */));
|
||||
advancedSet.insert(key.left(key.size() - 9 /* "-ADVANCED" */));
|
||||
} else if (key.endsWith("-STRINGS") && CMakeConfigItem::typeStringToType(type) == CMakeConfigItem::INTERNAL) {
|
||||
valuesMap[key.left(key.count() - 8) /* "-STRINGS" */] = value;
|
||||
valuesMap[key.left(key.size() - 8) /* "-STRINGS" */] = value;
|
||||
} else {
|
||||
CMakeConfigItem::Type t = CMakeConfigItem::typeStringToType(type);
|
||||
result << CMakeConfigItem(key, t, documentation, value);
|
||||
|
||||
@@ -431,7 +431,7 @@ static QVector<ToolChainDescription> extractToolChainsFromCache(const CMakeConfi
|
||||
for (const CMakeConfigItem &i : config) {
|
||||
if (!i.key.startsWith("CMAKE_") || !i.key.endsWith("_COMPILER"))
|
||||
continue;
|
||||
const QByteArray language = i.key.mid(6, i.key.count() - 6 - 9); // skip "CMAKE_" and "_COMPILER"
|
||||
const QByteArray language = i.key.mid(6, i.key.size() - 6 - 9); // skip "CMAKE_" and "_COMPILER"
|
||||
Id languageId;
|
||||
if (language == "CXX") {
|
||||
haveCCxxCompiler = true;
|
||||
|
||||
Reference in New Issue
Block a user