ensure empty containment emit uiReady()
Containments with no applets will emit uiReady now It adds a test as well that checks if this is the case. There is still a case where the corona doesn't emit startupCompleted() that's when there is more than one activity, but that, as well the test will be adressed by another patch on a different part. Change-Id: I4d83aa612c29fb0f441d11681bc5aba241370bc3
This commit is contained in:
parent
72caf0b9f0
commit
0b0daa2318
@ -129,7 +129,7 @@ void CoronaTest::cleanupTestCase()
|
||||
void CoronaTest::restore()
|
||||
{
|
||||
m_corona->loadLayout("plasma-test-appletsrc");
|
||||
QCOMPARE(m_corona->containments().count(), 1);
|
||||
QCOMPARE(m_corona->containments().count(), 2);
|
||||
QCOMPARE(m_corona->containments().first()->applets().count(), 2);
|
||||
}
|
||||
|
||||
|
@ -14,5 +14,13 @@ plugin=invalid
|
||||
immutability=1
|
||||
plugin=simpleapplet
|
||||
|
||||
#empty panel: should emit complete even if empty
|
||||
[Containments][4]
|
||||
formfactor=2
|
||||
immutability=1
|
||||
lastScreen=0
|
||||
location=4
|
||||
plugin=simplecontainment
|
||||
|
||||
[General]
|
||||
immutability=1
|
||||
|
@ -563,7 +563,6 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigGroup &con
|
||||
if (!ready) {
|
||||
return;
|
||||
}
|
||||
|
||||
--containmentsStarting;
|
||||
if (containmentsStarting <= 0) {
|
||||
emit q->startupCompleted();
|
||||
|
@ -246,7 +246,7 @@ void ContainmentPrivate::setUiReady()
|
||||
//if we are the containment and there is still some uncomplete applet, we're still incomplete
|
||||
if (!uiReady) {
|
||||
uiReady = true;
|
||||
if (q->Applet::d->started && appletsUiReady && loadingApplets.isEmpty()) {
|
||||
if (q->Applet::d->started && (appletsUiReady || applets.isEmpty()) && loadingApplets.isEmpty()) {
|
||||
emit q->uiReadyChanged(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user