As discussed in T10521, it is useful to refactor out the generic query building logic in FileSearchQuery and create the base class SearchQuery. This would allow us to create other domain specific queries without having to reimplement all the building logic, as will be the case with TeamdriveSearchQuery.
Details
Details
- Reviewers
dvratil - Maniphest Tasks
- T10521: [Drive] Implement Team Drives portion of the API
- Commits
- R477:4f226717ee1f: Refactor FileSearchQuery and create base class SearchQuery
All tests defined in FileSearchQueryTest should remain valid and, as of this patch, passing.
Diff Detail
Diff Detail
- Repository
- R477 KGAPI Library
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Again, C++11 allows us to force the compiler to generate code for us, so let's make use of that.
src/drive/filesearchquery.cpp | ||
---|---|---|
125 | If you just chain up to the parent implementation here, there's no need to have FileSearchQuery::addQuery() at all. | |
src/drive/searchquery.cpp | ||
34 | = default | |
35 | = default | |
36 | = default | |
114 | = default | |
119 | = default | |
123 | = default |
Comment Actions
Use C++11 default constructors and QScopedPointer. I should have fixed all the points, let me know if I missed something.