diff options
author | Lu YaNing <luyaning@uniontech.com> | 2022-12-12 14:45:09 +0800 |
---|---|---|
committer | Lu YaNing <luyaning@uniontech.com> | 2022-12-13 12:17:06 +0800 |
commit | 223cf01cc6700c08c1a0e44a1aaa82f04b1f615b (patch) | |
tree | 94f57325931db71be8cbd0d920aca4e27c784666 /src/widgets/kernel/qwhatsthis.cpp | |
parent | 04695824f0702f27fe69ad4c89f06bfd7309badc (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.cpp | 2 |
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(); |