D24490: Make kconfig_compiler generate ctors with the optional parent arg
Kevin Ottens
noreply at phabricator.kde.org
Tue Oct 8 13:38:57 BST 2019
ervin added inline comments.
INLINE COMMENTS
> apol wrote in test_notifiers.cpp.ref:7
> Maybe it would be better to use the parent argument in KConfigSkeleton?
> explicit KConfigSkeleton(const QString &configname = QString(), QObject *parent = nullptr);
It's what I attempted first, the problem was that it will create compatibility issues with existing code. From the generator perspective KConfigSkeleton might not be the base class and since we never enforced the parent chaining constructor before they might not have it. The tests using MyPrefs as base class exhibit that exact problem.
That's why I ended up falling back on setParent... it doesn't have my preference but at least now we won't force the use of setParent in user code (even though we use it internally).
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D24490
To: ervin, #plasma, #frameworks, dfaure, mart
Cc: apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191008/3ccf9776/attachment.html>
More information about the Kde-frameworks-devel
mailing list