Remove unneeded casts
They're all because we're accessing the d-pointer of the parent class (!), we can access it without casting.
This commit is contained in:
parent
459f81814d
commit
f5f96c1390
@ -411,8 +411,8 @@ void Containment::addApplet(Applet *applet)
|
||||
|
||||
if (!applet->d->uiReady) {
|
||||
d->loadingApplets << applet;
|
||||
if (static_cast<Applet *>(this)->d->uiReady) {
|
||||
static_cast<Applet *>(this)->d->uiReady = false;
|
||||
if (Applet::d->uiReady) {
|
||||
Applet::d->uiReady = false;
|
||||
emit uiReadyChanged(false);
|
||||
}
|
||||
}
|
||||
@ -536,8 +536,7 @@ QHash<QString, ContainmentActions *> &Containment::containmentActions()
|
||||
|
||||
bool Containment::isUiReady() const
|
||||
{
|
||||
const Applet *a = static_cast<const Applet *>(this);
|
||||
return a->d->uiReady && a->d->started;
|
||||
return Applet::d->uiReady && Applet::d->started;
|
||||
}
|
||||
|
||||
void Containment::setActivity(const QString &activityId)
|
||||
|
@ -315,11 +315,10 @@ void AppletPrivate::setUiReady()
|
||||
c = q->containment();
|
||||
if (c) {
|
||||
c->d->loadingApplets.remove(q);
|
||||
Applet *a = qobject_cast<Applet *>(c);
|
||||
Q_ASSERT(a);
|
||||
if (c->d->loadingApplets.isEmpty() && a && !a->d->uiReady) {
|
||||
a->d->uiReady = true;
|
||||
if (a->d->started) {
|
||||
|
||||
if (c->d->loadingApplets.isEmpty() && !Applet::d->uiReady) {
|
||||
c->Applet::d->uiReady = true;
|
||||
if (Applet::d->started) {
|
||||
emit c->uiReadyChanged(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user