<table><tr><td style="">anthonyfieroni 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/D27861">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Because KWayland is a KF library,<br />
we are not able to change existing API in ways that may break API or<br />
ABI compatibility. So, if some particular wrapper has been implemented<br />
incorrectly, we can't do that much about it except maybe leaving<br />
comments that look like "// TODO KF6".</p></blockquote>
<p>My 2 cents on this, that's normal implementation dependant situation in library, so about me it has 2 approaches:</p>
<ol class="remarkup-list">
<li class="remarkup-list-item">Always adds new required implementation in new class, then port existing users on it, leave orphaned classes to be removed</li>
<li class="remarkup-list-item">To not break API/ABI it can be added a constructor by dependency injection the new implementation. It's a bit tricky, KTextEditor uses it, but it's not that bad.</li>
</ol>
<p>Returning implementation to the client can be good if it's not expected any other client(s) to use it, if not that's not good.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27861">https://phabricator.kde.org/D27861</a></div></div><br /><div><strong>To: </strong>zzag, KWin<br /><strong>Cc: </strong>anthonyfieroni, univerz, davidedmundson, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>