D26900: Support multiple values in XDG_CURRENT_DESKTOP

Aleix Pol Gonzalez noreply at phabricator.kde.org
Fri Jan 24 22:46:29 GMT 2020


apol added inline comments.

INLINE COMMENTS

> kservice.cpp:658
>  
> -    QStringList currentDesktops(QString::fromLatin1(qgetenv("XDG_CURRENT_DESKTOP")));
> +    QStringList currentDesktops(QString::fromLatin1(qgetenv("XDG_CURRENT_DESKTOP")).split(QLatin1Char(':'), Qt::SkipEmptyParts));
>      if (currentDesktops.isEmpty()) {

You can use QVector<QStringRef> here, it would save us constructing a bunch of strings for no reason. Maybe not in the general case of everyone having just the one desktop though.

REPOSITORY
  R309 KService

REVISION DETAIL
  https://phabricator.kde.org/D26900

To: dfaure, apol, aacid
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200124/61eedaab/attachment.html>


More information about the Kde-frameworks-devel mailing list