diff --git a/src/declarativeimports/core/iconitem.h b/src/declarativeimports/core/iconitem.h --- a/src/declarativeimports/core/iconitem.h +++ b/src/declarativeimports/core/iconitem.h @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -38,6 +39,7 @@ class IconItem : public QQuickItem { Q_OBJECT + Q_INTERFACES(QQmlParserStatus) /** * Sets the icon to be displayed. Source can be one of: @@ -169,8 +171,6 @@ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE; - void componentComplete() Q_DECL_OVERRIDE; - Q_SIGNALS: void overlaysChanged(); void activeChanged(); @@ -192,6 +192,9 @@ void valueChanged(const QVariant &value); void onEnabledChanged(); +protected: + void componentComplete() Q_DECL_OVERRIDE; + private: void loadPixmap(); QSize paintedSize(const QSizeF &containerSize = QSizeF()) const; diff --git a/src/declarativeimports/core/svgitem.h b/src/declarativeimports/core/svgitem.h --- a/src/declarativeimports/core/svgitem.h +++ b/src/declarativeimports/core/svgitem.h @@ -21,6 +21,7 @@ #define SVGITEM_P #include +#include #include #include "units.h" @@ -37,6 +38,7 @@ class SvgItem : public QQuickItem { Q_OBJECT + Q_INTERFACES(QQmlParserStatus) /** * The sub element of the svg we want to render. If empty the whole svg document will be painted. @@ -97,6 +99,9 @@ void updateDevicePixelRatio(); /// @endcond +protected: + void componentComplete() Q_DECL_OVERRIDE; + private: void scheduleImageUpdate(); void updatePolish() Q_DECL_OVERRIDE; diff --git a/src/declarativeimports/core/svgitem.cpp b/src/declarativeimports/core/svgitem.cpp --- a/src/declarativeimports/core/svgitem.cpp +++ b/src/declarativeimports/core/svgitem.cpp @@ -47,6 +47,12 @@ { } +void SvgItem::componentComplete() +{ + QQuickItem::componentComplete(); + scheduleImageUpdate(); +} + void SvgItem::setElementId(const QString &elementID) { if (elementID == m_elementID) { diff --git a/src/declarativeimports/plasmaextracomponents/qml/ScrollArea.qml b/src/declarativeimports/plasmaextracomponents/qml/ScrollArea.qml --- a/src/declarativeimports/plasmaextracomponents/qml/ScrollArea.qml +++ b/src/declarativeimports/plasmaextracomponents/qml/ScrollArea.qml @@ -51,5 +51,13 @@ } contentItem.focus = true } + //we want plasmoid popups open as quick as possible at start. + //this makes sure things with big list views (kickoff, clipboard) + //are loaded when created, even before they are shown + Component.onCompleted: { + if (contentItem.forceLayout !== undefined) { + contentItem.forceLayout(); + } + } //end hack }