[libcalamares] Merge more from Camilo
- Complete the model for locales
This commit is contained in:
parent
684c5f477c
commit
ca13d1670e
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019, Camilo Higuita <milo.h@aol.com>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "LabelModel.h"
|
||||
#include <QDebug>
|
||||
|
||||
#include "Lookup.h"
|
||||
|
||||
@ -74,6 +74,12 @@ LabelModel::data( const QModelIndex& index, int role ) const
|
||||
}
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
LabelModel::roleNames() const
|
||||
{
|
||||
return { { LabelRole, "label" }, { EnglishLabelRole, "englishLabel" } };
|
||||
}
|
||||
|
||||
const Label&
|
||||
LabelModel::locale( int row ) const
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019, Camilo Higuita <milo.h@aol.com>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -48,6 +49,7 @@ public:
|
||||
int rowCount( const QModelIndex& parent ) const override;
|
||||
|
||||
QVariant data( const QModelIndex& index, int role ) const override;
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
/** @brief Gets locale information for entry #n
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user