Make MessageDelegateBase::cleanupIncubator static

This doesn't need to be attached to an instance of MessageDelegateBase,
and avoid various problems when called from a MessageObjectIncubator
callback. (Because it needs access to the "this" pointer.)

Fixes a regularly occurring crash when switching rooms.
This commit is contained in:
Joshua Goins
2025-05-06 19:33:09 -04:00
parent bcab617b9d
commit 107f3b6616

View File

@@ -222,7 +222,7 @@ private:
}
cleanupIncubator(incubator);
};
void cleanupIncubator(MessageObjectIncubator *incubator);
static void cleanupIncubator(MessageObjectIncubator *incubator);
void cleanupItem(QQuickItem *item);
qreal m_spacing = 0.0;