summaryrefslogtreecommitdiffstats
path: root/src/input/frontend/qkeyevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/frontend/qkeyevent.cpp')
-rw-r--r--src/input/frontend/qkeyevent.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input/frontend/qkeyevent.cpp b/src/input/frontend/qkeyevent.cpp
index 07319ea53..6df197321 100644
--- a/src/input/frontend/qkeyevent.cpp
+++ b/src/input/frontend/qkeyevent.cpp
@@ -81,7 +81,11 @@ QKeyEvent::QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers
QKeyEvent::QKeyEvent(const QT_PREPEND_NAMESPACE(QKeyEvent) &ke)
: QObject()
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
, m_event(static_cast<QT_PREPEND_NAMESPACE(QKeyEvent) *>(ke.clone()))
+#else
+ , m_event(new QT_PREPEND_NAMESPACE(QKeyEvent)(ke))
+#endif
{
m_event->setAccepted(false);
}