D10433: Add QML support for Prison

Kai Uwe Broulik noreply at phabricator.kde.org
Sun Feb 11 18:23:39 UTC 2018


broulik added a comment.


  Cool! Would allow us to get rid of the custom barcode stuff in Plasma's clipboard plasmoid.
  
  Does barcode generation need to be in a separate thread? The Plasma codes does it, not sure how big of a performance impact this has?

INLINE COMMENTS

> barcodequickitem.cpp:144
> +        m_barcode->toImage(m_barcode->minimumSize());
> +        setImplicitWidth(m_barcode->minimumSize().width());
> +        setImplicitHeight(m_barcode->minimumSize().height());

Use `setImplicitSize` to do both in one go and avoid intermediate signal emissions

> barcodequickitem.h:90
> +    Prison::BarcodeType m_type = Prison::Null;
> +    bool m_complete = false;
> +};

`QQuickPaintedItem` inherits `QQuickItem` which has a `isComponentComplete()` method, no need to keep track of that yourself

REPOSITORY
  R280 Prison

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

To: vkrause, #frameworks, svuorela
Cc: broulik, davidedmundson, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180211/e4d9cddb/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list