Commit f0c18316 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

translations: inherit constructors from base class

since we only have trivial ctors it's more modern to simply inherit the
base class' ctors.
parent 9dfa9bbb
......@@ -227,11 +227,6 @@ QString TranslationsModel::languageCodeToName(const QString &languageCode) const
return languageName;
}
SelectedTranslationsModel::SelectedTranslationsModel(QObject *parent)
: TranslationsModel(parent)
{
}
QVariant SelectedTranslationsModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || index.row() < 0 || index.row() >= m_selectedLanguages.count()) {
......@@ -408,11 +403,6 @@ void SelectedTranslationsModel::remove(const QString &languageCode)
emit selectedLanguagesChanged(m_selectedLanguages);
}
AvailableTranslationsModel::AvailableTranslationsModel(QObject *parent)
: TranslationsModel(parent)
{
}
QVariant AvailableTranslationsModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || index.row() < 0 || index.row() >= m_availableLanguages.count()) {
......
......@@ -64,7 +64,7 @@ class SelectedTranslationsModel : public TranslationsModel
Q_PROPERTY(QStringList missingLanguages READ missingLanguages NOTIFY missingLanguagesChanged)
public:
explicit SelectedTranslationsModel(QObject *parent = nullptr);
using TranslationsModel::TranslationsModel;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
......@@ -97,7 +97,7 @@ class AvailableTranslationsModel : public TranslationsModel
Q_OBJECT
public:
explicit AvailableTranslationsModel(QObject *parent = nullptr);
using TranslationsModel::TranslationsModel;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment