Fix warning about nullptr sender in QObject::connect()
When one sets "no border" property, the decoration can be null.
This commit is contained in:
parent
236baa63df
commit
012c64b054
1 changed files with 7 additions and 5 deletions
|
@ -707,11 +707,13 @@ void XdgToplevelWindow::handleRolePrecommit()
|
|||
{
|
||||
auto configureEvent = static_cast<XdgToplevelConfigure *>(lastAcknowledgedConfigure());
|
||||
if (configureEvent && decoration() != configureEvent->decoration.get()) {
|
||||
connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() {
|
||||
if (!isDeleted()) {
|
||||
scheduleConfigure();
|
||||
}
|
||||
});
|
||||
if (configureEvent->decoration) {
|
||||
connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() {
|
||||
if (!isDeleted()) {
|
||||
scheduleConfigure();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setDecoration(configureEvent->decoration);
|
||||
updateShadow();
|
||||
|
|
Loading…
Reference in a new issue