D25284: Make QmlComponentsPool one instance per engine

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Nov 13 14:32:25 GMT 2019


broulik added inline comments.

INLINE COMMENTS

> columnview.cpp:51
> +    Q_ASSERT(engine);
> +    if(privateQmlComponentsPoolSelf->m_instances.contains(engine)) {
> +        return privateQmlComponentsPoolSelf->m_instances[engine];

Avoid double lookup:

  auto *componentPool = privateQmlComponentsPoolSelf->m_instances.value(engine);
  if (componentPool) {
      return componentPool;
  }
  
  componentPool = new QQmlComponentsPool(engine);
  ...
  return componentPool;

REPOSITORY
  R169 Kirigami

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

To: davidedmundson
Cc: broulik, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191113/af754754/attachment.html>


More information about the Plasma-devel mailing list