Bug 347399

Summary: Qt 5.5: mergedialog.cpp.o: In function `QtPrivate::MetaObjectForType<KPeople::Match, void>::value()': undefined reference to `KPeople::Match::staticMetaObject'
Product: [Frameworks and Libraries] frameworks-kpeople Reporter: Jan Kundrát <jkt>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, aleixpol, aspotashev
Priority: NOR    
Version: 5.10.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: full build log

Description Jan Kundrát 2015-05-08 00:12:43 UTC
Created attachment 92488 [details]
full build log

With kpeople.git v0.3.0-100-ge8caa0a, GCC 4.8.3 on Gentoo, Qt 5.5. AFAIK this is different from bug 344822, and adding <QObject> to the match_p.h doesn't help.

CMakeFiles/KF5PeopleWidgets.dir/mergedialog.cpp.o: In function `QtPrivate::MetaObjectForType<KPeople::Match, void>::value()':
mergedialog.cpp:(.text._ZN9QtPrivate17MetaObjectForTypeIN7KPeople5MatchEvE5valueEv[_ZN9QtPrivate17MetaObjectForTypeIN7KPeople5MatchEvE5valueEv]+0x2b): undefined reference to `KPeople::Match::staticMetaObject'
Comment 1 Aleix Pol 2015-05-08 11:25:04 UTC
Hi Jan,
I can't reproduce your error also with Qt 5.5.
Comment 2 Albert Astals Cid 2015-05-09 10:57:22 UTC
I think i had something similar in unity8 and fixed it by adding some header files to be moc'ed  https://code.launchpad.net/~aacid/unity8/qt55/+merge/254418 was what i needed to do, in case it inspires you to a fix
Comment 3 Jan Kundrát 2015-05-09 11:07:54 UTC
Alex, what version of cmake do you have? I'm using 2.8.12.2, maybe the automoc logic differs between mine and yours?
Comment 4 Jan Kundrát 2015-05-09 11:27:08 UTC
Right, so it's due to cmake, https://git.reviewboard.kde.org/r/123700/