D19445: Handle variant list in formatting functions

2019-04-16 Thread Alexander Stippich
This revision was automatically updated to reflect the committed changes.
Closed by commit R286:ffdee4011145: Handle variant list in formatting functions 
(authored by astippich).

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19445?vs=55926&id=56384

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-14 Thread Stefan Brüns
bruns accepted this revision.
bruns added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> propertyinfotest.cpp:91
>  { Property::BitRate,   true,  1470,
> QStringLiteral("14.7 Mbit/s")},
> +{ Property::BitRate,   true,  bitRateList, 
> QStringLiteral("128 kbit/s and 130 kbit/s")},
>  { Property::ImageOrientation,  true,  5,   
> QStringLiteral("Transposed")},

That one looks strange :-P

REPOSITORY
  R286 KFileMetaData

BRANCH
  generic_display_list

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

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-14 Thread Alexander Stippich
astippich added a dependent revision: D20528: Change properties attributes for 
consistency.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-11 Thread Aleix Pol Gonzalez
apol added a comment.


  Patch looks good to me, @bruns note that you still have it set as "changes 
required".

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-10 Thread Alexander Stippich
astippich marked an inline comment as done.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-10 Thread Alexander Stippich
astippich updated this revision to Diff 55926.
astippich added a comment.


  - remove unrequired parenthesis

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19445?vs=55326&id=55926

BRANCH
  generic_display_list

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-09 Thread Aleix Pol Gonzalez
apol added inline comments.

INLINE COMMENTS

> propertyinfo.cpp:650
> +for (const auto& entry : valueList) {
> +displayList << (d->formatAsString)(entry);
> +}

`displayList << d->formatAsString(entry);`

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: apol, kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, 
michaelh, astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-09 Thread Alexander Stippich
astippich added a comment.


  ping

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-04-02 Thread Alexander Stippich
astippich updated this revision to Diff 55326.
astippich added a comment.


  - rebase on master

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19445?vs=54956&id=55326

BRANCH
  generic_display_list

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-31 Thread Alexander Stippich
astippich added a comment.


  ping. This will be beneficial for handling lists regardless of the discussion 
in D19087 

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-27 Thread Alexander Stippich
astippich updated this revision to Diff 54956.
astippich marked an inline comment as done.
astippich added a comment.


  - implement feedback

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19445?vs=54651&id=54956

BRANCH
  generic_display_list

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-27 Thread Alexander Stippich
astippich removed a dependent revision: D20013: Use Qt function for string list 
formatting.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-24 Thread Alexander Stippich
astippich marked an inline comment as done.
astippich added inline comments.

INLINE COMMENTS

> bruns wrote in propertyinfo.cpp:634
> Don't reinvent Qt functionality:
> https://doc.qt.io/qt-5/qlocale.html#createSeparatedList

see D20013 

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-24 Thread Alexander Stippich
astippich added a dependent revision: D20013: Use Qt function for string list 
formatting.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-24 Thread Alexander Stippich
astippich added a dependency: D20012: Fix number localization for properties.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-24 Thread Alexander Stippich
astippich updated this revision to Diff 54651.
astippich added a comment.


  - code style

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19445?vs=52905&id=54651

BRANCH
  generic_display_list

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-22 Thread Stefan Brüns
bruns requested changes to this revision.
bruns added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> propertyinfo.cpp:634
> +if (d->valueType == QVariant::StringList || d->valueType == 
> QVariant::String ) {
> +return FormatStrings::joinStringListFunction(value);
> +} else {

Don't reinvent Qt functionality:
https://doc.qt.io/qt-5/qlocale.html#createSeparatedList

REPOSITORY
  R286 KFileMetaData

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

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, 
astippich, spoorun, ngraham, bruns, abrahams


D19445: Handle variant list in formatting functions

2019-03-01 Thread Alexander Stippich
astippich created this revision.
astippich added reviewers: ngraham, bruns.
Herald added projects: Frameworks, Baloo.
Herald added subscribers: Baloo, kde-frameworks-devel.
astippich requested review of this revision.

REVISION SUMMARY
  Improve the formatting function of
  KFileMetaData such that it will also handle
  QVariantLists for each property, to make it more 
  robust

TEST PLAN
  tests pass

REPOSITORY
  R286 KFileMetaData

BRANCH
  generic_display_list

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

AFFECTED FILES
  autotests/propertyinfotest.cpp
  src/propertyinfo.cpp

To: astippich, ngraham, bruns
Cc: kde-frameworks-devel, #baloo, domson, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, bruns, abrahams