Skip to content

Commit

Permalink
Replace remaining? occurrences of Qt6 breakage
Browse files Browse the repository at this point in the history
This allows changing note type and opening the config window to work.

I think that this is now all the breakage, for now.

Compat with 2.1.50+ is AFAICT preserved.
  • Loading branch information
aplaice committed Oct 25, 2023
1 parent 8e847ea commit fc9ddca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crowd_anki/anki/overrides/change_model_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crowd_anki/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion crowd_anki/representation/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crowd_anki/representation/note_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit fc9ddca

Please sign in to comment.