containments emit uiready only when all applets did
This commit is contained in:
parent
0d9bc6d7be
commit
ebdfbb2e25
@ -185,7 +185,21 @@ void AppletInterface::init()
|
|||||||
}
|
}
|
||||||
geometryChanged(QRectF(), QRectF(x(), y(), width(), height()));
|
geometryChanged(QRectF(), QRectF(x(), y(), width(), height()));
|
||||||
emit busyChanged();
|
emit busyChanged();
|
||||||
m_appletScriptEngine->setUiReady(true);
|
|
||||||
|
if (!qobject_cast<Plasma::Containment *>(applet())) {
|
||||||
|
m_appletScriptEngine->setUiReady(true);
|
||||||
|
|
||||||
|
ContainmentInterface *containmentGraphicObject = qobject_cast<ContainmentInterface *>(applet()->containment()->property("graphicObject").value<QObject *>());
|
||||||
|
|
||||||
|
if (containmentGraphicObject) {
|
||||||
|
DeclarativeAppletScript *containmentScript = containmentGraphicObject->m_appletScriptEngine;
|
||||||
|
|
||||||
|
containmentScript->m_inProgressAppletInterfaces.remove(this);
|
||||||
|
if (containmentScript->m_inProgressAppletInterfaces.isEmpty()) {
|
||||||
|
containmentScript->setUiReady(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasma::Types::FormFactor AppletInterface::formFactor() const
|
Plasma::Types::FormFactor AppletInterface::formFactor() const
|
||||||
|
@ -82,6 +82,9 @@ void ContainmentInterface::init()
|
|||||||
if (!m_appletInterfaces.isEmpty()) {
|
if (!m_appletInterfaces.isEmpty()) {
|
||||||
emit appletsChanged();
|
emit appletsChanged();
|
||||||
}
|
}
|
||||||
|
if (m_appletScriptEngine->m_inProgressAppletInterfaces.isEmpty()) {
|
||||||
|
m_appletScriptEngine->setUiReady(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList <QObject *> ContainmentInterface::applets()
|
QList <QObject *> ContainmentInterface::applets()
|
||||||
@ -173,6 +176,7 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_appletInterfaces << appletGraphicObject;
|
m_appletInterfaces << appletGraphicObject;
|
||||||
|
m_appletScriptEngine->m_inProgressAppletInterfaces.insert(appletGraphicObject);
|
||||||
emit appletAdded(appletGraphicObject);
|
emit appletAdded(appletGraphicObject);
|
||||||
emit appletsChanged();
|
emit appletsChanged();
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <kdemacros.h>
|
#include <kdemacros.h>
|
||||||
|
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
#include <QSet>
|
||||||
|
|
||||||
#include <Plasma/AppletScript>
|
#include <Plasma/AppletScript>
|
||||||
|
|
||||||
@ -64,7 +65,9 @@ Q_SIGNALS:
|
|||||||
private:
|
private:
|
||||||
AppletInterface *m_interface;
|
AppletInterface *m_interface;
|
||||||
bool m_uiReady;
|
bool m_uiReady;
|
||||||
|
QSet<QObject *> m_inProgressAppletInterfaces;
|
||||||
friend class AppletInterface;
|
friend class AppletInterface;
|
||||||
|
friend class ContainmentInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user