Fix Qt cleanup warning on dialog close
Add closeEvent that waits for thread pool workers to finish before closing, preventing "shared QObject deleted directly" warning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
493a499888
commit
0041bc0fae
|
|
@ -428,6 +428,11 @@ class RambleDialog(QDialog):
|
||||||
self.result = RambleResult(summary=summary, fields=out_fields)
|
self.result = RambleResult(summary=summary, fields=out_fields)
|
||||||
self.accept()
|
self.accept()
|
||||||
|
|
||||||
|
def closeEvent(self, event):
|
||||||
|
"""Wait for background workers to finish before closing."""
|
||||||
|
self.thread_pool.waitForDone(1000) # Wait up to 1 second
|
||||||
|
super().closeEvent(event)
|
||||||
|
|
||||||
|
|
||||||
def open_ramble_dialog(
|
def open_ramble_dialog(
|
||||||
*,
|
*,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue