fix a double delete bug
svn path=/trunk/KDE/kdelibs/; revision=1018485
This commit is contained in:
parent
1c4ec3b052
commit
03d8572ae4
@ -47,7 +47,6 @@ public:
|
||||
~LabelPrivate()
|
||||
{
|
||||
delete svg;
|
||||
delete native;
|
||||
}
|
||||
|
||||
void setPixmap(Label *q)
|
||||
@ -90,24 +89,23 @@ public:
|
||||
QString absImagePath;
|
||||
Svg *svg;
|
||||
bool textSelectable;
|
||||
QLabel *native;
|
||||
};
|
||||
|
||||
Label::Label(QGraphicsWidget *parent)
|
||||
: QGraphicsProxyWidget(parent),
|
||||
d(new LabelPrivate(this))
|
||||
{
|
||||
d->native = new QLabel;
|
||||
QLabel *native = new QLabel;
|
||||
d->textSelectable = false;
|
||||
connect(d->native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
|
||||
connect(d->native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
|
||||
connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
|
||||
connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
|
||||
|
||||
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
|
||||
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(setPalette()));
|
||||
|
||||
d->native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
d->native->setWordWrap(true);
|
||||
setWidget(d->native);
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setWordWrap(true);
|
||||
setWidget(native);
|
||||
d->setPalette();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user