[libcalamares] Deal with Qt5/6 differences in count()

This commit is contained in:
Adriaan de Groot 2024-04-28 14:48:10 +02:00
parent 8c66a558d5
commit 6dc83fb277
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ RequirementsModel::reCheckList()
int
RequirementsModel::rowCount( const QModelIndex& ) const
{
return m_requirements.count();
return static_cast< int >( m_requirements.count() ); // TODO 3.4 use qsizetype
}
QVariant

View File

@ -61,8 +61,8 @@ public:
QVariant data( const QModelIndex& index, int role ) const override;
int rowCount( const QModelIndex& ) const override;
int count() const { return m_requirements.count(); }
int rowCount( const QModelIndex& ) const override; // TODO 3.4 use qsizetype
int count() const { return static_cast< int >( m_requirements.count() ); } // TODO 3.4 use qsizetype
///@brief Debugging tool, describe the checking-state
void describe() const;