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());
|
auto configureEvent = static_cast<XdgToplevelConfigure *>(lastAcknowledgedConfigure());
|
||||||
if (configureEvent && decoration() != configureEvent->decoration.get()) {
|
if (configureEvent && decoration() != configureEvent->decoration.get()) {
|
||||||
|
if (configureEvent->decoration) {
|
||||||
connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() {
|
connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() {
|
||||||
if (!isDeleted()) {
|
if (!isDeleted()) {
|
||||||
scheduleConfigure();
|
scheduleConfigure();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
setDecoration(configureEvent->decoration);
|
setDecoration(configureEvent->decoration);
|
||||||
updateShadow();
|
updateShadow();
|
||||||
|
|
Loading…
Reference in a new issue