Fix some annotations and add deleteLater to non-modal dialogs

This commit is contained in:
Veronica Berglyd Olsen
2023-11-27 21:43:13 +01:00
parent 4fa20273f7
commit 50a9b5b5e2
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -551,7 +551,7 @@ class NWIndex:
return 0
def getTableOfContents(
self, rHandle: str, maxDepth: int, skipExcl: bool = True
self, rHandle: str | None, maxDepth: int, skipExcl: bool = True
) -> list[tuple[str, int, str, int]]:
"""Generate a table of contents up to a maximum depth."""
tOrder = []
+1
View File
@@ -139,6 +139,7 @@ class GuiAbout(QDialog):
def _doClose(self) -> None:
"""Close the dialog"""
self.close()
self.deleteLater()
return
##
+2 -1
View File
@@ -98,6 +98,7 @@ class GuiProjectDetails(NPagedDialog):
"""Save settings and close the dialog."""
self._saveGuiSettings()
self.close()
self.deleteLater()
return
##
@@ -428,7 +429,7 @@ class GuiProjectDetailsContents(QWidget):
# Internal Functions
##
def _prepareData(self, rootHandle: str) -> None:
def _prepareData(self, rootHandle: str | None) -> None:
"""Extract the information from the project index."""
logger.debug("Populating ToC from handle '%s'", rootHandle)
self._theToC = SHARED.project.index.getTableOfContents(rootHandle, 2)