<table><tr><td style="">knauss added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4286" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>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 <tt style="background: #ebebeb; font-size: 13px;">KContacts::Picture::data</tt>/ <tt style="background: #ebebeb; font-size: 13px;">KContacts::Picture::setData</tt>. Okay we have to move Qt:Gui to PRIVATE library.</p>

<p>The point I'm talking about is about using KContacts in external applications (f.ex. <a href="https://phabricator.kde.org/R9:f198198b9b08b331873185f66cd370e63ee46564" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">R9:f198198b9b08b331873185f66cd370e63ee46564</a> for Sink)</p>

<p>I'm doing only things that do not using picture at all:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">Sink::ApplicationDomain::Contact contact;
KContacts::VCardConverter converter;
const auto addressee = converter.parseVCard(contact.getVcard());
contact.setUid(addressee.uid());
contact.setFn(addressee.formattedName());</pre></div>

<p>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:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">KContacts::Picture picture;
picture.setData("IMAGEBYTESTRING", "png");
[...]</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R174 PIM: KContacts</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4286" rel="noreferrer">https://phabricator.kde.org/D4286</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>knauss, KDE PIM, mlaurent<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, andreaska, vkrause, mlaurent, hook, mbohlender, knauss, cmollekopf, dvratil<br /></div>