[QGIS-Developer] Dirtying project within model classes or not
Nyall Dawson
nyall.dawson at gmail.com
Tue Nov 4 11:11:35 PST 2025
On Tue, 4 Nov 2025, 6:45 pm David Koňařík via QGIS-Developer, <
qgis-developer at lists.osgeo.org> wrote:
>
> I don't have an opinion on dirtying (due to lack of experience with it),
> but I do have an opinion on signals and callbacks:
>
> I agree that QGIS sometimes overuses signals, but I think callbacks are
> only a reasonable replacement where there will be exactly one callback,
> and only when that callback isn't stored in an object.
>
> Apart from the code duplication introduced by manually handling lists of
> callback functions (and slowly reimplementing signals ourselves),
> signals, when attached to objects, will automatically respond to the
> destruction of one of the endpoints. This means that properly-connected
> signals will never cause use-after-free issues, and that is reason
> enough to use them, in my opinion.
>
+1. Effectively reimplementing qobject ourselves is not a good idea at all.
Nyall
> David Koňařík
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20251105/11445a38/attachment.htm>
More information about the QGIS-Developer
mailing list