don't emit uireadychanged if not changed
This commit is contained in:
parent
8750d01f40
commit
04650605e5
@ -397,9 +397,11 @@ void Containment::addApplet(Applet *applet)
|
|||||||
|
|
||||||
if (!applet->d->uiReady) {
|
if (!applet->d->uiReady) {
|
||||||
d->loadingApplets << applet;
|
d->loadingApplets << applet;
|
||||||
|
if (static_cast<Applet *>(this)->d->uiReady) {
|
||||||
static_cast<Applet *>(this)->d->uiReady = false;
|
static_cast<Applet *>(this)->d->uiReady = false;
|
||||||
emit uiReadyChanged(false);
|
emit uiReadyChanged(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
||||||
connect(applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDeleted(Plasma::Applet*)));
|
connect(applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDeleted(Plasma::Applet*)));
|
||||||
|
@ -284,7 +284,7 @@ void AppletPrivate::setUiReady()
|
|||||||
c = q->containment();
|
c = q->containment();
|
||||||
if (c) {
|
if (c) {
|
||||||
q->containment()->d->loadingApplets.remove(q);
|
q->containment()->d->loadingApplets.remove(q);
|
||||||
if (q->containment()->d->loadingApplets.isEmpty()) {
|
if (q->containment()->d->loadingApplets.isEmpty() && !static_cast<Applet *>(q->containment())->d->uiReady) {
|
||||||
static_cast<Applet *>(q->containment())->d->uiReady = true;
|
static_cast<Applet *>(q->containment())->d->uiReady = true;
|
||||||
emit q->containment()->uiReadyChanged(true);
|
emit q->containment()->uiReadyChanged(true);
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,10 @@ KConfigGroup View::config() const
|
|||||||
|
|
||||||
void View::setContainment(Plasma::Containment *cont)
|
void View::setContainment(Plasma::Containment *cont)
|
||||||
{
|
{
|
||||||
|
if (m_containment.data() == cont) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Plasma::Types::Location oldLoc = (Plasma::Types::Location)location();
|
Plasma::Types::Location oldLoc = (Plasma::Types::Location)location();
|
||||||
Plasma::Types::FormFactor oldForm = formFactor();
|
Plasma::Types::FormFactor oldForm = formFactor();
|
||||||
|
|
||||||
@ -85,6 +89,8 @@ void View::setContainment(Plasma::Containment *cont)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug()<<"AAAAAA"<<cont->title()<<cont->isUiReady();
|
||||||
|
connect(cont, &Plasma::Containment::uiReadyChanged, [=](bool uiReady){ qDebug()<<"BBBBBBB"<<cont->title()<<cont->isUiReady(); });
|
||||||
m_containment = cont;
|
m_containment = cont;
|
||||||
|
|
||||||
if (oldLoc != location()) {
|
if (oldLoc != location()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user