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
This commit is contained in:
David Edmundson 2020-06-22 16:51:38 +01:00
parent a8979aa4e4
commit 34c1bccdb7
3 changed files with 10 additions and 1 deletions

View file

@ -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();

View file

@ -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 <typename T>
void WaylandCursorImage::loadThemeCursor(const T &shape, Image *image)
{

View file

@ -186,6 +186,9 @@ public:
QImage image;
QPoint hotspot;
};
void loadThemeCursorShape(CursorShape shape, WaylandCursorImage::Image *image);
template <typename T>
void loadThemeCursor(const T &shape, Image *image);