fix a huge leak :-)
Signed-off-by: Riccardo Iaconelli <riccardo@kde.org> svn path=/trunk/KDE/kdelibs/; revision=1018177
This commit is contained in:
parent
309272b6f9
commit
339a5f84e4
@ -47,6 +47,7 @@ public:
|
||||
~LabelPrivate()
|
||||
{
|
||||
delete svg;
|
||||
delete native;
|
||||
}
|
||||
|
||||
void setPixmap(Label *q)
|
||||
@ -89,23 +90,24 @@ public:
|
||||
QString absImagePath;
|
||||
Svg *svg;
|
||||
bool textSelectable;
|
||||
QLabel *native;
|
||||
};
|
||||
|
||||
Label::Label(QGraphicsWidget *parent)
|
||||
: QGraphicsProxyWidget(parent),
|
||||
d(new LabelPrivate(this))
|
||||
{
|
||||
QLabel *native = new QLabel;
|
||||
d->native = new QLabel;
|
||||
d->textSelectable = false;
|
||||
connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
|
||||
connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
|
||||
connect(d->native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
|
||||
connect(d->native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
|
||||
|
||||
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
|
||||
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(setPalette()));
|
||||
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setWordWrap(true);
|
||||
setWidget(native);
|
||||
d->native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
d->native->setWordWrap(true);
|
||||
setWidget(d->native);
|
||||
d->setPalette();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user