Set the pointer before connecting to it.

This fixes the warning "QObject::connect: invalid null parameter"
This commit is contained in:
David Faure 2016-06-12 15:53:32 +02:00
parent 7a9855ec77
commit 2a8891ec95

View File

@ -386,10 +386,10 @@ void AppletInterface::setToolTipItem(QQuickItem *toolTipItem)
return; return;
} }
m_toolTipItem = toolTipItem;
connect(m_toolTipItem.data(), &QObject::destroyed, connect(m_toolTipItem.data(), &QObject::destroyed,
this, &AppletInterface::toolTipItemChanged); this, &AppletInterface::toolTipItemChanged);
m_toolTipItem = toolTipItem;
emit toolTipItemChanged(); emit toolTipItemChanged();
} }