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

Reply via email to