D17315: Avoid potential nullptr access for Document, use reference instead

2018-12-03 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:4fa98ca84fb3: Avoid potential nullptr access for 
Document, use reference instead (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17315?vs=46755=46807

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

AFFECTED FILES
  autotests/integration/querytest.cpp
  autotests/unit/engine/termgeneratortest.cpp
  src/engine/termgenerator.cpp
  src/engine/termgenerator.h
  src/file/basicindexingjob.cpp
  src/file/extractor/result.cpp

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


D17315: Avoid potential nullptr access for Document, use reference instead

2018-12-03 Thread Alexander Stippich
astippich accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R293 Baloo

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

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


D17315: Avoid potential nullptr access for Document, use reference instead

2018-12-02 Thread Stefan Brüns
bruns added a dependent revision: D17324: Move internal helper from 
BasicIndexingJob to anonymous namespace.

REPOSITORY
  R293 Baloo

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

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


D17315: Avoid potential nullptr access for Document, use reference instead

2018-12-02 Thread Stefan Brüns
bruns updated this revision to Diff 46755.
bruns retitled this revision from "Avoid potential nullptr access for Document 
use reference instead" to "Avoid potential nullptr access for Document, use 
reference instead".
bruns added a comment.


  reorder patches

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17315?vs=46721=46755

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

AFFECTED FILES
  autotests/integration/querytest.cpp
  autotests/unit/engine/termgeneratortest.cpp
  src/engine/termgenerator.cpp
  src/engine/termgenerator.h
  src/file/basicindexingjob.cpp
  src/file/extractor/result.cpp

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


D17315: Avoid potential nullptr access for Document use reference instead

2018-12-02 Thread Alexander Stippich
astippich added a comment.


  In D17315#370404 , @bruns wrote:
  
  > In D17315#370298 , @astippich 
wrote:
  >
  > > This one doesn't apply, looks like D17824 is a dependency?
  >
  >
  > D17312 
  
  
  Hmm no, still complains in termgeneratortest about
  
  error: while searching for:
  
QString str = QString::fromLatin1("1 5 10 -3 -12, 5.6, -13.4 -7e3");

Document doc;
TermGenerator termGen();
termGen.indexText(str);

QList words = allWords(doc);

REPOSITORY
  R293 Baloo

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

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


D17315: Avoid potential nullptr access for Document use reference instead

2018-12-02 Thread Stefan Brüns
bruns added a comment.


  In D17315#370298 , @astippich 
wrote:
  
  > This one doesn't apply, looks like D17824 is a dependency?
  
  
  D17312 

REPOSITORY
  R293 Baloo

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

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


D17315: Avoid potential nullptr access for Document use reference instead

2018-12-02 Thread Alexander Stippich
astippich added a comment.


  This one doesn't apply, looks like D17824 is a dependency?

REPOSITORY
  R293 Baloo

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

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


D17315: Avoid potential nullptr access for Document use reference instead

2018-12-02 Thread Stefan Brüns
bruns created this revision.
bruns added reviewers: Baloo, Frameworks, astippich, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  Using a TermGenerator without backing document is pointless and can
  even crash when the document has been initialized with a nullptr.

TEST PLAN
  ctest

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

AFFECTED FILES
  autotests/integration/querytest.cpp
  autotests/unit/engine/termgeneratortest.cpp
  src/engine/termgenerator.cpp
  src/engine/termgenerator.h
  src/file/basicindexingjob.cpp
  src/file/extractor/result.cpp

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