From d13f6bb870cdda71257f665367be8ef9fca86255 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 17 May 2022 11:47:01 +0200 Subject: Apply clang-format. --- src/genericicondelegate.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/genericicondelegate.cpp') 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 #include +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 GenericIconDelegate::getIcons(const QModelIndex &index) const +QList GenericIconDelegate::getIcons(const QModelIndex& index) const { QList 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 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(); } -- cgit v1.3.1