Files
qelectrotech-source-mirror/sources/titleblock
Beat Hangartner 0e2738b246 Stop listening to its children before the template editor is destroyed
Closing a title block template editor crashed it. The editor deletes
itself on close; QWidget's destructor then deletes its children, and
some of them signal the editor as they go:

- the scene deselects its cells, so the view emits
  selectedCellsChanged() to the editor's slot of the same name (when a
  cell was selected);
- the undo stack is cleared, so it emits cleanChanged() to
  updateEditorTitle() (when the template was edited).

Both slots then run on an object whose destructor has already run. A
Debug build aborts ("Called object is not of the correct type (class
destructor may have already run)"); a release build calls a member
function of a destroyed object.

Disconnect every child of the editor from it in the editor's
destructor, before the base destructors delete the children.

No file-format change, no change while the editor is open.

Tests: none automated; the editor needs the whole application.
Checked by hand (see the PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Beat Hangartner <beat@hangartners.ch>
2026-10-09 08:49:24 +02:00
..
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00
2026-01-16 15:24:35 +01:00