Don't compile in the nicknamewidget since it isn't used and doesn't have the proper linkage.
On Windows we see:
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\W7L2QYDORH/moc_nicknamewidget.cpp(
58): warning C4273: 'ContactEditor::NicknameWidget::qt_static_metacall': inconsistent dll linkage
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\w7l2qydorh\../../../../../../../..
/akonadi-contacts-18.12.2/src/contact-editor/editor/generalinfoeditor/nicknamewidget.h(35): note: see previous definition of 'qt_static_metacall'
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\W7L2QYDORH/moc_nicknamewidget.cpp(
65): warning C4273: 'staticMetaObject': inconsistent dll linkage
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\w7l2qydorh\../../../../../../../..
/akonadi-contacts-18.12.2/src/contact-editor/editor/generalinfoeditor/nicknamewidget.h(35): note: see previous definition of 'public: static QMetaObject co
nst ContactEditor::NicknameWidget::staticMetaObject'
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\W7L2QYDORH/moc_nicknamewidget.cpp(
65): error C2491: 'ContactEditor::NicknameWidget::staticMetaObject': definition of dllimport static data member not allowed
c:\kf5\_\33199f3e\relwithdebinfo-18.12.2\src\contact-editor\editor\generalinfoeditor\tests\generalinfoeditortest_autogen\W7L2QYDORH/moc_nicknamewidget.cpp(
76): warning C4273: 'ContactEditor::NicknameWidget::metaObject': inconsistent dll linkage