D7479: klauncher: fix appId matching for flatpak apps

David Faure noreply at phabricator.kde.org
Wed Aug 23 20:43:22 UTC 2017


dfaure added inline comments.

INLINE COMMENTS

> klauncher.cpp:380
> +    // Match sandboxed apps (e.g. flatpak), see https://phabricator.kde.org/D5775
> +    if (newAppId.endsWith(QStringLiteral(".kdbus"))) {
> +        return newAppId.startsWith(pendingAppId);

QString::endsWith() has a QLatin1String overload, which would be slightly better here.

> klauncher.cpp:381
> +    if (newAppId.endsWith(QStringLiteral(".kdbus"))) {
> +        return newAppId.startsWith(pendingAppId);
> +    }

So if I start kdesudoku and kdesu quickly, when kdesudoku is started, the pending entry for kdesu will think it matches? ;)
It would be technically more correct to do newAppId.left(newAppId.length() - 6) == pendingAppId, I think.

REPOSITORY
  R303 KInit

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

To: elvisangelaccio, dfaure, apol
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170823/c765ba5d/attachment.html>


More information about the Kde-frameworks-devel mailing list