[Differential] [Updated] D4286: Make it possible to use KContacts without Qt::Gui

Sandro Knauß noreply at phabricator.kde.org
Thu Jan 26 11:46:10 GMT 2017


knauss added a comment.


  You can't avoid the linkage of QtGui inside KContacts, that is correct and I don't have plans to change this. The usage of QImage is only internaly in the library. The only external usage is `KContacts::Picture::data`/ `KContacts::Picture::setData`. Okay we have to move Qt:Gui to PRIVATE library.
  
  The point I'm talking about is about using KContacts in external applications (f.ex. https://phabricator.kde.org/R9:f198198b9b08b331873185f66cd370e63ee46564 for Sink)
  
  I'm doing only things that do not using picture at all:
  
    Sink::ApplicationDomain::Contact contact;
    KContacts::VCardConverter converter;
    const auto addressee = converter.parseVCard(contact.getVcard());
    contact.setUid(addressee.uid());
    contact.setFn(addressee.formattedName());
  
  until I don't really use addresse.picture.data() or addresse.picture.setData() - I don't need a full class defintion of QImage and the forward declaration of QImage is enough for the compiler/linker. I could also create and modify Picture objects without linking QtGui into Sink:
  
    KContacts::Picture picture;
    picture.setData("IMAGEBYTESTRING", "png");
    [...]

REPOSITORY
  R174 PIM: KContacts

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: knauss, #kde_pim, mlaurent
Cc: #kde_pim, dvasin, winterz, andreaska, vkrause, mlaurent, hook, mbohlender, knauss, cmollekopf, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170126/3acf8fdc/attachment.html>


More information about the kde-pim mailing list