D7169: Fix errorneous whitespace handling in Desktop Entry parsing from KConfigIni

2017-08-08 Thread Michael Pyne
This revision was automatically updated to reflect the committed changes.
Closed by commit R237:11ee92d92b1e: kconfigini: Strip leading whitespace when 
reading entry values. (authored by mpyne).

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D7169?vs=17791&id=17912

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

AFFECTED FILES
  autotests/kdesktopfiletest.cpp
  src/core/kconfigini.cpp

To: mpyne, #frameworks, apol
Cc: cfeck


D7169: Fix errorneous whitespace handling in Desktop Entry parsing from KConfigIni

2017-08-06 Thread Aleix Pol Gonzalez
apol accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R237 KConfig

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

To: mpyne, #frameworks, apol
Cc: cfeck


D7169: Fix errorneous whitespace handling in Desktop Entry parsing from KConfigIni

2017-08-06 Thread Christoph Feck
cfeck added a comment.


  That also trims trailing spaces in value ...

REPOSITORY
  R237 KConfig

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

To: mpyne, #frameworks
Cc: cfeck


D7169: Fix errorneous whitespace handling in Desktop Entry parsing from KConfigIni

2017-08-06 Thread Michael Pyne
mpyne created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  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
Type =Application
Type= Application
Type = Application
  
  KConfigIni already handles this for the key (by calling `.trim` on the value 
that is assigned to `aKey`), but neglects to do so for the value.  This patch 
fixes this so that reading .desktop files through KConfigIni should be 
standards-compliant.

TEST PLAN
  The patch includes a modification to the existing autotests which fail with 
the old code, and pass with the updated code.  A separate test is not added, 
but instead I added spaces to parts of the existing test .desktop files, as 
this is enough to exercise the new code.

REPOSITORY
  R237 KConfig

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

AFFECTED FILES
  autotests/kdesktopfiletest.cpp
  src/core/kconfigini.cpp

To: mpyne, #frameworks