diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index 5fd032a52..67e306a3a 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -18,6 +18,19 @@ #include "LocaleModel.h" +LocaleModel::LocaleModel(const QStringList& locales, QObject* parent) + : QAbstractTableModel( parent ) +{ + m_locales.reserve( locales.count() ); + + for ( const auto& l : locales ) + m_locales.emplace_back( l ); +} + +LocaleModel::~LocaleModel() +{ +} + int LocaleModel::columnCount( const QModelIndex& ) const { diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 06a6a74c2..9e622a43f 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -25,7 +25,7 @@ #include "utils/CalamaresUtilsGui.h" -class LocaleModel : public QAbstractItemModel +class LocaleModel : public QAbstractTableModel { public: LocaleModel( const QStringList& locales, QObject* parent = nullptr );