diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-04-07 15:21:56 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-04-07 15:21:56 +0300 |
commit | e89a6f03c4d24f18db36a906a7320035388504ba (patch) | |
tree | 47f7edb9faa26f6f4e2d3f2eea12133933d86e45 /src/widgets/itemviews/qabstractitemdelegate.cpp | |
parent | c8989ca20fa5798f7853f07df6e150cc407c64a4 (diff) | |
parent | 69b8ab23c93785dc69ae43ea04d5620656a4af44 (diff) | |
download | qtbase-e89a6f03c4d24f18db36a906a7320035388504ba.tar.gz |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into tqtc/lts-5.15-opensource
Change-Id: I3d223d54a832c8365fec4b399550da79f4c1abbb
Diffstat (limited to 'src/widgets/itemviews/qabstractitemdelegate.cpp')
-rw-r--r-- | src/widgets/itemviews/qabstractitemdelegate.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp index c5b22b5667..e120817edc 100644 --- a/src/widgets/itemviews/qabstractitemdelegate.cpp +++ b/src/widgets/itemviews/qabstractitemdelegate.cpp @@ -389,10 +389,12 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event, { if (!event || !view) return false; - Q_D(QAbstractItemDelegate); + Q_UNUSED(index); + Q_UNUSED(option); switch (event->type()) { #ifndef QT_NO_TOOLTIP case QEvent::ToolTip: { + Q_D(QAbstractItemDelegate); QHelpEvent *he = static_cast<QHelpEvent*>(event); const int precision = inherits("QItemDelegate") ? 10 : 6; // keep in sync with DBL_DIG in qitemdelegate.cpp const QString tooltip = index.isValid() ? @@ -413,6 +415,7 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event, event->setAccepted(index.data(Qt::WhatsThisRole).isValid()); break; case QEvent::WhatsThis: { + Q_D(QAbstractItemDelegate); QHelpEvent *he = static_cast<QHelpEvent*>(event); const int precision = inherits("QItemDelegate") ? 10 : 6; // keep in sync with DBL_DIG in qitemdelegate.cpp const QString whatsthis = index.isValid() ? @@ -423,6 +426,7 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event, break; } #endif + case QEvent::None: default: break; } |