broulik added a comment.

  > Is rejecting scheme-less URLs going to break anything?
  
  I think we're doing a quite good job of ensuring we have a `file:` or other 
scheme, so this //should'nt// cause behavior changes.
  
  > Can we be confident QUrl::operator== will abstract over this?
  
  Being confident about `QUrl` stuff is tricky :) but naive testing showed that 
`QUrl` considers a URL with spaces and percent-encoded spaces equal.

INLINE COMMENTS

> startuptasksmodel.cpp:208
>          if (!menuId.isEmpty()) {
> -            return QUrl(QStringLiteral("applications:") + menuId);
> +            return QUrl(QStringLiteral("applications:") + 
> QUrl::toPercentEncoding(menuId));
>          }

`QUrl::toPercentEncoding` encodes *all* UTF-8 characters and slashes and what 
not whereas in `toString` you only tell it to `EncodeSpaces`

> tasktools.cpp:731
>  
> -            
> KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("applications:")
>  + service->storageId()),
> +            
> KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("applications:")
>  + QUrl::toPercentEncoding(service->storageId())),
>                  QStringLiteral("org.kde.libtaskmanager"));

Is KActivities smart enough to relate the two with and without spaces?

REPOSITORY
  R120 Plasma Workspace

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

To: hein, #plasma, broulik
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart

Reply via email to