Merge branch 'master' into develop

This commit is contained in:
Michael Mandl 2019-01-27 20:10:59 +01:00
commit 8444eda4ee
3 changed files with 9 additions and 9 deletions

View file

@ -166,3 +166,8 @@ std::string MetaDataModel::toHtml() const
return out.str();
}
Age MetaDataModel::getAge() const
{
return {m_dateOfBirth, m_dateOfTest};
}

View file

@ -24,19 +24,14 @@ public:
MetaDataModel(QObject *parent);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(
const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole) override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
void read(const ESGRAF48::MetaDataModel &model);
void write(ESGRAF48::MetaDataModel &model) const;
std::string toHtml() const;
Age getAge() const
{
return { m_dateOfBirth, m_dateOfTest };
}
Age getAge() const;
};

View file

@ -20,7 +20,7 @@ unsigned int PRMap::lookup(const Age &age, const unsigned int &points)
if (m_ages.back() < age)
{
return m_ages.size() - 1;
return m_ages.size() - 2;
}
for (size_t index = 1; index < m_ages.size(); ++index)