@@ -40,7 +40,7 @@ Q_LOGGING_CATEGORY(appLoaderLog, "dtk.quick.apploader");
4040static const QQuickItemPrivate::ChangeTypes changedTypes = QQuickItemPrivate::Geometry;
4141DAppLoader *DAppLoader::self = nullptr ;
4242
43- static inline const bool heightValid (QQuickItemPrivate *item)
43+ static inline bool heightValid (QQuickItemPrivate *item)
4444{
4545#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
4646 return item->heightValid ;
@@ -246,7 +246,11 @@ bool DAppLoaderPrivate::createObjects(const char *propertyName)
246246void DAppLoaderPrivate::createChildComponents ()
247247{
248248 auto components = appRootItem->findChildren <QQmlComponent *>(QStringLiteral (" " ), Qt::FindDirectChildrenOnly);
249+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
250+ for (auto childCom : std::as_const (components)) {
251+ #else
249252 for (auto childCom : qAsConst (components)) {
253+ #endif
250254 QObject::connect (childCom, SIGNAL (progressChanged (qreal)), q_func (), SLOT (_q_onComponentProgressChanged ()));
251255 auto asyn = appRootItem->asynchronous () ? DQmlComponentIncubator::Asynchronous : DQmlComponentIncubator::AsynchronousIfNested;
252256 DQmlComponentIncubator *incubator = new DQmlComponentIncubator (childCom, this , asyn);
@@ -436,7 +440,11 @@ void DAppLoaderPrivate::_q_onComponentProgressChanged()
436440{
437441 qreal progress = 0 ;
438442 auto components = appRootItem->findChildren <QQmlComponent *>();
443+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
444+ for (auto childCom : std::as_const (components) {
445+ #else
439446 for (auto childCom : qAsConst (components)) {
447+ #endif
440448 progress += childCom->progress ();
441449 }
442450
0 commit comments