diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:36:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 17:36:03 +0200 |
| commit | ef94aee28464039672b277243a0181ae93550d6c (patch) | |
| tree | 0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/genericicondelegate.cpp | |
| parent | 7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff) | |
| parent | 3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff) | |
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/genericicondelegate.cpp')
| -rw-r--r-- | src/genericicondelegate.cpp | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index 7afaca3f..1ee980ab 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -1,29 +1,27 @@ -#include "genericicondelegate.h"
-#include "pluginlist.h"
-#include <QList>
-#include <QPixmapCache>
-
-
-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> result;
- if (index.isValid()) {
- for (const QVariant &var : index.data(m_Role).toList()) {
- if (!compact() || !var.toString().isEmpty()) {
- result.append(var.toString());
- }
- }
- }
- return result;
-}
-
-size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const
-{
- return index.data(m_Role).toList().count();
-}
+#include "genericicondelegate.h" +#include "pluginlist.h" +#include <QList> +#include <QPixmapCache> + +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> result; + if (index.isValid()) { + for (const QVariant& var : index.data(m_Role).toList()) { + if (!compact() || !var.toString().isEmpty()) { + result.append(var.toString()); + } + } + } + return result; +} + +size_t GenericIconDelegate::getNumIcons(const QModelIndex& index) const +{ + return index.data(m_Role).toList().count(); +} |
