From 5e5c9c07291f6b09623d31c92b1fb61c4ede576e Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Feb 2018 16:54:34 +0100 Subject: Applied clang-format on source --- src/genericicondelegate.cpp | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) (limited to 'src/genericicondelegate.cpp') diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index 1e00f0e9..98917c33 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -3,37 +3,25 @@ #include #include +GenericIconDelegate::GenericIconDelegate(QObject* parent, int role, int logicalIndex, int compactSize) + : IconDelegate(parent), m_Role(role), m_LogicalIndex(logicalIndex), m_CompactSize(compactSize), m_Compact(false) {} -GenericIconDelegate::GenericIconDelegate(QObject *parent, int role, int logicalIndex, int compactSize) - : IconDelegate(parent) - , m_Role(role) - , m_LogicalIndex(logicalIndex) - , m_CompactSize(compactSize) - , m_Compact(false) -{ -} - -void GenericIconDelegate::columnResized(int logicalIndex, int, int newSize) -{ - if (logicalIndex == m_LogicalIndex) { - m_Compact = newSize < m_CompactSize; - } +void GenericIconDelegate::columnResized(int logicalIndex, int, int newSize) { + if (logicalIndex == m_LogicalIndex) { + m_Compact = newSize < m_CompactSize; + } } -QList GenericIconDelegate::getIcons(const QModelIndex &index) const -{ - QList result; - if (index.isValid()) { - for (const QVariant &var : index.data(m_Role).toList()) { - if (!m_Compact || !var.toString().isEmpty()) { - result.append(var.toString()); - } +QList GenericIconDelegate::getIcons(const QModelIndex& index) const { + QList result; + if (index.isValid()) { + for (const QVariant& var : index.data(m_Role).toList()) { + if (!m_Compact || !var.toString().isEmpty()) { + result.append(var.toString()); + } + } } - } - return result; + return result; } -size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const -{ - return index.data(m_Role).toList().count(); -} +size_t GenericIconDelegate::getNumIcons(const QModelIndex& index) const { return index.data(m_Role).toList().count(); } -- cgit v1.3.1