D23918: RFC: Drop Outputs class
Vlad Zahorodnii
noreply at phabricator.kde.org
Fri Sep 13 16:22:55 BST 2019
zzag added a comment.
I haven't received any strong arguments why we need a subclass of QVector<AbstractOutput *>. Outputs overloads constructor to implement some sort of covariance. However, that doesn't qualify as a good argument because the right solution would be to add a helper function that could perform these conversions.
In many cases, inheriting from a vector type is a no-no. You should do that only if there's no any other way around.
---
> This change makes everything too explicit. Boo!
I personally don't consider it to be a problem. That's C++ after all.
Templates are invariant and making conversions between Collection<Base> and Collection<Derived> explicit is a good thing because this way we have less magic in the code.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D23918
To: zzag, #kwin
Cc: romangg, davidedmundson, alexeymin, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190913/05496a5a/attachment-0001.html>
More information about the kwin
mailing list