D12578: fix some issues reported by clazy

2018-05-17 Thread Matthieu Gallien
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:f887468b172a: fix some issues reported by clazy (authored 
by mgallien).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D12578?vs=34389=34390

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

AFFECTED FILES
  autotests/unit/file/pendingfilequeuetest.cpp
  src/engine/transaction.cpp
  src/file/fileindexerconfig.cpp
  src/file/fileindexscheduler.cpp
  src/file/firstrunindexer.cpp
  src/file/indexcleaner.cpp
  src/file/modifiedfileindexer.cpp
  src/file/newfileindexer.cpp
  src/file/xattrindexer.cpp
  src/kioslaves/kded/baloosearchmodule.cpp
  src/lib/query.cpp
  src/lib/searchstore.cpp
  src/lib/taglistjob.cpp
  src/lib/term.cpp

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


D12578: fix some issues reported by clazy

2018-05-17 Thread Stefan Brüns
bruns accepted this revision.
bruns added a comment.
This revision is now accepted and ready to land.


  No, worries, just wanted to make shure this does not stall 1 meter to the 
finish line ...

REPOSITORY
  R293 Baloo

BRANCH
  arcpatch-D12578

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

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


D12578: fix some issues reported by clazy

2018-05-17 Thread Matthieu Gallien
mgallien marked an inline comment as done.
mgallien added a comment.


  @bruns Thanks for the review and sorry for my slowness.

REPOSITORY
  R293 Baloo

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

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


D12578: fix some issues reported by clazy

2018-05-17 Thread Matthieu Gallien
mgallien updated this revision to Diff 34389.
mgallien added a comment.


  - fix one more issue

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D12578?vs=34223=34389

BRANCH
  arcpatch-D12578

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

AFFECTED FILES
  autotests/unit/file/pendingfilequeuetest.cpp
  src/engine/transaction.cpp
  src/file/fileindexerconfig.cpp
  src/file/fileindexscheduler.cpp
  src/file/firstrunindexer.cpp
  src/file/indexcleaner.cpp
  src/file/modifiedfileindexer.cpp
  src/file/newfileindexer.cpp
  src/file/xattrindexer.cpp
  src/kioslaves/kded/baloosearchmodule.cpp
  src/lib/query.cpp
  src/lib/searchstore.cpp
  src/lib/taglistjob.cpp
  src/lib/term.cpp

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


D12578: fix some issues reported by clazy

2018-05-17 Thread Stefan Brüns
bruns requested changes to this revision.
bruns added a comment.
This revision now requires changes to proceed.


  One change pending, then you are good to go ...

REPOSITORY
  R293 Baloo

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

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


D12578: fix some issues reported by clazy

2018-05-15 Thread Stefan Brüns
bruns added inline comments.

INLINE COMMENTS

> searchstore.cpp:163
>  if (term.operation() == Term::And || term.operation() == Term::Or) {
>  QList subTerms = term.subTerms();
>  QVector vec;

`const QList subterms = ...`

REPOSITORY
  R293 Baloo

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

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


D12578: fix some issues reported by clazy

2018-05-15 Thread Matthieu Gallien
mgallien updated this revision to Diff 34223.
mgallien added a comment.


  fix some issues

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D12578?vs=33247=34223

BRANCH
  arcpatch-D12578

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

AFFECTED FILES
  autotests/unit/file/pendingfilequeuetest.cpp
  src/engine/transaction.cpp
  src/file/fileindexerconfig.cpp
  src/file/fileindexscheduler.cpp
  src/file/firstrunindexer.cpp
  src/file/indexcleaner.cpp
  src/file/modifiedfileindexer.cpp
  src/file/newfileindexer.cpp
  src/file/xattrindexer.cpp
  src/kioslaves/kded/baloosearchmodule.cpp
  src/lib/query.cpp
  src/lib/searchstore.cpp
  src/lib/taglistjob.cpp
  src/lib/term.cpp

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


D12578: fix some issues reported by clazy

2018-05-15 Thread Matthieu Gallien
mgallien added a comment.


  In D12578#262831 , @bruns wrote:
  
  > @mgallien - I think this is trivial to fix up - can you do, so we have one 
less request open?
  
  
  I will do but as I had started working on that as a low priority task, I have 
not yet been able to correctly fix the issues.

REPOSITORY
  R293 Baloo

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

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


D12578: fix some issues reported by clazy

2018-05-15 Thread Stefan Brüns
bruns added a comment.
Restricted Application added a subscriber: kde-frameworks-devel.


  @mgallien - I think this is trivial to fix up - can you do, so we have one 
less request open?

REPOSITORY
  R293 Baloo

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

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


D12578: fix some issues reported by clazy

2018-05-03 Thread Stefan Brüns
bruns requested changes to this revision.
This revision now requires changes to proceed.

REPOSITORY
  R293 Baloo

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

To: mgallien, #baloo, #frameworks, bruns
Cc: bruns, ashaposhnikov, michaelh, astippich, spoorun


D12578: fix some issues reported by clazy

2018-04-28 Thread Stefan Brüns
bruns added inline comments.

INLINE COMMENTS

> CMakeLists.txt:4
>  set(REQUIRED_QT_VERSION 5.8.0)
> -set(KF5_VERSION "5.45.0") # handled by release scripts
> -set(KF5_DEP_VERSION "5.45.0") # handled by release scripts
> +set(KF5_VERSION "5.44.0") # handled by release scripts
> +set(KF5_DEP_VERSION "5.44.0") # handled by release scripts

I don't think this belongs in here

> transaction.cpp:326
>  
> -for (const EngineQuery& q : query.subQueries()) {
> +const auto subQueries = query.subQueries();
> +for (const EngineQuery& q : subQueries) {

Move this one up, before the `query.op() == EngineQuery::Phrase)`

> transaction.cpp:508
>  out << "\tFileNameTermsDB: ";
> -for (const QByteArray& term : terms) {
> +for (const QByteArray& term : fileNameTerms) {
>  out << term << " ";

This is a functional change and should not be hidden between "cosmetical" 
changes

> searchstore.cpp:167
>  
> -for (const Term& t : term.subTerms()) {
> +for (const Term& t : subTerms) {
>  vec << constructQuery(tr, t);

No const here?

REPOSITORY
  R293 Baloo

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

To: mgallien, #baloo, #frameworks
Cc: bruns, ashaposhnikov, michaelh, astippich, spoorun


D12578: fix some issues reported by clazy

2018-04-28 Thread Matthieu Gallien
mgallien created this revision.
mgallien added reviewers: Baloo, Frameworks.
Restricted Application added projects: Frameworks, Baloo.
mgallien requested review of this revision.

REVISION SUMMARY
  fix some issues reported by clazy

TEST PLAN
  tests are OK

REPOSITORY
  R293 Baloo

BRANCH
  master

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

AFFECTED FILES
  CMakeLists.txt
  autotests/unit/file/pendingfilequeuetest.cpp
  src/engine/transaction.cpp
  src/file/fileindexerconfig.cpp
  src/file/fileindexscheduler.cpp
  src/file/firstrunindexer.cpp
  src/file/indexcleaner.cpp
  src/file/modifiedfileindexer.cpp
  src/file/newfileindexer.cpp
  src/file/xattrindexer.cpp
  src/kioslaves/kded/baloosearchmodule.cpp
  src/lib/query.cpp
  src/lib/searchstore.cpp
  src/lib/taglistjob.cpp
  src/lib/term.cpp

To: mgallien, #baloo, #frameworks
Cc: ashaposhnikov, michaelh, astippich, spoorun, bruns