From 34c1bccdb797d72c0f0db75ef87ec25695ac6d01 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 22 Jun 2020 16:51:38 +0100 Subject: [PATCH] Fix build with loadThemeCursor templates WaylandCursorImage::loadThemeCursor(const T &shape) uses templates. These templates are used by input.cpp but the deifnition is in pointer_input.cpp On some setups this creates a compilation problem. This patch introduces an explicit non-templated declaration with the defintion explicitly complied into the same class. In master this has been refactored away anyway, so this is a minimal patch to make things working in the least invasive way. BUG: 423052 --- input.cpp | 2 +- pointer_input.cpp | 6 ++++++ pointer_input.h | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/input.cpp b/input.cpp index a0ba034cea..bac2d1faee 100644 --- a/input.cpp +++ b/input.cpp @@ -1669,7 +1669,7 @@ public: static const auto createDefaultCursor = [] { WaylandCursorImage defaultCursor; WaylandCursorImage::Image ret; - defaultCursor.loadThemeCursor(CursorShape(Qt::CrossCursor), &ret); + defaultCursor.loadThemeCursorShape(CursorShape(Qt::CrossCursor), &ret); return ret; }; static const auto defaultCursor = createDefaultCursor(); diff --git a/pointer_input.cpp b/pointer_input.cpp index 55af1502a9..04ecf2c3fa 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -1270,6 +1270,12 @@ void CursorImage::loadThemeCursor(const QByteArray &shape, WaylandCursorImage::I m_waylandImage.loadThemeCursor(shape, m_cursorsByName, image); } +void WaylandCursorImage::loadThemeCursorShape(CursorShape shape, WaylandCursorImage::Image *image) +{ + loadThemeCursor(shape, image); +} + + template void WaylandCursorImage::loadThemeCursor(const T &shape, Image *image) { diff --git a/pointer_input.h b/pointer_input.h index 1ae6a75053..81751bbc45 100644 --- a/pointer_input.h +++ b/pointer_input.h @@ -186,6 +186,9 @@ public: QImage image; QPoint hotspot; }; + + void loadThemeCursorShape(CursorShape shape, WaylandCursorImage::Image *image); + template void loadThemeCursor(const T &shape, Image *image);