D6070: fix warnings from clazy with the default warning level

2017-06-03 Thread Matthieu Gallien
This revision was automatically updated to reflect the committed changes.
Closed by commit R286:187055408f59: fix warnings from clazy with the default 
warning level (authored by mgallien).

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D6070?vs=15104=15109

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

AFFECTED FILES
  autotests/epubextractortest.cpp
  autotests/exiv2extractortest.cpp
  autotests/popplerextractortest.cpp
  autotests/taglibextractortest.cpp
  src/externalextractor.cpp
  src/externalextractor.h
  src/externalwriter.cpp
  src/externalwriter.h
  src/extractorcollection.cpp
  src/writedata.cpp
  src/writedata.h
  src/writer.h
  src/writer_p.h
  src/writercollection.cpp
  src/writercollection.h
  src/writers/taglibwriter.cpp

To: mgallien, #frameworks, dfaure
Cc: dfaure, apol


D6070: fix warnings from clazy with the default warning level

2017-06-03 Thread David Faure
dfaure accepted this revision.
dfaure added a comment.
This revision is now accepted and ready to land.


  "first declared as a struct and later declared as a class" must indeed be 
fixed. It's only a warning for clang, but AFAIK it leads to a hard error with 
MSVC. So yes, this all looks good to me.

REPOSITORY
  R286 KFileMetaData

BRANCH
  master

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

To: mgallien, #frameworks, dfaure
Cc: dfaure, apol


D6070: fix warnings from clazy with the default warning level

2017-06-03 Thread Matthieu Gallien
mgallien added a comment.


  In https://phabricator.kde.org/D6070#113705, @apol wrote:
  
  > I am not super sure about the struct -> class. Why?
  
  
  I had missed the fact that the warnings where from clang and not clazy.
  The compiler warns that the private class is first declared as a struct and 
later declared as a class ( -Wmismatched-tags is the warning flag from clang). 
I can remove those modifications if they are not desirable.

REPOSITORY
  R286 KFileMetaData

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

To: mgallien, #frameworks
Cc: apol


D6070: fix warnings from clazy with the default warning level

2017-06-03 Thread Matthieu Gallien
mgallien updated this revision to Diff 15104.
mgallien added a comment.


  replaced the at(0) by constFirst

REPOSITORY
  R286 KFileMetaData

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D6070?vs=15100=15104

BRANCH
  master

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

AFFECTED FILES
  autotests/epubextractortest.cpp
  autotests/exiv2extractortest.cpp
  autotests/popplerextractortest.cpp
  autotests/taglibextractortest.cpp
  src/externalextractor.cpp
  src/externalextractor.h
  src/externalwriter.cpp
  src/externalwriter.h
  src/extractorcollection.cpp
  src/writedata.cpp
  src/writedata.h
  src/writer.h
  src/writer_p.h
  src/writercollection.cpp
  src/writercollection.h
  src/writers/taglibwriter.cpp

To: mgallien, #frameworks
Cc: apol


D6070: fix warnings from clazy with the default warning level

2017-06-02 Thread Aleix Pol Gonzalez
apol added a comment.


  I am not super sure about the struct -> class. Why?

INLINE COMMENTS

> taglibextractortest.cpp:118
>  QCOMPARE(resultMpc.types().size(), 1);
> -QCOMPARE(resultMpc.types().first(), Type::Audio);
> +QCOMPARE(resultMpc.types().at(0), Type::Audio);
>  

Probably more elegant to use `constFirst` than `at(0)`.

FWIW note that in this case we're patching so the warning is gone (which is not 
bad per se) but it's not like the software will be much better after this 
change. ^^'

REPOSITORY
  R286 KFileMetaData

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

To: mgallien, #frameworks
Cc: apol


D6070: fix warnings from clazy with the default warning level

2017-06-02 Thread Matthieu Gallien
mgallien created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  fix warnings from clazy with the default warning level

TEST PLAN
  automatic tests still work as expected on Linux

REPOSITORY
  R286 KFileMetaData

BRANCH
  master

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

AFFECTED FILES
  autotests/epubextractortest.cpp
  autotests/exiv2extractortest.cpp
  autotests/popplerextractortest.cpp
  autotests/taglibextractortest.cpp
  src/externalextractor.cpp
  src/externalextractor.h
  src/externalwriter.cpp
  src/externalwriter.h
  src/extractorcollection.cpp
  src/writedata.cpp
  src/writedata.h
  src/writer.h
  src/writer_p.h
  src/writercollection.cpp
  src/writercollection.h
  src/writers/taglibwriter.cpp

To: mgallien, #frameworks