D24494: Add convenience for defaults/dirty states to KCoreConfigSkeleton
Kevin Ottens
noreply at phabricator.kde.org
Tue Oct 8 21:54:48 BST 2019
ervin added inline comments.
INLINE COMMENTS
> davidedmundson wrote in kcoreconfigskeleton.cpp:140
> Do we need to make this
>
> if (d->mIsDefaultImpl){
> return d->mIsDefaultImpl();
> }
> return false;
>
> and initialize mIsDefaultImpl to nullptr
>
> so that it doesn't crash if someone subclasses KConfigSkeletonItem directly and doesn't implement this?
Initializing to nullptr wouldn't help, you would get the same behavior than with the default constructor.
It means it doesn't crash but raises a std::bad_function_call exception, which I think is fine... it's the next best thing to a pure virtual, but it's caught at runtime. I don't think we can do better than this in the current situation.
> davidedmundson wrote in kcoreconfigskeleton.h:218
> Is this an ABI break?
>
> :/
*gasp* you're right, how stupid of me... we can't merge that...
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D24494
To: ervin, #plasma, #frameworks, dfaure, mart
Cc: kossebau, davidedmundson, 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/55ba3677/attachment.html>
More information about the Kde-frameworks-devel
mailing list