Qt6.6 compatibility

This commit is contained in:
Nicolas Werner 2023-10-13 23:28:57 +02:00
parent 4ec463bee2
commit 45ecb71444
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
16 changed files with 32 additions and 32 deletions

View file

@ -242,7 +242,7 @@ EventDelegateChooser::DelegateIncubator::reset(QString id)
.toInt();
this->oldType = role;
for (const auto choice : qAsConst(chooser.choices_)) {
for (const auto choice : std::as_const(chooser.choices_)) {
const auto &choiceValue = choice->roleValues();
if (choiceValue.contains(role) || choiceValue.empty()) {
// nhlog::ui()->debug(
@ -288,7 +288,7 @@ EventDelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status sta
chooser.polish();
} else if (status == QQmlIncubator::Error) {
auto errors_ = errors();
for (const auto &e : qAsConst(errors_))
for (const auto &e : std::as_const(errors_))
nhlog::ui()->error("Error instantiating delegate: {}", e.toString().toStdString());
}
}