Warn when qputenv returns false as the whole component won't work

This commit is contained in:
Aleix Pol 2021-04-06 13:54:52 +02:00
parent efa32dfbe3
commit 6c75bae88b

View file

@ -7,10 +7,14 @@
#include "shell.h" #include "shell.h"
#include <QByteArray> #include <QByteArray>
#include <qglobal.h> #include <qglobal.h>
#include <layershellqt_logging.h>
using namespace LayerShellQt; using namespace LayerShellQt;
void Shell::useLayerShell() void Shell::useLayerShell()
{ {
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "layer-shell"); const bool ret = qputenv("QT_WAYLAND_SHELL_INTEGRATION", "layer-shell");
if (!ret) {
qCDebug(LAYERSHELLQT) << "Unable to set QT_WAYLAND_SHELL_INTEGRATION=layer-shell";
}
} }