Port to undeprecated QSet<T>(list.keyBegin(), list.keyEnd())

parent 2720f349
......@@ -220,7 +220,13 @@ DocumentChangeSet::ChangeResult DocumentChangeSet::applyAllChanges()
}
QList<QUrl> allFiles;
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
const auto changedFiles =
QSet<KDevelop::IndexedString>(d->documentsRename.keyBegin(), d->documentsRename.keyEnd()) +
QSet<KDevelop::IndexedString>(d->changes.keyBegin(), d->changes.keyEnd());
#else
const auto changedFiles = d->documentsRename.keys().toSet() + d->changes.keys().toSet();
#endif
allFiles.reserve(changedFiles.size());
for (const IndexedString& file : changedFiles) {
allFiles << file.toUrl();
......
......@@ -540,7 +540,11 @@ void updateConfig( KDevelop::IProject* project, int buildDirIndex)
{ QStringLiteral("CMAKE_BUILD_TYPE"), Config::Specific::cmakeBuildTypeKey }
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
const QSet<QString> variables(keys.keyBegin(), keys.keyEnd());
#else
const QSet<QString> variables = keys.keys().toSet();
#endif
const QHash<QString, QString> cacheValues = readCacheValues(cacheFilePath, variables);
for(auto it = cacheValues.constBegin(), itEnd = cacheValues.constEnd(); it!=itEnd; ++it) {
const QString key = keys.value(it.key());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment