D20075: AttachmentUpdateJob needs to be exported even without BUILD_TESTING

Jonathan Marten noreply at phabricator.kde.org
Wed Mar 27 10:01:41 GMT 2019


marten created this revision.
marten added a reviewer: KDE PIM.
Herald added a project: KDE PIM.
Herald added a subscriber: kde-pim.
marten requested review of this revision.

REVISION SUMMARY
  Compiling current messagelib source without BUILD_TESTING defined produces the error:
  
  [ 73%] Linking CXX shared library ../../bin/libKF5MessageComposer.so
  CMakeFiles/KF5MessageComposer.dir/attachment/attachmentcontrollerbase.cpp.o: In function `MessageComposer::AttachmentControllerBase::Private::updateJobResult(KJob*)':
  messagelib/messagecomposer/src/attachment/attachmentcontrollerbase.cpp:292: undefined reference to `typeinfo for MessageCore::AttachmentUpdateJob'
  messagelib/messagecomposer/src/attachment/attachmentcontrollerbase.cpp:294: undefined reference to `MessageCore::AttachmentUpdateJob::originalPart() const'
  messagelib/messagecomposer/src/attachment/attachmentcontrollerbase.cpp:295: undefined reference to `MessageCore::AttachmentUpdateJob::updatedPart() const'
  CMakeFiles/KF5MessageComposer.dir/attachment/attachmentcontrollerbase.cpp.o: In function `MessageComposer::AttachmentControllerBase::Private::reloadAttachment()':
  messagelib/messagecomposer/src/attachment/attachmentcontrollerbase.cpp:279: undefined reference to `MessageCore::AttachmentUpdateJob::AttachmentUpdateJob(QSharedPointer<MessageCore::AttachmentPart> const&, QObject*)'
  collect2: error: ld returned 1 exit status
  make[2]: *** [messagecomposer/src/CMakeFiles/KF5MessageComposer.dir/build.make:1252: bin/libKF5MessageComposer.so.5.10.90] Error 1
  make[1]: *** [CMakeFiles/Makefile2:819: messagecomposer/src/CMakeFiles/KF5MessageComposer.dir/all] Error 2
  make: *** [Makefile:130: all] Error 2
  
  This appears to be because AttachmentUpdateJob is only exported with MESSAGECORE_TESTS_EXPORT as a result of commit 7f6c2bdfc <https://phabricator.kde.org/R94:7f6c2bdfca1d82c893d770eef7d7047fbdcf0e8d>, but it is required by messagecomposer.

TEST PLAN
  With this change, messagelib builds correctly with BUILD_TESTING not defined.

REPOSITORY
  R94 PIM: Message Library

REVISION DETAIL
  https://phabricator.kde.org/D20075

AFFECTED FILES
  messagecore/src/attachment/attachmentupdatejob.h

To: marten, #kde_pim
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190327/dc87817d/attachment.html>


More information about the kde-pim mailing list