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++
Fix build of KisShortcutMatcher on Qt5
Dmitry Kazakovccc73b25414c
diff --git a/libs/ui/input/kis_shortcut_matcher.cpp b/libs/ui/input/kis_shortcut_matcher.cppindex ad14219a43..9da9eddeaf 100644--- a/libs/ui/input/kis_shortcut_matcher.cpp+++ b/libs/ui/input/kis_shortcut_matcher.cpp@@ -74,7 +74,12 @@ QTouchEvent generateFakeTouchEndEvent(const QTouchEvent *event)#endif}+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)+ return QTouchEvent(QEvent::TouchEnd, event->device(), event->modifiers(), Qt::TouchPointReleased, points);+#elsereturn QTouchEvent(QEvent::TouchEnd, event->pointingDevice(), event->modifiers(), points);+#endif+}} // namespace@@ -448,7 +453,9 @@ bool KisShortcutMatcher::touchBeginEvent( QTouchEvent* event )}#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))- KoPointerEvent::copyQtPointerEvent(event, m_d->lastProcessedTouchEvent);+ QScopedPointer<QEvent> tmp;+ KoPointerEvent::copyQtPointerEvent(event, tmp);+ m_d->lastProcessedTouchEvent.reset(static_cast<QTouchEvent*>(tmp.take()));#elsem_d->lastProcessedTouchEvent.reset(event->clone());#endif@@ -555,7 +562,9 @@ bool KisShortcutMatcher::touchUpdateEventImpl(QTouchEvent *event)}#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))- KoPointerEvent::copyQtPointerEvent(event, m_d->lastProcessedTouchEvent);+ QScopedPointer<QEvent> tmp;+ KoPointerEvent::copyQtPointerEvent(event, tmp);+ m_d->lastProcessedTouchEvent.reset(static_cast<QTouchEvent*>(tmp.take()));#elsem_d->lastProcessedTouchEvent.reset(event->clone());#endif