Avoid bogus "Malformed entry" warnings if X-SDDM-Env not present or empty

Just skip empty parts.
This commit is contained in:
Fabian Vogt 2023-02-02 14:51:46 +01:00
parent 3ee57e9983
commit 9896dea103

View File

@ -202,7 +202,7 @@ namespace SDDM {
{
QProcessEnvironment env;
const QVector<QStringRef> entryList = list.splitRef(QLatin1Char(','));
const QVector<QStringRef> entryList = list.splitRef(QLatin1Char(','), Qt::SkipEmptyParts);
for (const auto &entry: entryList) {
int midPoint = entry.indexOf(QLatin1Char('='));
if (midPoint < 0) {