From da277fa7baec275ce95247f400d680971f9f2942 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 10 Dec 2019 17:42:32 +0630 Subject: [PATCH] [libcalamares] Drop superfluous enum --- src/libcalamares/locale/TimeZone.cpp | 4 ++-- src/libcalamares/locale/TimeZone.h | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libcalamares/locale/TimeZone.cpp b/src/libcalamares/locale/TimeZone.cpp index c03afd833..8144a407b 100644 --- a/src/libcalamares/locale/TimeZone.cpp +++ b/src/libcalamares/locale/TimeZone.cpp @@ -178,7 +178,7 @@ TZRegionModel::rowCount( const QModelIndex& parent ) const QVariant TZRegionModel::data( const QModelIndex& index, int role ) const { - if ( ( role != LabelRole ) && ( role != Qt::UserRole ) ) + if ( ( role != Qt::DisplayRole ) && ( role != Qt::UserRole ) ) { return QVariant(); } @@ -189,7 +189,7 @@ TZRegionModel::data( const QModelIndex& index, int role ) const } const TZRegion* region = m_regions.at( index.row() ); - return role == LabelRole ? region->tr() : region->key(); + return role == Qt::DisplayRole ? region->tr() : region->key(); } const TZRegion* diff --git a/src/libcalamares/locale/TimeZone.h b/src/libcalamares/locale/TimeZone.h index db54292c9..4311997a4 100644 --- a/src/libcalamares/locale/TimeZone.h +++ b/src/libcalamares/locale/TimeZone.h @@ -84,11 +84,6 @@ public: class DLLEXPORT TZRegionModel : public QAbstractListModel { public: - enum - { - LabelRole = Qt::DisplayRole - }; - /// @brief Create empty model (useless) TZRegionModel(); virtual ~TZRegionModel() override;