no more d->containment

svn path=/trunk/KDE/kdelibs/; revision=1014483
This commit is contained in:
Chani Armitage 2009-08-23 01:13:25 +00:00
parent 70f4e5aee6
commit f9317c11e6
2 changed files with 2 additions and 7 deletions

View File

@ -105,15 +105,12 @@ ContainmentActions *ContainmentActions::load(Containment *parent, const QString
QVariantList allArgs; QVariantList allArgs;
allArgs << offer->storageId() << args; allArgs << offer->storageId() << args;
QString error; QString error;
ContainmentActions *containmentActions = offer->createInstance<Plasma::ContainmentActions>(0, allArgs, &error); ContainmentActions *containmentActions = offer->createInstance<Plasma::ContainmentActions>(parent, allArgs, &error);
if (!containmentActions) { if (!containmentActions) {
kDebug() << "Couldn't load containmentActions \"" << containmentActionsName << "\"! reason given: " << error; kDebug() << "Couldn't load containmentActions \"" << containmentActionsName << "\"! reason given: " << error;
} }
containmentActions->setParent(parent);
containmentActions->d->containment = parent;
return containmentActions; return containmentActions;
} }
@ -136,7 +133,7 @@ PackageStructure::Ptr ContainmentActions::packageStructure()
Containment *ContainmentActions::containment() Containment *ContainmentActions::containment()
{ {
return d->containment; return static_cast<Containment*>(parent());
} }
QString ContainmentActions::name() const QString ContainmentActions::name() const

View File

@ -30,7 +30,6 @@ class ContainmentActionsPrivate : public DataEngineConsumer
public: public:
ContainmentActionsPrivate(KService::Ptr service, ContainmentActions *containmentActions) : ContainmentActionsPrivate(KService::Ptr service, ContainmentActions *containmentActions) :
q(containmentActions), q(containmentActions),
containment(0),
containmentActionsDescription(service), containmentActionsDescription(service),
initialized(false), initialized(false),
needsConfig(false), needsConfig(false),
@ -41,7 +40,6 @@ public:
static PackageStructure::Ptr s_packageStructure; static PackageStructure::Ptr s_packageStructure;
ContainmentActions *q; ContainmentActions *q;
Containment *containment;
KPluginInfo containmentActionsDescription; KPluginInfo containmentActionsDescription;
Package *package; Package *package;
KServiceAction mode; KServiceAction mode;