Use parenting where appropriate.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=851451
This commit is contained in:
parent
4e1a2de897
commit
6f4ccf03c9
@ -270,7 +270,7 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason)
|
||||
if (failed) {
|
||||
setBackgroundHints(d->backgroundHints|StandardBackground);
|
||||
|
||||
QGraphicsLinearLayout *failureLayout = new QGraphicsLinearLayout();
|
||||
QGraphicsLinearLayout *failureLayout = new QGraphicsLinearLayout(this);
|
||||
failureLayout->setContentsMargins(0, 0, 0, 0);
|
||||
Label *failureWidget = new Plasma::Label(this);
|
||||
failureWidget->setText(d->visibleFailureText(reason));
|
||||
@ -604,7 +604,7 @@ void Applet::setBackgroundHints(const BackgroundHints hints)
|
||||
//Draw the standard background?
|
||||
if ((hints & StandardBackground) || (hints & TranslucentBackground)) {
|
||||
if (!d->background) {
|
||||
d->background = new Plasma::PanelSvg();
|
||||
d->background = new Plasma::PanelSvg(this);
|
||||
}
|
||||
|
||||
if ((hints & TranslucentBackground) &&
|
||||
@ -1548,7 +1548,6 @@ AppletPrivate::~AppletPrivate()
|
||||
foreach (const QString& engine, loadedEngines) {
|
||||
DataEngineManager::self()->unloadEngine( engine );
|
||||
}
|
||||
delete background;
|
||||
delete package;
|
||||
delete configXml;
|
||||
delete mainConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user