Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Qt6: use QEvent::clone instead of copyQtEvent
Halla Remptad9d2a903477
diff --git a/libs/ui/input/kis_input_manager.cpp b/libs/ui/input/kis_input_manager.cppindex 81fccaa4cd..4e8333fb0a 100644--- a/libs/ui/input/kis_input_manager.cpp+++ b/libs/ui/input/kis_input_manager.cpp@@ -244,8 +244,11 @@ bool KisInputManager::compressMoveEventCommon(Event *event)event->type() == QEvent::TouchUpdate) &&(!d->matcher.supportsHiResInputEvents() ||d->testingCompressBrushEvents)) {-+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))KoPointerEvent::copyQtPointerEvent(event, d->compressedMoveEvent);+#else+ d->compressedMoveEvent.reset(event->clone());+#endifd->moveEventCompressor.start();/**@@ -693,7 +696,11 @@ bool KisInputManager::eventFilterImpl(QEvent * event)KisAbstractInputAction::setInputManager(this);d->previousPos = touchEvent->touchPoints().at(0).pos();// we don't want to lose this event+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))KoPointerEvent::copyQtPointerEvent(touchEvent, d->originatingTouchBeginEvent);+#else+ d->originatingTouchBeginEvent.reset(touchEvent->clone());+#endifretval = d->matcher.touchBeginEvent(touchEvent);KIS_SAFE_ASSERT_RECOVER(!d->touchStrokeStarted) {d->touchStrokeStarted = false;