Containment::addApplet -> Containment::createApplet

This commit is contained in:
Marco Martin 2013-02-28 13:32:47 +01:00
parent 8a386d065c
commit 0b6770e2b2
6 changed files with 8 additions and 8 deletions

View File

@ -135,7 +135,7 @@ void PlasmaKPart::createView(Plasma::Containment *containment)
void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const QRectF& geometry ) void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const QRectF& geometry )
{ {
Q_ASSERT(containment()); Q_ASSERT(containment());
containment()->addApplet(name, args, geometry); containment()->createApplet(name, args, geometry);
} }
Plasma::Applet::List PlasmaKPart::listActiveApplets() const Plasma::Applet::List PlasmaKPart::listActiveApplets() const

View File

@ -265,7 +265,7 @@ void Containment::restoreContents(KConfigGroup &group)
continue; continue;
} }
d->addApplet(plugin, QVariantList(), appId); d->createApplet(plugin, QVariantList(), appId);
} }
} }
@ -325,9 +325,9 @@ void Containment::setLocation(Location location)
emit locationChanged(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) void Containment::addApplet(Applet *applet)

View File

@ -118,7 +118,7 @@ class PLASMA_EXPORT Containment : public Applet
* *
* @return a pointer to the applet on success, or 0 on failure * @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 * Add an existing applet to this Containment

View File

@ -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()) { if (!q->isContainment()) {
return 0; return 0;

View File

@ -81,7 +81,7 @@ public:
void appletDeleted(Applet*); void appletDeleted(Applet*);
void configChanged(); 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 * FIXME: this should completely go from here

View File

@ -56,7 +56,7 @@ void DesktopCorona::loadDefaultLayout()
Plasma::Containment *cont = addContainment("org.kde.testcontainment"); Plasma::Containment *cont = addContainment("org.kde.testcontainment");
cont->setScreen(0); cont->setScreen(0);
qDebug() << containmentForScreen(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() << "Containment:" << cont << cont->title();
qDebug() << "Applet:" << appl->title() << appl; qDebug() << "Applet:" << appl->title() << appl;