[welcome] Switch model to a list model

- There doesn't seem to be a real benefit to providing the
   name and label as separate columns.
main
Adriaan de Groot 6 years ago
parent 53fd1590b8
commit 0b833b1e75

@ -19,7 +19,7 @@
#include "LocaleModel.h"
LocaleModel::LocaleModel( const QStringList& locales, QObject* parent )
: QAbstractTableModel( parent )
: QAbstractListModel( parent )
{
Q_ASSERT( locales.count() > 0 );
m_locales.reserve( locales.count() );
@ -32,12 +32,6 @@ LocaleModel::~LocaleModel()
{
}
int
LocaleModel::columnCount( const QModelIndex& ) const
{
return 2;
}
int
LocaleModel::rowCount( const QModelIndex& ) const
{

@ -19,13 +19,13 @@
#ifndef WELCOME_LOCALEMODEL_H
#define WELCOME_LOCALEMODEL_H
#include <QAbstractTableModel>
#include <QAbstractListModel>
#include <QVector>
#include "utils/LocaleLabel.h"
class LocaleModel : public QAbstractTableModel
class LocaleModel : public QAbstractListModel
{
public:
using LocaleLabel = CalamaresUtils::LocaleLabel;
@ -34,7 +34,6 @@ public:
virtual ~LocaleModel() override;
int rowCount( const QModelIndex& parent ) const override;
int columnCount( const QModelIndex& parent ) const override;
QVariant data( const QModelIndex& index, int role ) const override;

Loading…
Cancel
Save