diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-08-08 16:31:54 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-10 02:16:37 +0000 |
commit | debf0fe6334df3ca6c17a3878fcf61f95f92c37b (patch) | |
tree | a4496b2826b2ed33384f88d462d544f823f7aa5f /src/pdf/qpdflinkmodel.cpp | |
parent | cf34c2779879140de29a015abd4b27663c89d4e2 (diff) |
Rename _Count to NRoles
Identifiers shouldn't really begin with underscore even if it works. It
is reserved for compiler/library internals.
Change-Id: I17e1b3ce2dc19af036fcb13a6c90fc1f6f149e17
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit ae81a44c606f52cbb3ef33f32983163888a9e6d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/pdf/qpdflinkmodel.cpp')
-rw-r--r-- | src/pdf/qpdflinkmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pdf/qpdflinkmodel.cpp b/src/pdf/qpdflinkmodel.cpp index dc3c18c8e..66610dbf7 100644 --- a/src/pdf/qpdflinkmodel.cpp +++ b/src/pdf/qpdflinkmodel.cpp @@ -37,7 +37,7 @@ Q_LOGGING_CATEGORY(qLcLink, "qt.pdf.links") \value Page If the link is an internal link, the page number to which the link should jump; otherwise \c {-1}. \value Location If the link is an internal link, the location on the page to which the link should jump. \value Zoom If the link is an internal link, the suggested zoom level on the destination page. - \omitvalue _Count + \omitvalue NRoles */ /*! @@ -47,7 +47,7 @@ QPdfLinkModel::QPdfLinkModel(QObject *parent) : QAbstractListModel(*(new QPdfLinkModelPrivate()), parent) { QMetaEnum rolesMetaEnum = metaObject()->enumerator(metaObject()->indexOfEnumerator("Role")); - for (int r = Qt::UserRole; r < int(Role::_Count); ++r) + for (int r = Qt::UserRole; r < int(Role::NRoles); ++r) m_roleNames.insert(r, QByteArray(rolesMetaEnum.valueToKey(r)).toLower()); } @@ -91,7 +91,7 @@ QVariant QPdfLinkModel::data(const QModelIndex &index, int role) const return link.location(); case Role::Zoom: return link.zoom(); - case Role::_Count: + case Role::NRoles: break; } if (role == Qt::DisplayRole) |