From 61557cf80539f6cfd50b7867b1511dbe5929bb48 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Apr 2021 12:41:50 +0200 Subject: [PATCH] [packagechooser] Connect UI to model The model needs to be attached to the widget; because of changes in the order that widget() and setConfigurationMap() are called, the model is created earlier, but needs to be connected later. --- src/modules/packagechooser/Config.cpp | 1 + src/modules/packagechooser/PackageChooserViewStep.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/modules/packagechooser/Config.cpp b/src/modules/packagechooser/Config.cpp index 0a0358c6b..a3467b553 100644 --- a/src/modules/packagechooser/Config.cpp +++ b/src/modules/packagechooser/Config.cpp @@ -169,6 +169,7 @@ fillModel( PackageListModel* model, const QVariantList& items ) model->addPackage( PackageItem( item_map ) ); } } + cDebug() << Logger::SubEntry << "Loaded PackageChooser with" << model->packageCount() << "entries."; } void diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp index a15fd0f55..67e67495d 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.cpp +++ b/src/modules/packagechooser/PackageChooserViewStep.cpp @@ -71,6 +71,7 @@ PackageChooserViewStep::widget() connect( m_widget, &PackageChooserPage::selectionChanged, [=]() { emit nextStatusChanged( this->isNextEnabled() ); } ); + hookupModel(); } return m_widget; }