don't emit uireadychanged if not changed
This commit is contained in:
parent
8750d01f40
commit
04650605e5
@ -397,8 +397,10 @@ void Containment::addApplet(Applet *applet)
|
||||
|
||||
if (!applet->d->uiReady) {
|
||||
d->loadingApplets << applet;
|
||||
static_cast<Applet *>(this)->d->uiReady = false;
|
||||
emit uiReadyChanged(false);
|
||||
if (static_cast<Applet *>(this)->d->uiReady) {
|
||||
static_cast<Applet *>(this)->d->uiReady = false;
|
||||
emit uiReadyChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
||||
|
@ -284,7 +284,7 @@ void AppletPrivate::setUiReady()
|
||||
c = q->containment();
|
||||
if (c) {
|
||||
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;
|
||||
emit q->containment()->uiReadyChanged(true);
|
||||
}
|
||||
|
@ -73,6 +73,10 @@ KConfigGroup View::config() const
|
||||
|
||||
void View::setContainment(Plasma::Containment *cont)
|
||||
{
|
||||
if (m_containment.data() == cont) {
|
||||
return;
|
||||
}
|
||||
|
||||
Plasma::Types::Location oldLoc = (Plasma::Types::Location)location();
|
||||
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;
|
||||
|
||||
if (oldLoc != location()) {
|
||||
|
Loading…
Reference in New Issue
Block a user