diff options
| author | Alexander Taylor <alex@vector35.com> | 2025-04-02 21:14:20 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-04-02 21:21:53 -0400 |
| commit | 67e5ac0aa51db4fd52da786a6227c8bc649814e5 (patch) | |
| tree | 88971634c3dacc6da14b4b0b58f8bdb068df5e33 /view/sharedcache/ui/dsctriage.h | |
| parent | 1b32a95b3a88567b349e1d3a57dea2fea9f42961 (diff) | |
Add context menu for shared cache view.
Also addresses some lints that I thought were possibly worth it.
Diffstat (limited to 'view/sharedcache/ui/dsctriage.h')
| -rw-r--r-- | view/sharedcache/ui/dsctriage.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/view/sharedcache/ui/dsctriage.h b/view/sharedcache/ui/dsctriage.h index edab8358..ae49bc8e 100644 --- a/view/sharedcache/ui/dsctriage.h +++ b/view/sharedcache/ui/dsctriage.h @@ -23,7 +23,7 @@ class AddressColorDelegate : public QStyledItemDelegate { public: - AddressColorDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {} + explicit AddressColorDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {} void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { @@ -101,7 +101,7 @@ public: bool eventFilter(QObject* obj, QEvent* event) override { if (event->type() == QEvent::KeyPress) { - QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); + auto* keyEvent = dynamic_cast<QKeyEvent*>(event); if (keyEvent->key() == Qt::Key_Escape) { clearSelection(); return true; @@ -161,7 +161,10 @@ public: class LoadedDelegate : public QItemDelegate { Q_OBJECT + public: + explicit LoadedDelegate(QObject* parent = nullptr) : QItemDelegate(parent) {} + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override { @@ -202,7 +205,7 @@ public: { Q_UNUSED(option); Q_UNUSED(index); - return QSize(50, 24); + return {50, 24}; } void setEditorData(QWidget *editor, const QModelIndex &index) const override |
