summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2018-11-07 11:23:44 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-11-07 12:59:23 +0000
commit88eb34213b35bfac292397e784ac20341f216ab4 (patch)
tree50d0e23398fe64cce21b154d87f2e8cb3a2e9f34
parent62137386928f14228db2d10033d9b80875113e33 (diff)
Only print deprecation warning when using deprecated shells
Avoids printing deprecation warnings for shells that are available by default but not actually used. In particular, avoids warning about wl-shell when using ivi-shell. Change-Id: Id075e97572e6ec876ad24f369808c61a479e9b07 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp8
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
index 008da3d8a..1edb24b3c 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
@@ -49,10 +49,6 @@ namespace QtWaylandClient {
bool QWaylandWlShellIntegration::initialize(QWaylandDisplay *display)
{
- qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using"
- << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
- << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
-
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("wl_shell")) {
m_wlShell = new QtWayland::wl_shell(display->wl_registry(), global.id, 1);
@@ -65,6 +61,10 @@ bool QWaylandWlShellIntegration::initialize(QWaylandDisplay *display)
return false;
}
+ qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using"
+ << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
+ << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
+
return QWaylandShellIntegration::initialize(display);
}
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp
index d032002b1..12cc95b15 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp
@@ -51,10 +51,6 @@ namespace QtWaylandClient {
bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display)
{
- qCWarning(lcQpaWayland) << "\"xdg-shell-v5\" is a deprecated shell extension, prefer using"
- << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
- << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
-
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("xdg_shell")) {
m_xdgShell.reset(new QWaylandXdgShellV5(display->wl_registry(), global.id));
@@ -67,6 +63,10 @@ bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display)
return false;
}
+ qCWarning(lcQpaWayland) << "\"xdg-shell-v5\" is a deprecated shell extension, prefer using"
+ << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
+ << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
+
return QWaylandShellIntegration::initialize(display);
}