[WIP] Use DocumentId class
Changes PlannedPublic

Authored by michaelh on Feb 25 2018, 11:16 AM.

Details

Reviewers
adridg
Group Reviewers
Baloo
Frameworks
Summary
Test Plan

library compiles
test compile produces linker error

Diff Detail

Repository
R293 Baloo
Branch
use-class (branched from flexible-docid)
Lint
No Linters Available
Unit
No Unit Test Coverage
michaelh created this revision.Feb 25 2018, 11:16 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 25 2018, 11:16 AM
michaelh requested review of this revision.Feb 25 2018, 11:16 AM
michaelh edited the summary of this revision. (Show Details)
alexeymin added a subscriber: alexeymin.EditedFeb 25 2018, 11:43 AM

To solve this warning you need to fix DocumentId class, add operator<<() for QDebug.

In D10826 add:
QDebug operator<<(QDebug stream, const Baloo::DocumentId &docId); outside of baloo namespace, don't forget to #include <QDebug> in header

Implement this operator in .cpp file (or inline), eg. stream << docId.inode() << docId.deviceId(); return stream or whatever, as it is done in src/engine/document.h line 103

@alexeymin: Could you use inline comments, please. That would help me a lot. And: thank you for your comments. It is really nice to have someone commenting without me poking first. ;-)

michaelh updated this revision to Diff 28013.Feb 25 2018, 12:17 PM
  • idutils: Use DocumentId constructor
  • DocumentId: Add 'QDebug operator<<'

That's great. Any clues to solve this?

[ 35%] Building CXX object src/file/extractor/autotests/CMakeFiles/extractorIOTest.dir/__/iohandler.cpp.o
[ 35%] Linking CXX executable ../../../../bin/extractorIOTest
CMakeFiles/extractorIOTest.dir/__/iohandler.cpp.o: In function `Baloo::IOHandler::nextId()':
/home/super/devel/kde/src/frameworks/baloo-flex/src/file/extractor/iohandler.cpp:46: undefined reference to `Baloo::DocumentId::DocumentId(unsigned long long)'
/home/super/devel/kde/src/frameworks/baloo-flex/src/file/extractor/iohandler.cpp:49: undefined reference to `Baloo::DocumentId::operator unsigned long long() const'
collect2: error: ld returned 1 exit status

I know cmake only a very little bit and baloo seems very complicated an that respect.

That's great. Any clues to solve this?

[ 35%] Building CXX object src/file/extractor/autotests/CMakeFiles/extractorIOTest.dir/__/iohandler.cpp.o
[ 35%] Linking CXX executable ../../../../bin/extractorIOTest
CMakeFiles/extractorIOTest.dir/__/iohandler.cpp.o: In function `Baloo::IOHandler::nextId()':
/home/super/devel/kde/src/frameworks/baloo-flex/src/file/extractor/iohandler.cpp:46: undefined reference to `Baloo::DocumentId::DocumentId(unsigned long long)'
/home/super/devel/kde/src/frameworks/baloo-flex/src/file/extractor/iohandler.cpp:49: undefined reference to `Baloo::DocumentId::operator unsigned long long() const'
collect2: error: ld returned 1 exit status

I know cmake only a very little bit and baloo seems very complicated an that respect.

Error compiling tests. Probably you need to add sources (.cpp - files) containing mentioned references to test target in CMakeLists.txt too

michaelh planned changes to this revision.Feb 26 2018, 4:38 PM
michaelh retitled this revision from Use DocumentId class to [WIP] Use DocumentId class.Feb 28 2018, 9:58 AM
adridg added a comment.Jun 1 2020, 9:07 PM

This looks abandoned or stalled. @michaelh do you have any plans on this front?

Restricted Application added a subscriber: kde-frameworks-devel. · View Herald TranscriptJun 1 2020, 9:07 PM