diff --git a/crowd_anki/anki/overrides/change_model_dialog.py b/crowd_anki/anki/overrides/change_model_dialog.py index ad751dd..8c17c30 100644 --- a/crowd_anki/anki/overrides/change_model_dialog.py +++ b/crowd_anki/anki/overrides/change_model_dialog.py @@ -23,7 +23,7 @@ def __init__(self, collection, note_id_list, old_model=None, parent=None): # todo consider extracting UI file self.form = aqt.forms.changemodel.Ui_Dialog() self.form.setupUi(self) - self.setWindowModality(Qt.WindowModal) + self.setWindowModality(Qt.WindowModality.WindowModal) self.setup() self.pauseUpdate = False diff --git a/crowd_anki/main.py b/crowd_anki/main.py index e9de9a2..10e02e2 100644 --- a/crowd_anki/main.py +++ b/crowd_anki/main.py @@ -15,7 +15,7 @@ def invoke_config_window(): """ Launch custom GUI on config change instead of default Anki JSON editor """ - mw.crowd_anki_config.exec_() + mw.crowd_anki_config.exec() def initialize_config_window(config: ConfigSettings): diff --git a/crowd_anki/representation/note.py b/crowd_anki/representation/note.py index 3d34926..0392288 100644 --- a/crowd_anki/representation/note.py +++ b/crowd_anki/representation/note.py @@ -88,7 +88,7 @@ def on_accepted(): NoteModel.ModelMap(dialog.get_field_map(), dialog.get_template_map()) dialog.accepted.connect(on_accepted) - dialog.exec_() + dialog.exec() # todo process cancel # To get an updated note to work with diff --git a/crowd_anki/representation/note_model.py b/crowd_anki/representation/note_model.py index 74ab216..a965c73 100644 --- a/crowd_anki/representation/note_model.py +++ b/crowd_anki/representation/note_model.py @@ -71,4 +71,4 @@ def update_cards(self, collection, old_model): # todo signals instead of direct dialog creation? - ChangeModelDialog(collection, collection.models.nids(old_model), old_model).exec_() + ChangeModelDialog(collection, collection.models.nids(old_model), old_model).exec()