mpyne created this revision.
Restricted Application added a project: Frameworks.
As reported in bug 310674, the Desktop Entry spec says that whitespace
surrounding the = sign that separates the key and value in .desktop files
should be ignored when interpreting the key and value portions.
That is, all four of these lines should be equivalent:
Type = Application
DesktopFileParser handles this for most key/value entries already (e.g. at
src/lib/plugin/desktopfileparser.cpp:266), but there is a specific function to
handle reading `Type=` entries from desktop files which doesn't handle spaces
(and even has a TODO asking whether it should).
This patch implements the spec here by using `QRegularExpression` to match
the part of the string after `=\s*`.
Existing autotests have been modified to include spaces around some of the
`Type=` entries, and the updated autotests now pass.
To: mpyne, #frameworks, arichardson