D26046: Allow ManagedConfigModule derived class to register explicitly KCoreConfigSkeleton.

Kevin Ottens noreply at phabricator.kde.org
Mon Jan 20 13:36:38 GMT 2020


ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> managedconfigmodule.cpp:175
> +        if (it->isNull()) {
> +            d->_skeletons.erase(it);
> +        }

Careful there you should use the return value of erase(). It invalidates iterators so it's probably working just by change here (I'd suspect it might crash for instance if it happens to remove the last one in the list).

Even better yet you could spare that loop completely and use remove_if + erase, see:
https://en.wikipedia.org/wiki/Erase-remove_idiom

REPOSITORY
  R296 KDeclarative

REVISION DETAIL
  https://phabricator.kde.org/D26046

To: crossi, #plasma, #frameworks, ervin, bport, davidedmundson, mart
Cc: meven, 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/20200120/87a5f6a5/attachment.html>


More information about the Kde-frameworks-devel mailing list