Replace deprecated .toSet()

This commit is contained in:
Dale Glass 2022-06-05 13:05:49 +02:00
parent aefb6860e6
commit a7f6fed937
2 changed files with 3 additions and 3 deletions

View file

@ -237,7 +237,7 @@ void AvatarDoctor::startDiagnosing() {
jointValues << jointVariant.toString(); jointValues << jointVariant.toString();
} }
const auto& uniqueJointValues = jointValues.toSet(); const auto& uniqueJointValues = QSet<QString>(jointValues.begin(), jointValues.end());
for (const auto& jointName: uniqueJointValues) { for (const auto& jointName: uniqueJointValues) {
if (jointValues.count(jointName) > 1) { if (jointValues.count(jointName) > 1) {
addError(tr("%1 is mapped multiple times.").arg(jointName), "mapped-multiple-times"); addError(tr("%1 is mapped multiple times.").arg(jointName), "mapped-multiple-times");

View file

@ -28,7 +28,7 @@ BatchLoader::BatchLoader(const QList<QUrl>& urls)
: QObject(), : QObject(),
_started(false), _started(false),
_finished(false), _finished(false),
_urls(urls.toSet()), _urls(QSet<QUrl>(urls.begin(), urls.end())),
_data(), _data(),
_status() { _status() {
qRegisterMetaType<QMap<QUrl, QString>>("QMap<QUrl, QString>"); qRegisterMetaType<QMap<QUrl, QString>>("QMap<QUrl, QString>");