D5639: Internal cache for provider data on initialisation
David Faure
noreply at phabricator.kde.org
Sat May 6 09:31:24 UTC 2017
dfaure added inline comments.
INLINE COMMENTS
> engine.cpp:196
> + XmlLoader *loader = EngineProviderLoaders()->localData().value(m_providerFileUrl);
> + if(loader) {
> + qCDebug(KNEWSTUFFCORE) << "Duplicate xml loader for this url, so use that" << m_providerFileUrl;
space after if
> engine.cpp:201
> + }
> + else {
> + loader = new XmlLoader(this);
join with previous line
(Qt5/KF5 coding style)
> engine.cpp:206
> + connect(loader, &XmlLoader::signalFailed, this, [this](){ EngineProviderLoaders()->localData().remove(m_providerFileUrl); });
> + connect(loader, &XmlLoader::signalLoaded, this, &Engine::slotProviderFileLoaded);
> + connect(loader, &XmlLoader::signalFailed, this, &Engine::slotProvidersFailed);
This connect (and the following) could be done outside of the if/else, so avoid being repeated, no?
Or is there a risk that load() will emit those signals immediately?
REPOSITORY
R304 KNewStuff
REVISION DETAIL
https://phabricator.kde.org/D5639
To: leinir, whiting, apol
Cc: dfaure, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170506/4f5b8847/attachment.html>
More information about the Kde-frameworks-devel
mailing list