Containment::addApplet -> Containment::createApplet
This commit is contained in:
parent
8a386d065c
commit
0b6770e2b2
@ -135,7 +135,7 @@ void PlasmaKPart::createView(Plasma::Containment *containment)
|
||||
void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const QRectF& geometry )
|
||||
{
|
||||
Q_ASSERT(containment());
|
||||
containment()->addApplet(name, args, geometry);
|
||||
containment()->createApplet(name, args, geometry);
|
||||
}
|
||||
|
||||
Plasma::Applet::List PlasmaKPart::listActiveApplets() const
|
||||
|
@ -265,7 +265,7 @@ void Containment::restoreContents(KConfigGroup &group)
|
||||
continue;
|
||||
}
|
||||
|
||||
d->addApplet(plugin, QVariantList(), appId);
|
||||
d->createApplet(plugin, QVariantList(), appId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,9 +325,9 @@ void Containment::setLocation(Location location)
|
||||
emit locationChanged(location);
|
||||
}
|
||||
|
||||
Applet *Containment::addApplet(const QString &name, const QVariantList &args)
|
||||
Applet *Containment::createApplet(const QString &name, const QVariantList &args)
|
||||
{
|
||||
return d->addApplet(name, args);
|
||||
return d->createApplet(name, args);
|
||||
}
|
||||
|
||||
void Containment::addApplet(Applet *applet)
|
||||
|
@ -118,7 +118,7 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
*
|
||||
* @return a pointer to the applet on success, or 0 on failure
|
||||
*/
|
||||
Applet *addApplet(const QString &name, const QVariantList &args = QVariantList());
|
||||
Applet *createApplet(const QString &name, const QVariantList &args = QVariantList());
|
||||
|
||||
/**
|
||||
* Add an existing applet to this Containment
|
||||
|
@ -238,7 +238,7 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
|
||||
}
|
||||
}
|
||||
|
||||
Applet *ContainmentPrivate::addApplet(const QString &name, const QVariantList &args, uint id)
|
||||
Applet *ContainmentPrivate::createApplet(const QString &name, const QVariantList &args, uint id)
|
||||
{
|
||||
if (!q->isContainment()) {
|
||||
return 0;
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
void appletDeleted(Applet*);
|
||||
void configChanged();
|
||||
|
||||
Applet *addApplet(const QString &name, const QVariantList &args = QVariantList(), uint id = 0);
|
||||
Applet *createApplet(const QString &name, const QVariantList &args = QVariantList(), uint id = 0);
|
||||
|
||||
/**
|
||||
* FIXME: this should completely go from here
|
||||
|
@ -56,7 +56,7 @@ void DesktopCorona::loadDefaultLayout()
|
||||
Plasma::Containment *cont = addContainment("org.kde.testcontainment");
|
||||
cont->setScreen(0);
|
||||
qDebug() << containmentForScreen(0);
|
||||
Plasma::Applet *appl = cont->addApplet("org.kde.testapplet");
|
||||
Plasma::Applet *appl = cont->createApplet("org.kde.testapplet");
|
||||
qDebug() << "Containment:" << cont << cont->title();
|
||||
qDebug() << "Applet:" << appl->title() << appl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user