diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/genericicondelegate.cpp | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/genericicondelegate.cpp')
| -rw-r--r-- | src/genericicondelegate.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index bb039b05..1ee980ab 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -3,18 +3,16 @@ #include <QList> #include <QPixmapCache> +GenericIconDelegate::GenericIconDelegate(QTreeView* parent, int role, int logicalIndex, + int compactSize) + : IconDelegate(parent, logicalIndex, compactSize), m_Role(role) +{} -GenericIconDelegate::GenericIconDelegate(QTreeView* parent, int role, int logicalIndex, int compactSize) - : IconDelegate(parent, logicalIndex, compactSize) - , m_Role(role) -{ -} - -QList<QString> GenericIconDelegate::getIcons(const QModelIndex &index) const +QList<QString> GenericIconDelegate::getIcons(const QModelIndex& index) const { QList<QString> result; if (index.isValid()) { - for (const QVariant &var : index.data(m_Role).toList()) { + for (const QVariant& var : index.data(m_Role).toList()) { if (!compact() || !var.toString().isEmpty()) { result.append(var.toString()); } @@ -23,7 +21,7 @@ QList<QString> GenericIconDelegate::getIcons(const QModelIndex &index) const return result; } -size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const +size_t GenericIconDelegate::getNumIcons(const QModelIndex& index) const { return index.data(m_Role).toList().count(); } |
