summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwhatsthis.cpp
diff options
context:
space:
mode:
authorLu YaNing <luyaning@uniontech.com>2022-12-12 14:45:09 +0800
committerLu YaNing <luyaning@uniontech.com>2022-12-13 12:17:06 +0800
commit223cf01cc6700c08c1a0e44a1aaa82f04b1f615b (patch)
tree94f57325931db71be8cbd0d920aca4e27c784666 /src/widgets/kernel/qwhatsthis.cpp
parent04695824f0702f27fe69ad4c89f06bfd7309badc (diff)
Add static_cast for QKeyEvent
Use static_cast to convert a QEvent to a QKeyEvent, replacing (QKeyEvent*)e Change-Id: I52ac3f46aec42600251cf737db2e71c04f2b45c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwhatsthis.cpp')
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 9f8656b3fb..3548d26647 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -428,7 +428,7 @@ bool QWhatsThisPrivate::eventFilter(QObject *o, QEvent *e)
break;
case QEvent::KeyPress:
{
- QKeyEvent* kev = (QKeyEvent*)e;
+ QKeyEvent *kev = static_cast<QKeyEvent *>(e);
#if QT_CONFIG(shortcut)
if (kev->matches(QKeySequence::Cancel)) {
QWhatsThis::leaveWhatsThisMode();