Clean up a lot more namespace flags

This commit is contained in:
Veronica Berglyd Olsen
2024-04-03 20:25:54 +02:00
parent 46c5f1c10d
commit 20c5993e2d
38 changed files with 184 additions and 142 deletions
+3 -2
View File
@@ -31,6 +31,7 @@ from PyQt5.QtWidgets import (
)
from novelwriter import CONFIG
from novelwriter.types import QtDialogCancel, QtDialogOk
logger = logging.getLogger(__name__)
@@ -55,7 +56,7 @@ class GuiEditLabel(QDialog):
self.labelValue.selectAll()
# Buttons
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox = QDialogButtonBox(QtDialogOk | QtDialogCancel)
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
@@ -90,7 +91,7 @@ class GuiEditLabel(QDialog):
cls = GuiEditLabel(parent, text=text)
cls.exec()
label = cls.itemLabel
accepted = cls.result() == QDialog.Accepted
accepted = cls.result() == QDialog.DialogCode.Accepted
cls.deleteLater()
return label, accepted