Remove deleteLater calls that can be replaced by setParent(None)

This commit is contained in:
Veronica Berglyd Olsen
2025-01-22 00:35:53 +01:00
parent 5b840ada83
commit 49e3403d69
6 changed files with 9 additions and 4 deletions
+2
View File
@@ -333,6 +333,7 @@ def testGuiEditor_MetaData(qtbot, nwGUI, projPath, mockRnd):
def testGuiEditor_ContextMenu(monkeypatch, qtbot, nwGUI, projPath, mockRnd):
"""Test the editor context menu."""
monkeypatch.setattr(QMenu, "exec", lambda *a: None)
monkeypatch.setattr(QMenu, "setParent", lambda *a: None)
buildTestProject(nwGUI, projPath)
assert nwGUI.openDocument(C.hSceneDoc) is True
@@ -475,6 +476,7 @@ def testGuiEditor_ContextMenu(monkeypatch, qtbot, nwGUI, projPath, mockRnd):
def testGuiEditor_SpellChecking(qtbot, monkeypatch, nwGUI, projPath, ipsumText, mockRnd):
"""Test the document spell checker."""
monkeypatch.setattr(QMenu, "exec", lambda *a: None)
monkeypatch.setattr(QMenu, "setParent", lambda *a: None)
buildTestProject(nwGUI, projPath)
assert nwGUI.openDocument(C.hSceneDoc) is True