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
1 changed files with 5 additions and 1 deletions

View File

@ -7,10 +7,14 @@
#include "shell.h"
#include <QByteArray>
#include <qglobal.h>
#include <layershellqt_logging.h>
using namespace LayerShellQt;
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";
}
}