From 6dc83fb277dc70608b54aee5843cf0b58e417a15 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 28 Apr 2024 14:48:10 +0200 Subject: [PATCH] [libcalamares] Deal with Qt5/6 differences in count() --- src/libcalamares/modulesystem/RequirementsModel.cpp | 2 +- src/libcalamares/modulesystem/RequirementsModel.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/modulesystem/RequirementsModel.cpp b/src/libcalamares/modulesystem/RequirementsModel.cpp index 3ad98ae88..4b44d62a4 100644 --- a/src/libcalamares/modulesystem/RequirementsModel.cpp +++ b/src/libcalamares/modulesystem/RequirementsModel.cpp @@ -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 diff --git a/src/libcalamares/modulesystem/RequirementsModel.h b/src/libcalamares/modulesystem/RequirementsModel.h index bd71ce81f..e6cd06854 100644 --- a/src/libcalamares/modulesystem/RequirementsModel.h +++ b/src/libcalamares/modulesystem/RequirementsModel.h @@ -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;