guard pointers, crash--
This commit is contained in:
parent
25292578ca
commit
c4fb39de30
@ -187,6 +187,9 @@ void DialogProxy::setVisible(const bool visible)
|
||||
|
||||
QPoint DialogProxy::popupPosition(QGraphicsObject *item, int alignment) const
|
||||
{
|
||||
if (!item) {
|
||||
return QPoint();
|
||||
}
|
||||
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(item->scene());
|
||||
if (corona) {
|
||||
return corona->popupPosition(item, m_dialog->size(), (Qt::AlignmentFlag)alignment);
|
||||
|
@ -69,9 +69,11 @@ void SvgItem::setSvg(Plasma::Svg *svg)
|
||||
disconnect(m_svg.data(), 0, this, 0);
|
||||
}
|
||||
m_svg = svg;
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SLOT(updateNeeded()));
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SIGNAL(naturalSizeChanged()));
|
||||
connect(svg, SIGNAL(sizeChanged()), this, SIGNAL(naturalSizeChanged()));
|
||||
if (svg) {
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SLOT(updateNeeded()));
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SIGNAL(naturalSizeChanged()));
|
||||
connect(svg, SIGNAL(sizeChanged()), this, SIGNAL(naturalSizeChanged()));
|
||||
}
|
||||
emit naturalSizeChanged();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user