Instead of copying and clearing the file list, just move it
AbandonedPublic

Authored by bruns on Oct 12 2018, 8:31 PM.

Details

Reviewers
poboiko
Group Reviewers
Baloo
Frameworks
Summary

This makes it more explicit the list of files is now owned by the
Indexer runnable.

Test Plan

make

Diff Detail

Repository
R293 Baloo
Branch
indexer_cleanup
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3825
Build 3843: arc lint + arc unit
bruns created this revision.Oct 12 2018, 8:31 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptOct 12 2018, 8:31 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Oct 12 2018, 8:31 PM
bruns abandoned this revision.Oct 16 2018, 4:25 PM

Does not work as wanted, as the compiler squeezes in a QStringList copy construction and the moves the temporary. Afterwards the temporary is empty(), but the filelist is not.

bruns added a comment.Oct 16 2018, 4:26 PM

auto runnable = new NewFileIndexer(m_db, m_config, std::exchange(m_newFiles, {})); would work, but that is C++14