From 43d9b00b853c7ce79e5d644a68f4815bd655dd00 Mon Sep 17 00:00:00 2001 From: Abdo Date: Tue, 5 Nov 2024 11:25:06 +0300 Subject: [PATCH] Remove legacy import option (#3536) * Remove legacy import option * Always return False in legacy_import_export() --- qt/aqt/forms/preferences.ui | 23 ----------------------- qt/aqt/preferences.py | 3 --- qt/aqt/profiles.py | 3 ++- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/qt/aqt/forms/preferences.ui b/qt/aqt/forms/preferences.ui index 58db104c7..34de8c80e 100644 --- a/qt/aqt/forms/preferences.ui +++ b/qt/aqt/forms/preferences.ui @@ -611,28 +611,6 @@ - - - - preferences_import_export - - - - - - - 0 - 0 - - - - Legacy import/export handling - - - - - - @@ -1293,7 +1271,6 @@ useCurrent default_search_text ignore_accents_in_search - legacy_import_export syncMedia syncOnProgramOpen autoSyncMedia diff --git a/qt/aqt/preferences.py b/qt/aqt/preferences.py index aef3dc818..7befe4ca2 100644 --- a/qt/aqt/preferences.py +++ b/qt/aqt/preferences.py @@ -359,7 +359,6 @@ class Preferences(QDialog): ) self.form.styleLabel.setVisible(not is_win) self.form.styleComboBox.setVisible(not is_win) - self.form.legacy_import_export.setChecked(self.mw.pm.legacy_import_export()) qconnect(self.form.resetWindowSizes.clicked, self.on_reset_window_sizes) self.setup_language() @@ -377,8 +376,6 @@ class Preferences(QDialog): self.mw.pm.setUiScale(newScale) restart_required = True - self.mw.pm.set_legacy_import_export(self.form.legacy_import_export.isChecked()) - if restart_required: showInfo(tr.preferences_changes_will_take_effect_when_you()) diff --git a/qt/aqt/profiles.py b/qt/aqt/profiles.py index 469908c1b..817e00139 100644 --- a/qt/aqt/profiles.py +++ b/qt/aqt/profiles.py @@ -636,7 +636,8 @@ create table if not exists profiles self.meta[f"{self.editor_key(mode)}TagsCollapsed"] = collapsed def legacy_import_export(self) -> bool: - return self.meta.get("legacy_import", False) + "Always returns False so users with this option enabled are not stuck on the legacy importer after the UI option is removed." + return False def set_legacy_import_export(self, enabled: bool) -> None: self.meta["legacy_import"] = enabled