diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-04-10 13:03:20 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-04-17 09:19:18 +0000 |
commit | c53bcc3b2ec04db86f77e9b3d0d18cef2c6932a0 (patch) | |
tree | fada36cf86b6a2aea78b9ec3aae73d547ac3c893 | |
parent | e56f81b6f34718a99e14a6fe75f88486ed4b6c94 (diff) | |
download | qtwayland-c53bcc3b2ec04db86f77e9b3d0d18cef2c6932a0.tar.gz |
Compositor: Fix compilation problems for qwaylandshell.h
d65783c broke compilation for code that includes qwaylandshell.h, but not
qwaylandshell_p.h, because QWaylandShellPrivate is an incomplete type and we
don't know that it's convertible to QWaylandCompositorExtensionPrivate by just
looking at the public header. And we can't move the QWaylandShellTemplate
constructors to the cpp file because it's a template class.
Change-Id: Ia2d093de74429ace33d08b91743cbc8b7e7befa8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r-- | src/compositor/extensions/qwaylandshell.cpp | 20 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandshell.h | 8 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandshell.cpp b/src/compositor/extensions/qwaylandshell.cpp index 12479186..bb3b4675 100644 --- a/src/compositor/extensions/qwaylandshell.cpp +++ b/src/compositor/extensions/qwaylandshell.cpp @@ -92,4 +92,24 @@ void QWaylandShell::setFocusPolicy(QWaylandShell::FocusPolicy focusPolicy) emit focusPolicyChanged(); } +QWaylandShell::QWaylandShell(QWaylandShellPrivate &dd) + : QWaylandCompositorExtension(dd) +{ +} + +QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd) + : QWaylandCompositorExtension(container, dd) +{ +} + +QWaylandShell::QWaylandShell(QWaylandCompositorExtensionPrivate &dd) + : QWaylandShell(static_cast<QWaylandShellPrivate &>(dd)) +{ +} + +QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd) + : QWaylandShell(container, static_cast<QWaylandShellPrivate &>(dd)) +{ +} + QT_END_NAMESPACE diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandshell.h index 9241b866..6f494be5 100644 --- a/src/compositor/extensions/qwaylandshell.h +++ b/src/compositor/extensions/qwaylandshell.h @@ -68,8 +68,12 @@ Q_SIGNALS: void focusPolicyChanged(); protected: - QWaylandShell(QWaylandCompositorExtensionPrivate &dd) : QWaylandCompositorExtension(dd) {} - QWaylandShell(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd) : QWaylandCompositorExtension(container, dd) {} + explicit QWaylandShell(QWaylandShellPrivate &dd); + explicit QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd); + + //Qt 6: remove + Q_DECL_DEPRECATED QWaylandShell(QWaylandCompositorExtensionPrivate &dd); + Q_DECL_DEPRECATED QWaylandShell(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd); }; template <typename T> |