From b0272f03360cd96f920b48047c7bdb22e3974b13 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 5 Oct 2021 13:18:43 +1000 Subject: [PATCH] generate pyqt6 forms --- qt/aqt/forms/BUILD.bazel | 47 +++++++++++++++---- qt/aqt/forms/__init___qt6.py | 1 + qt/aqt/forms/about.py | 6 ++- qt/aqt/forms/about_qt6.py | 1 + qt/aqt/forms/addcards.py | 6 ++- qt/aqt/forms/addcards_qt6.py | 1 + qt/aqt/forms/addfield.py | 6 ++- qt/aqt/forms/addfield_qt6.py | 1 + qt/aqt/forms/addmodel.py | 6 ++- qt/aqt/forms/addmodel_qt6.py | 1 + qt/aqt/forms/addonconf.py | 6 ++- qt/aqt/forms/addonconf_qt6.py | 1 + qt/aqt/forms/addons.py | 6 ++- qt/aqt/forms/addons_qt6.py | 1 + qt/aqt/forms/browser.py | 6 ++- qt/aqt/forms/browser_qt6.py | 1 + qt/aqt/forms/browserdisp.py | 6 ++- qt/aqt/forms/browserdisp_qt6.py | 1 + qt/aqt/forms/browseropts.py | 6 ++- qt/aqt/forms/browseropts_qt6.py | 1 + qt/aqt/forms/{build_ui.py => build_ui_qt5.py} | 0 qt/aqt/forms/build_ui_qt5_qt6.py | 1 + qt/aqt/forms/build_ui_qt6.py | 39 +++++++++++++++ qt/aqt/forms/build_ui_qt6_qt6.py | 1 + qt/aqt/forms/changemap.py | 6 ++- qt/aqt/forms/changemap_qt6.py | 1 + qt/aqt/forms/changemodel.py | 6 ++- qt/aqt/forms/changemodel_qt6.py | 1 + qt/aqt/forms/clayout_top.py | 6 ++- qt/aqt/forms/clayout_top_qt6.py | 1 + qt/aqt/forms/compile.bzl | 20 ++++---- qt/aqt/forms/customstudy.py | 6 ++- qt/aqt/forms/customstudy_qt6.py | 1 + qt/aqt/forms/dconf.py | 6 ++- qt/aqt/forms/dconf_qt6.py | 1 + qt/aqt/forms/debug.py | 6 ++- qt/aqt/forms/debug_qt6.py | 1 + qt/aqt/forms/editaddon.py | 6 ++- qt/aqt/forms/editaddon_qt6.py | 1 + qt/aqt/forms/editcurrent.py | 6 ++- qt/aqt/forms/editcurrent_qt6.py | 1 + qt/aqt/forms/edithtml.py | 6 ++- qt/aqt/forms/edithtml_qt6.py | 1 + qt/aqt/forms/emptycards.py | 6 ++- qt/aqt/forms/emptycards_qt6.py | 1 + qt/aqt/forms/exporting.py | 6 ++- qt/aqt/forms/exporting_qt6.py | 1 + qt/aqt/forms/fields.py | 6 ++- qt/aqt/forms/fields_qt6.py | 1 + qt/aqt/forms/filtered_deck.py | 6 ++- qt/aqt/forms/filtered_deck_qt6.py | 1 + qt/aqt/forms/finddupes.py | 6 ++- qt/aqt/forms/finddupes_qt6.py | 1 + qt/aqt/forms/findreplace.py | 6 ++- qt/aqt/forms/findreplace_qt6.py | 1 + qt/aqt/forms/getaddons.py | 6 ++- qt/aqt/forms/getaddons_qt6.py | 1 + qt/aqt/forms/importing.py | 6 ++- qt/aqt/forms/importing_qt6.py | 1 + qt/aqt/forms/main.py | 6 ++- qt/aqt/forms/main_qt6.py | 1 + qt/aqt/forms/modelopts.py | 6 ++- qt/aqt/forms/modelopts_qt6.py | 1 + qt/aqt/forms/models.py | 6 ++- qt/aqt/forms/models_qt6.py | 1 + qt/aqt/forms/preferences.py | 6 ++- qt/aqt/forms/preferences_qt6.py | 1 + qt/aqt/forms/preview.py | 6 ++- qt/aqt/forms/preview_qt6.py | 1 + qt/aqt/forms/profiles.py | 6 ++- qt/aqt/forms/profiles_qt6.py | 1 + qt/aqt/forms/progress.py | 6 ++- qt/aqt/forms/progress_qt6.py | 1 + qt/aqt/forms/reposition.py | 6 ++- qt/aqt/forms/reposition_qt6.py | 1 + qt/aqt/forms/setgroup.py | 6 ++- qt/aqt/forms/setgroup_qt6.py | 1 + qt/aqt/forms/setlang.py | 6 ++- qt/aqt/forms/setlang_qt6.py | 1 + qt/aqt/forms/stats.py | 6 ++- qt/aqt/forms/stats_qt6.py | 1 + qt/aqt/forms/studydeck.py | 6 ++- qt/aqt/forms/studydeck_qt6.py | 1 + qt/aqt/forms/synclog.py | 6 ++- qt/aqt/forms/synclog_qt6.py | 1 + qt/aqt/forms/taglimit.py | 6 ++- qt/aqt/forms/taglimit_qt6.py | 1 + qt/aqt/forms/template.py | 6 ++- qt/aqt/forms/template_qt6.py | 1 + qt/mypy.ini | 6 ++- 90 files changed, 341 insertions(+), 61 deletions(-) create mode 120000 qt/aqt/forms/__init___qt6.py mode change 120000 => 100644 qt/aqt/forms/about.py create mode 120000 qt/aqt/forms/about_qt6.py mode change 120000 => 100644 qt/aqt/forms/addcards.py create mode 120000 qt/aqt/forms/addcards_qt6.py mode change 120000 => 100644 qt/aqt/forms/addfield.py create mode 120000 qt/aqt/forms/addfield_qt6.py mode change 120000 => 100644 qt/aqt/forms/addmodel.py create mode 120000 qt/aqt/forms/addmodel_qt6.py mode change 120000 => 100644 qt/aqt/forms/addonconf.py create mode 120000 qt/aqt/forms/addonconf_qt6.py mode change 120000 => 100644 qt/aqt/forms/addons.py create mode 120000 qt/aqt/forms/addons_qt6.py mode change 120000 => 100644 qt/aqt/forms/browser.py create mode 120000 qt/aqt/forms/browser_qt6.py mode change 120000 => 100644 qt/aqt/forms/browserdisp.py create mode 120000 qt/aqt/forms/browserdisp_qt6.py mode change 120000 => 100644 qt/aqt/forms/browseropts.py create mode 120000 qt/aqt/forms/browseropts_qt6.py rename qt/aqt/forms/{build_ui.py => build_ui_qt5.py} (100%) create mode 120000 qt/aqt/forms/build_ui_qt5_qt6.py create mode 100644 qt/aqt/forms/build_ui_qt6.py create mode 120000 qt/aqt/forms/build_ui_qt6_qt6.py mode change 120000 => 100644 qt/aqt/forms/changemap.py create mode 120000 qt/aqt/forms/changemap_qt6.py mode change 120000 => 100644 qt/aqt/forms/changemodel.py create mode 120000 qt/aqt/forms/changemodel_qt6.py mode change 120000 => 100644 qt/aqt/forms/clayout_top.py create mode 120000 qt/aqt/forms/clayout_top_qt6.py mode change 120000 => 100644 qt/aqt/forms/customstudy.py create mode 120000 qt/aqt/forms/customstudy_qt6.py mode change 120000 => 100644 qt/aqt/forms/dconf.py create mode 120000 qt/aqt/forms/dconf_qt6.py mode change 120000 => 100644 qt/aqt/forms/debug.py create mode 120000 qt/aqt/forms/debug_qt6.py mode change 120000 => 100644 qt/aqt/forms/editaddon.py create mode 120000 qt/aqt/forms/editaddon_qt6.py mode change 120000 => 100644 qt/aqt/forms/editcurrent.py create mode 120000 qt/aqt/forms/editcurrent_qt6.py mode change 120000 => 100644 qt/aqt/forms/edithtml.py create mode 120000 qt/aqt/forms/edithtml_qt6.py mode change 120000 => 100644 qt/aqt/forms/emptycards.py create mode 120000 qt/aqt/forms/emptycards_qt6.py mode change 120000 => 100644 qt/aqt/forms/exporting.py create mode 120000 qt/aqt/forms/exporting_qt6.py mode change 120000 => 100644 qt/aqt/forms/fields.py create mode 120000 qt/aqt/forms/fields_qt6.py mode change 120000 => 100644 qt/aqt/forms/filtered_deck.py create mode 120000 qt/aqt/forms/filtered_deck_qt6.py mode change 120000 => 100644 qt/aqt/forms/finddupes.py create mode 120000 qt/aqt/forms/finddupes_qt6.py mode change 120000 => 100644 qt/aqt/forms/findreplace.py create mode 120000 qt/aqt/forms/findreplace_qt6.py mode change 120000 => 100644 qt/aqt/forms/getaddons.py create mode 120000 qt/aqt/forms/getaddons_qt6.py mode change 120000 => 100644 qt/aqt/forms/importing.py create mode 120000 qt/aqt/forms/importing_qt6.py mode change 120000 => 100644 qt/aqt/forms/main.py create mode 120000 qt/aqt/forms/main_qt6.py mode change 120000 => 100644 qt/aqt/forms/modelopts.py create mode 120000 qt/aqt/forms/modelopts_qt6.py mode change 120000 => 100644 qt/aqt/forms/models.py create mode 120000 qt/aqt/forms/models_qt6.py mode change 120000 => 100644 qt/aqt/forms/preferences.py create mode 120000 qt/aqt/forms/preferences_qt6.py mode change 120000 => 100644 qt/aqt/forms/preview.py create mode 120000 qt/aqt/forms/preview_qt6.py mode change 120000 => 100644 qt/aqt/forms/profiles.py create mode 120000 qt/aqt/forms/profiles_qt6.py mode change 120000 => 100644 qt/aqt/forms/progress.py create mode 120000 qt/aqt/forms/progress_qt6.py mode change 120000 => 100644 qt/aqt/forms/reposition.py create mode 120000 qt/aqt/forms/reposition_qt6.py mode change 120000 => 100644 qt/aqt/forms/setgroup.py create mode 120000 qt/aqt/forms/setgroup_qt6.py mode change 120000 => 100644 qt/aqt/forms/setlang.py create mode 120000 qt/aqt/forms/setlang_qt6.py mode change 120000 => 100644 qt/aqt/forms/stats.py create mode 120000 qt/aqt/forms/stats_qt6.py mode change 120000 => 100644 qt/aqt/forms/studydeck.py create mode 120000 qt/aqt/forms/studydeck_qt6.py mode change 120000 => 100644 qt/aqt/forms/synclog.py create mode 120000 qt/aqt/forms/synclog_qt6.py mode change 120000 => 100644 qt/aqt/forms/taglimit.py create mode 120000 qt/aqt/forms/taglimit_qt6.py mode change 120000 => 100644 qt/aqt/forms/template.py create mode 120000 qt/aqt/forms/template_qt6.py diff --git a/qt/aqt/forms/BUILD.bazel b/qt/aqt/forms/BUILD.bazel index 931df6037..aedbaf453 100644 --- a/qt/aqt/forms/BUILD.bazel +++ b/qt/aqt/forms/BUILD.bazel @@ -1,17 +1,48 @@ load("@rules_python//python:defs.bzl", "py_binary") load("compile.bzl", "compile_all") +py_binary( + name = "build_ui_qt5", + srcs = ["build_ui_qt5.py"], + legacy_create_init = False, + deps = ["@pyqt5//:pkg"], +) + +py_binary( + name = "build_ui_qt6", + srcs = ["build_ui_qt6.py"], + legacy_create_init = False, + deps = ["@pyqt6//:pkg"], +) + compile_all( + name = "forms_qt5", srcs = glob(["*.ui"]), - group = "forms", + builder = "build_ui_qt5", + suffix = "_qt5", +) + +compile_all( + name = "forms_qt6", + srcs = glob(["*.ui"]), + builder = "build_ui_qt6", + suffix = "_qt6", +) + +filegroup( + name = "forms", + srcs = glob( + ["*.py"], + exclude = [ + "*_qt5.py", + "*_qt6.py", + "build_ui*.py", + ], + ) + [ + ":forms_qt6", + ":forms_qt5", + ], visibility = [ "//qt/aqt:__pkg__", ], ) - -py_binary( - name = "build_ui", - srcs = ["build_ui.py"], - legacy_create_init = False, - deps = ["@pyqt5//:pkg"], -) diff --git a/qt/aqt/forms/__init___qt6.py b/qt/aqt/forms/__init___qt6.py new file mode 120000 index 000000000..d09f3c7c6 --- /dev/null +++ b/qt/aqt/forms/__init___qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/__init___qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/about.py b/qt/aqt/forms/about.py deleted file mode 120000 index e70429a4a..000000000 --- a/qt/aqt/forms/about.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/about.py \ No newline at end of file diff --git a/qt/aqt/forms/about.py b/qt/aqt/forms/about.py new file mode 100644 index 000000000..8622ff868 --- /dev/null +++ b/qt/aqt/forms/about.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .about_qt6 import * +else: + from .about_qt5 import * # type: ignore diff --git a/qt/aqt/forms/about_qt6.py b/qt/aqt/forms/about_qt6.py new file mode 120000 index 000000000..9346a7ee6 --- /dev/null +++ b/qt/aqt/forms/about_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/about_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/addcards.py b/qt/aqt/forms/addcards.py deleted file mode 120000 index f54c8fe40..000000000 --- a/qt/aqt/forms/addcards.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/addcards.py \ No newline at end of file diff --git a/qt/aqt/forms/addcards.py b/qt/aqt/forms/addcards.py new file mode 100644 index 000000000..74082d63f --- /dev/null +++ b/qt/aqt/forms/addcards.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .addcards_qt6 import * +else: + from .addcards_qt5 import * # type: ignore diff --git a/qt/aqt/forms/addcards_qt6.py b/qt/aqt/forms/addcards_qt6.py new file mode 120000 index 000000000..2023fe24a --- /dev/null +++ b/qt/aqt/forms/addcards_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/addcards_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/addfield.py b/qt/aqt/forms/addfield.py deleted file mode 120000 index 1a54703f0..000000000 --- a/qt/aqt/forms/addfield.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/addfield.py \ No newline at end of file diff --git a/qt/aqt/forms/addfield.py b/qt/aqt/forms/addfield.py new file mode 100644 index 000000000..839061794 --- /dev/null +++ b/qt/aqt/forms/addfield.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .addfield_qt6 import * +else: + from .addfield_qt5 import * # type: ignore diff --git a/qt/aqt/forms/addfield_qt6.py b/qt/aqt/forms/addfield_qt6.py new file mode 120000 index 000000000..6074f2a7e --- /dev/null +++ b/qt/aqt/forms/addfield_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/addfield_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/addmodel.py b/qt/aqt/forms/addmodel.py deleted file mode 120000 index 319620610..000000000 --- a/qt/aqt/forms/addmodel.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/addmodel.py \ No newline at end of file diff --git a/qt/aqt/forms/addmodel.py b/qt/aqt/forms/addmodel.py new file mode 100644 index 000000000..6128f1649 --- /dev/null +++ b/qt/aqt/forms/addmodel.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .addmodel_qt6 import * +else: + from .addmodel_qt5 import * # type: ignore diff --git a/qt/aqt/forms/addmodel_qt6.py b/qt/aqt/forms/addmodel_qt6.py new file mode 120000 index 000000000..c82ec7f3a --- /dev/null +++ b/qt/aqt/forms/addmodel_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/addmodel_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/addonconf.py b/qt/aqt/forms/addonconf.py deleted file mode 120000 index de53ecee1..000000000 --- a/qt/aqt/forms/addonconf.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/addonconf.py \ No newline at end of file diff --git a/qt/aqt/forms/addonconf.py b/qt/aqt/forms/addonconf.py new file mode 100644 index 000000000..759f9b11f --- /dev/null +++ b/qt/aqt/forms/addonconf.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .addonconf_qt6 import * +else: + from .addonconf_qt5 import * # type: ignore diff --git a/qt/aqt/forms/addonconf_qt6.py b/qt/aqt/forms/addonconf_qt6.py new file mode 120000 index 000000000..660196e9d --- /dev/null +++ b/qt/aqt/forms/addonconf_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/addonconf_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/addons.py b/qt/aqt/forms/addons.py deleted file mode 120000 index a13b69944..000000000 --- a/qt/aqt/forms/addons.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/addons.py \ No newline at end of file diff --git a/qt/aqt/forms/addons.py b/qt/aqt/forms/addons.py new file mode 100644 index 000000000..fd423756e --- /dev/null +++ b/qt/aqt/forms/addons.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .addons_qt6 import * +else: + from .addons_qt5 import * # type: ignore diff --git a/qt/aqt/forms/addons_qt6.py b/qt/aqt/forms/addons_qt6.py new file mode 120000 index 000000000..50257706b --- /dev/null +++ b/qt/aqt/forms/addons_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/addons_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/browser.py b/qt/aqt/forms/browser.py deleted file mode 120000 index 592ca70b4..000000000 --- a/qt/aqt/forms/browser.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/browser.py \ No newline at end of file diff --git a/qt/aqt/forms/browser.py b/qt/aqt/forms/browser.py new file mode 100644 index 000000000..8f443ff4a --- /dev/null +++ b/qt/aqt/forms/browser.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .browser_qt6 import * +else: + from .browser_qt5 import * # type: ignore diff --git a/qt/aqt/forms/browser_qt6.py b/qt/aqt/forms/browser_qt6.py new file mode 120000 index 000000000..d3e9e9e7b --- /dev/null +++ b/qt/aqt/forms/browser_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/browser_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/browserdisp.py b/qt/aqt/forms/browserdisp.py deleted file mode 120000 index d1017e9e2..000000000 --- a/qt/aqt/forms/browserdisp.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/browserdisp.py \ No newline at end of file diff --git a/qt/aqt/forms/browserdisp.py b/qt/aqt/forms/browserdisp.py new file mode 100644 index 000000000..c5bc36bd3 --- /dev/null +++ b/qt/aqt/forms/browserdisp.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .browserdisp_qt6 import * +else: + from .browserdisp_qt5 import * # type: ignore diff --git a/qt/aqt/forms/browserdisp_qt6.py b/qt/aqt/forms/browserdisp_qt6.py new file mode 120000 index 000000000..17b1ce3a0 --- /dev/null +++ b/qt/aqt/forms/browserdisp_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/browserdisp_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/browseropts.py b/qt/aqt/forms/browseropts.py deleted file mode 120000 index 2f97ae88f..000000000 --- a/qt/aqt/forms/browseropts.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/browseropts.py \ No newline at end of file diff --git a/qt/aqt/forms/browseropts.py b/qt/aqt/forms/browseropts.py new file mode 100644 index 000000000..d0fd9dbca --- /dev/null +++ b/qt/aqt/forms/browseropts.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .browseropts_qt6 import * +else: + from .browseropts_qt5 import * # type: ignore diff --git a/qt/aqt/forms/browseropts_qt6.py b/qt/aqt/forms/browseropts_qt6.py new file mode 120000 index 000000000..85414176c --- /dev/null +++ b/qt/aqt/forms/browseropts_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/browseropts_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/build_ui.py b/qt/aqt/forms/build_ui_qt5.py similarity index 100% rename from qt/aqt/forms/build_ui.py rename to qt/aqt/forms/build_ui_qt5.py diff --git a/qt/aqt/forms/build_ui_qt5_qt6.py b/qt/aqt/forms/build_ui_qt5_qt6.py new file mode 120000 index 000000000..b90c66ba6 --- /dev/null +++ b/qt/aqt/forms/build_ui_qt5_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/build_ui_qt5_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/build_ui_qt6.py b/qt/aqt/forms/build_ui_qt6.py new file mode 100644 index 000000000..26d230c10 --- /dev/null +++ b/qt/aqt/forms/build_ui_qt6.py @@ -0,0 +1,39 @@ +import re +import sys +import io +from PyQt6.uic import compileUi + +ui_file = sys.argv[1] +py_file = sys.argv[2] +buf = io.StringIO() +compileUi(open(ui_file), buf) + +outdata = buf.getvalue() +outdata = outdata.replace( + "from PyQt6 import QtCore, QtGui, QtWidgets", + "from PyQt6 import QtCore, QtGui, QtWidgets\nfrom aqt.utils import tr\n" +) +outdata = re.sub( + r'(?:QtGui\.QApplication\.)?_?translate\(".*?", "(.*?)"', "tr.\\1(", outdata +) + + +outlines = [] +qt_bad_types = [ + ".connect(", +] +for line in outdata.splitlines(): + for substr in qt_bad_types: + if substr in line: + line = line + " # type: ignore" + break + if line == "from . import icons_rc": + continue + line = line.replace(":/icons/", "icons:") + line = line.replace("QAction.PreferencesRole", "QAction.MenuRole.PreferencesRole") + line = line.replace("QAction.AboutRole", "QAction.MenuRole.AboutRole") + line = line.replace("QComboBox.AdjustToMinimumContentsLength", "QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLength") + outlines.append(line) + +with open(py_file, "w") as file: + file.write("\n".join(outlines)) diff --git a/qt/aqt/forms/build_ui_qt6_qt6.py b/qt/aqt/forms/build_ui_qt6_qt6.py new file mode 120000 index 000000000..70bd11c7c --- /dev/null +++ b/qt/aqt/forms/build_ui_qt6_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/build_ui_qt6_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/changemap.py b/qt/aqt/forms/changemap.py deleted file mode 120000 index 96f98d078..000000000 --- a/qt/aqt/forms/changemap.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/changemap.py \ No newline at end of file diff --git a/qt/aqt/forms/changemap.py b/qt/aqt/forms/changemap.py new file mode 100644 index 000000000..d6dc2d060 --- /dev/null +++ b/qt/aqt/forms/changemap.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .changemap_qt6 import * +else: + from .changemap_qt5 import * # type: ignore diff --git a/qt/aqt/forms/changemap_qt6.py b/qt/aqt/forms/changemap_qt6.py new file mode 120000 index 000000000..7dfb40223 --- /dev/null +++ b/qt/aqt/forms/changemap_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/changemap_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/changemodel.py b/qt/aqt/forms/changemodel.py deleted file mode 120000 index 8a83a2d08..000000000 --- a/qt/aqt/forms/changemodel.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/changemodel.py \ No newline at end of file diff --git a/qt/aqt/forms/changemodel.py b/qt/aqt/forms/changemodel.py new file mode 100644 index 000000000..2b0a10492 --- /dev/null +++ b/qt/aqt/forms/changemodel.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .changemodel_qt6 import * +else: + from .changemodel_qt5 import * # type: ignore diff --git a/qt/aqt/forms/changemodel_qt6.py b/qt/aqt/forms/changemodel_qt6.py new file mode 120000 index 000000000..d2b9bfda9 --- /dev/null +++ b/qt/aqt/forms/changemodel_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/changemodel_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/clayout_top.py b/qt/aqt/forms/clayout_top.py deleted file mode 120000 index 1a1d15638..000000000 --- a/qt/aqt/forms/clayout_top.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/clayout_top.py \ No newline at end of file diff --git a/qt/aqt/forms/clayout_top.py b/qt/aqt/forms/clayout_top.py new file mode 100644 index 000000000..9c15a8f07 --- /dev/null +++ b/qt/aqt/forms/clayout_top.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .clayout_top_qt6 import * +else: + from .clayout_top_qt5 import * # type: ignore diff --git a/qt/aqt/forms/clayout_top_qt6.py b/qt/aqt/forms/clayout_top_qt6.py new file mode 120000 index 000000000..63bb2ba0a --- /dev/null +++ b/qt/aqt/forms/clayout_top_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/clayout_top_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/compile.bzl b/qt/aqt/forms/compile.bzl index 36a654f70..4b6751c0f 100644 --- a/qt/aqt/forms/compile.bzl +++ b/qt/aqt/forms/compile.bzl @@ -1,28 +1,28 @@ -def compile(name, ui_file, py_file): +def compile(name, ui_file, py_file, builder): native.genrule( name = name, srcs = [ui_file], outs = [py_file], - cmd = "$(location build_ui) $(location {ui_file}) $(location {py_file})".format( + cmd = "$(location {builder}) $(location {ui_file}) $(location {py_file})".format( + builder = builder, ui_file = ui_file, py_file = py_file, ), tools = [ - "build_ui", + builder, ], message = "Building UI", ) -def compile_all(group, srcs, visibility): +def compile_all(name, builder, srcs, suffix): py_files = [] for ui_file in srcs: - name = ui_file.replace(".ui", "") - py_file = name + ".py" + fname = ui_file.replace(".ui", "") + suffix + py_file = fname + ".py" py_files.append(py_file) - compile(name, ui_file, py_file) + compile(fname, ui_file, py_file, builder) native.filegroup( - name = group, - srcs = py_files + ["__init__.py"], - visibility = visibility, + name = name, + srcs = py_files, ) diff --git a/qt/aqt/forms/customstudy.py b/qt/aqt/forms/customstudy.py deleted file mode 120000 index 7e062decc..000000000 --- a/qt/aqt/forms/customstudy.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/customstudy.py \ No newline at end of file diff --git a/qt/aqt/forms/customstudy.py b/qt/aqt/forms/customstudy.py new file mode 100644 index 000000000..315e65d7d --- /dev/null +++ b/qt/aqt/forms/customstudy.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .customstudy_qt6 import * +else: + from .customstudy_qt5 import * # type: ignore diff --git a/qt/aqt/forms/customstudy_qt6.py b/qt/aqt/forms/customstudy_qt6.py new file mode 120000 index 000000000..fc030c146 --- /dev/null +++ b/qt/aqt/forms/customstudy_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/customstudy_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/dconf.py b/qt/aqt/forms/dconf.py deleted file mode 120000 index f90767bfa..000000000 --- a/qt/aqt/forms/dconf.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/dconf.py \ No newline at end of file diff --git a/qt/aqt/forms/dconf.py b/qt/aqt/forms/dconf.py new file mode 100644 index 000000000..6f540938f --- /dev/null +++ b/qt/aqt/forms/dconf.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .dconf_qt6 import * +else: + from .dconf_qt5 import * # type: ignore diff --git a/qt/aqt/forms/dconf_qt6.py b/qt/aqt/forms/dconf_qt6.py new file mode 120000 index 000000000..1ee73eefd --- /dev/null +++ b/qt/aqt/forms/dconf_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/dconf_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/debug.py b/qt/aqt/forms/debug.py deleted file mode 120000 index eeb139524..000000000 --- a/qt/aqt/forms/debug.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/debug.py \ No newline at end of file diff --git a/qt/aqt/forms/debug.py b/qt/aqt/forms/debug.py new file mode 100644 index 000000000..e4bcd75c1 --- /dev/null +++ b/qt/aqt/forms/debug.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .debug_qt6 import * +else: + from .debug_qt5 import * # type: ignore diff --git a/qt/aqt/forms/debug_qt6.py b/qt/aqt/forms/debug_qt6.py new file mode 120000 index 000000000..29accf4d0 --- /dev/null +++ b/qt/aqt/forms/debug_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/debug_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/editaddon.py b/qt/aqt/forms/editaddon.py deleted file mode 120000 index 1f692c333..000000000 --- a/qt/aqt/forms/editaddon.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/editaddon.py \ No newline at end of file diff --git a/qt/aqt/forms/editaddon.py b/qt/aqt/forms/editaddon.py new file mode 100644 index 000000000..da7a02b89 --- /dev/null +++ b/qt/aqt/forms/editaddon.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .editaddon_qt6 import * +else: + from .editaddon_qt5 import * # type: ignore diff --git a/qt/aqt/forms/editaddon_qt6.py b/qt/aqt/forms/editaddon_qt6.py new file mode 120000 index 000000000..61a93235e --- /dev/null +++ b/qt/aqt/forms/editaddon_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/editaddon_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/editcurrent.py b/qt/aqt/forms/editcurrent.py deleted file mode 120000 index 7298dc774..000000000 --- a/qt/aqt/forms/editcurrent.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/editcurrent.py \ No newline at end of file diff --git a/qt/aqt/forms/editcurrent.py b/qt/aqt/forms/editcurrent.py new file mode 100644 index 000000000..a9f03c6ea --- /dev/null +++ b/qt/aqt/forms/editcurrent.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .editcurrent_qt6 import * +else: + from .editcurrent_qt5 import * # type: ignore diff --git a/qt/aqt/forms/editcurrent_qt6.py b/qt/aqt/forms/editcurrent_qt6.py new file mode 120000 index 000000000..182216a50 --- /dev/null +++ b/qt/aqt/forms/editcurrent_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/editcurrent_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/edithtml.py b/qt/aqt/forms/edithtml.py deleted file mode 120000 index 865dee6af..000000000 --- a/qt/aqt/forms/edithtml.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/edithtml.py \ No newline at end of file diff --git a/qt/aqt/forms/edithtml.py b/qt/aqt/forms/edithtml.py new file mode 100644 index 000000000..92f792344 --- /dev/null +++ b/qt/aqt/forms/edithtml.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .edithtml_qt6 import * +else: + from .edithtml_qt5 import * # type: ignore diff --git a/qt/aqt/forms/edithtml_qt6.py b/qt/aqt/forms/edithtml_qt6.py new file mode 120000 index 000000000..4d5732294 --- /dev/null +++ b/qt/aqt/forms/edithtml_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/edithtml_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/emptycards.py b/qt/aqt/forms/emptycards.py deleted file mode 120000 index 7a520f0d4..000000000 --- a/qt/aqt/forms/emptycards.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/emptycards.py \ No newline at end of file diff --git a/qt/aqt/forms/emptycards.py b/qt/aqt/forms/emptycards.py new file mode 100644 index 000000000..616ea2ed4 --- /dev/null +++ b/qt/aqt/forms/emptycards.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .emptycards_qt6 import * +else: + from .emptycards_qt5 import * # type: ignore diff --git a/qt/aqt/forms/emptycards_qt6.py b/qt/aqt/forms/emptycards_qt6.py new file mode 120000 index 000000000..7c3b36e0f --- /dev/null +++ b/qt/aqt/forms/emptycards_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/emptycards_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/exporting.py b/qt/aqt/forms/exporting.py deleted file mode 120000 index 46f6c94a9..000000000 --- a/qt/aqt/forms/exporting.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/exporting.py \ No newline at end of file diff --git a/qt/aqt/forms/exporting.py b/qt/aqt/forms/exporting.py new file mode 100644 index 000000000..2ce625bcd --- /dev/null +++ b/qt/aqt/forms/exporting.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .exporting_qt6 import * +else: + from .exporting_qt5 import * # type: ignore diff --git a/qt/aqt/forms/exporting_qt6.py b/qt/aqt/forms/exporting_qt6.py new file mode 120000 index 000000000..d3e88464f --- /dev/null +++ b/qt/aqt/forms/exporting_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/exporting_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/fields.py b/qt/aqt/forms/fields.py deleted file mode 120000 index ce2d542bd..000000000 --- a/qt/aqt/forms/fields.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/fields.py \ No newline at end of file diff --git a/qt/aqt/forms/fields.py b/qt/aqt/forms/fields.py new file mode 100644 index 000000000..2c1512701 --- /dev/null +++ b/qt/aqt/forms/fields.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .fields_qt6 import * +else: + from .fields_qt5 import * # type: ignore diff --git a/qt/aqt/forms/fields_qt6.py b/qt/aqt/forms/fields_qt6.py new file mode 120000 index 000000000..b404fab2c --- /dev/null +++ b/qt/aqt/forms/fields_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/fields_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/filtered_deck.py b/qt/aqt/forms/filtered_deck.py deleted file mode 120000 index 39713291a..000000000 --- a/qt/aqt/forms/filtered_deck.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/filtered_deck.py \ No newline at end of file diff --git a/qt/aqt/forms/filtered_deck.py b/qt/aqt/forms/filtered_deck.py new file mode 100644 index 000000000..48a9dd52e --- /dev/null +++ b/qt/aqt/forms/filtered_deck.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .filtered_deck_qt6 import * +else: + from .filtered_deck_qt5 import * # type: ignore diff --git a/qt/aqt/forms/filtered_deck_qt6.py b/qt/aqt/forms/filtered_deck_qt6.py new file mode 120000 index 000000000..0c8fa97de --- /dev/null +++ b/qt/aqt/forms/filtered_deck_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/filtered_deck_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/finddupes.py b/qt/aqt/forms/finddupes.py deleted file mode 120000 index fc7c7bf1d..000000000 --- a/qt/aqt/forms/finddupes.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/finddupes.py \ No newline at end of file diff --git a/qt/aqt/forms/finddupes.py b/qt/aqt/forms/finddupes.py new file mode 100644 index 000000000..4f7db20b3 --- /dev/null +++ b/qt/aqt/forms/finddupes.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .finddupes_qt6 import * +else: + from .finddupes_qt5 import * # type: ignore diff --git a/qt/aqt/forms/finddupes_qt6.py b/qt/aqt/forms/finddupes_qt6.py new file mode 120000 index 000000000..5951a4907 --- /dev/null +++ b/qt/aqt/forms/finddupes_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/finddupes_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/findreplace.py b/qt/aqt/forms/findreplace.py deleted file mode 120000 index 7d7e10e7a..000000000 --- a/qt/aqt/forms/findreplace.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/findreplace.py \ No newline at end of file diff --git a/qt/aqt/forms/findreplace.py b/qt/aqt/forms/findreplace.py new file mode 100644 index 000000000..1cdd2e075 --- /dev/null +++ b/qt/aqt/forms/findreplace.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .findreplace_qt6 import * +else: + from .findreplace_qt5 import * # type: ignore diff --git a/qt/aqt/forms/findreplace_qt6.py b/qt/aqt/forms/findreplace_qt6.py new file mode 120000 index 000000000..863e253d2 --- /dev/null +++ b/qt/aqt/forms/findreplace_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/findreplace_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/getaddons.py b/qt/aqt/forms/getaddons.py deleted file mode 120000 index 5acc58c23..000000000 --- a/qt/aqt/forms/getaddons.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/getaddons.py \ No newline at end of file diff --git a/qt/aqt/forms/getaddons.py b/qt/aqt/forms/getaddons.py new file mode 100644 index 000000000..262703bd6 --- /dev/null +++ b/qt/aqt/forms/getaddons.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .getaddons_qt6 import * +else: + from .getaddons_qt5 import * # type: ignore diff --git a/qt/aqt/forms/getaddons_qt6.py b/qt/aqt/forms/getaddons_qt6.py new file mode 120000 index 000000000..7898b6932 --- /dev/null +++ b/qt/aqt/forms/getaddons_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/getaddons_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/importing.py b/qt/aqt/forms/importing.py deleted file mode 120000 index 4d04d5af0..000000000 --- a/qt/aqt/forms/importing.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/importing.py \ No newline at end of file diff --git a/qt/aqt/forms/importing.py b/qt/aqt/forms/importing.py new file mode 100644 index 000000000..5dd58c0fc --- /dev/null +++ b/qt/aqt/forms/importing.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .importing_qt6 import * +else: + from .importing_qt5 import * # type: ignore diff --git a/qt/aqt/forms/importing_qt6.py b/qt/aqt/forms/importing_qt6.py new file mode 120000 index 000000000..f089cecd0 --- /dev/null +++ b/qt/aqt/forms/importing_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/importing_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/main.py b/qt/aqt/forms/main.py deleted file mode 120000 index 7d0246bd4..000000000 --- a/qt/aqt/forms/main.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/main.py \ No newline at end of file diff --git a/qt/aqt/forms/main.py b/qt/aqt/forms/main.py new file mode 100644 index 000000000..00a04ef13 --- /dev/null +++ b/qt/aqt/forms/main.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .main_qt6 import * +else: + from .main_qt5 import * # type: ignore diff --git a/qt/aqt/forms/main_qt6.py b/qt/aqt/forms/main_qt6.py new file mode 120000 index 000000000..ceeeaef2f --- /dev/null +++ b/qt/aqt/forms/main_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/main_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/modelopts.py b/qt/aqt/forms/modelopts.py deleted file mode 120000 index cb08b0791..000000000 --- a/qt/aqt/forms/modelopts.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/modelopts.py \ No newline at end of file diff --git a/qt/aqt/forms/modelopts.py b/qt/aqt/forms/modelopts.py new file mode 100644 index 000000000..f6166c8d4 --- /dev/null +++ b/qt/aqt/forms/modelopts.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .modelopts_qt6 import * +else: + from .modelopts_qt5 import * # type: ignore diff --git a/qt/aqt/forms/modelopts_qt6.py b/qt/aqt/forms/modelopts_qt6.py new file mode 120000 index 000000000..ffdc4f397 --- /dev/null +++ b/qt/aqt/forms/modelopts_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/modelopts_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/models.py b/qt/aqt/forms/models.py deleted file mode 120000 index 6f38bb2f7..000000000 --- a/qt/aqt/forms/models.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/models.py \ No newline at end of file diff --git a/qt/aqt/forms/models.py b/qt/aqt/forms/models.py new file mode 100644 index 000000000..ddb565a58 --- /dev/null +++ b/qt/aqt/forms/models.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .models_qt6 import * +else: + from .models_qt5 import * # type: ignore diff --git a/qt/aqt/forms/models_qt6.py b/qt/aqt/forms/models_qt6.py new file mode 120000 index 000000000..76fd177b2 --- /dev/null +++ b/qt/aqt/forms/models_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/models_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/preferences.py b/qt/aqt/forms/preferences.py deleted file mode 120000 index 15982ca41..000000000 --- a/qt/aqt/forms/preferences.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/preferences.py \ No newline at end of file diff --git a/qt/aqt/forms/preferences.py b/qt/aqt/forms/preferences.py new file mode 100644 index 000000000..0b31698eb --- /dev/null +++ b/qt/aqt/forms/preferences.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .preferences_qt6 import * +else: + from .preferences_qt5 import * # type: ignore diff --git a/qt/aqt/forms/preferences_qt6.py b/qt/aqt/forms/preferences_qt6.py new file mode 120000 index 000000000..c3cddef94 --- /dev/null +++ b/qt/aqt/forms/preferences_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/preferences_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/preview.py b/qt/aqt/forms/preview.py deleted file mode 120000 index 877162b89..000000000 --- a/qt/aqt/forms/preview.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/preview.py \ No newline at end of file diff --git a/qt/aqt/forms/preview.py b/qt/aqt/forms/preview.py new file mode 100644 index 000000000..f20222c81 --- /dev/null +++ b/qt/aqt/forms/preview.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .preview_qt6 import * +else: + from .preview_qt5 import * # type: ignore diff --git a/qt/aqt/forms/preview_qt6.py b/qt/aqt/forms/preview_qt6.py new file mode 120000 index 000000000..ebd0c6300 --- /dev/null +++ b/qt/aqt/forms/preview_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/preview_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/profiles.py b/qt/aqt/forms/profiles.py deleted file mode 120000 index 9643ad8ae..000000000 --- a/qt/aqt/forms/profiles.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/profiles.py \ No newline at end of file diff --git a/qt/aqt/forms/profiles.py b/qt/aqt/forms/profiles.py new file mode 100644 index 000000000..55c9b6784 --- /dev/null +++ b/qt/aqt/forms/profiles.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .profiles_qt6 import * +else: + from .profiles_qt5 import * # type: ignore diff --git a/qt/aqt/forms/profiles_qt6.py b/qt/aqt/forms/profiles_qt6.py new file mode 120000 index 000000000..e16ba8816 --- /dev/null +++ b/qt/aqt/forms/profiles_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/profiles_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/progress.py b/qt/aqt/forms/progress.py deleted file mode 120000 index 22dd1eb4a..000000000 --- a/qt/aqt/forms/progress.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/progress.py \ No newline at end of file diff --git a/qt/aqt/forms/progress.py b/qt/aqt/forms/progress.py new file mode 100644 index 000000000..2af563f54 --- /dev/null +++ b/qt/aqt/forms/progress.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .progress_qt6 import * +else: + from .progress_qt5 import * # type: ignore diff --git a/qt/aqt/forms/progress_qt6.py b/qt/aqt/forms/progress_qt6.py new file mode 120000 index 000000000..596cba869 --- /dev/null +++ b/qt/aqt/forms/progress_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/progress_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/reposition.py b/qt/aqt/forms/reposition.py deleted file mode 120000 index 68a9c20b5..000000000 --- a/qt/aqt/forms/reposition.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/reposition.py \ No newline at end of file diff --git a/qt/aqt/forms/reposition.py b/qt/aqt/forms/reposition.py new file mode 100644 index 000000000..8f35e51cd --- /dev/null +++ b/qt/aqt/forms/reposition.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .reposition_qt6 import * +else: + from .reposition_qt5 import * # type: ignore diff --git a/qt/aqt/forms/reposition_qt6.py b/qt/aqt/forms/reposition_qt6.py new file mode 120000 index 000000000..a0b8c335f --- /dev/null +++ b/qt/aqt/forms/reposition_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/reposition_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/setgroup.py b/qt/aqt/forms/setgroup.py deleted file mode 120000 index e3227b7a9..000000000 --- a/qt/aqt/forms/setgroup.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/setgroup.py \ No newline at end of file diff --git a/qt/aqt/forms/setgroup.py b/qt/aqt/forms/setgroup.py new file mode 100644 index 000000000..c04c3d627 --- /dev/null +++ b/qt/aqt/forms/setgroup.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .setgroup_qt6 import * +else: + from .setgroup_qt5 import * # type: ignore diff --git a/qt/aqt/forms/setgroup_qt6.py b/qt/aqt/forms/setgroup_qt6.py new file mode 120000 index 000000000..7d7f72a1b --- /dev/null +++ b/qt/aqt/forms/setgroup_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/setgroup_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/setlang.py b/qt/aqt/forms/setlang.py deleted file mode 120000 index ae38ab548..000000000 --- a/qt/aqt/forms/setlang.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/setlang.py \ No newline at end of file diff --git a/qt/aqt/forms/setlang.py b/qt/aqt/forms/setlang.py new file mode 100644 index 000000000..10107e5c0 --- /dev/null +++ b/qt/aqt/forms/setlang.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .setlang_qt6 import * +else: + from .setlang_qt5 import * # type: ignore diff --git a/qt/aqt/forms/setlang_qt6.py b/qt/aqt/forms/setlang_qt6.py new file mode 120000 index 000000000..50ec3d564 --- /dev/null +++ b/qt/aqt/forms/setlang_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/setlang_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/stats.py b/qt/aqt/forms/stats.py deleted file mode 120000 index 9ba8aa2d0..000000000 --- a/qt/aqt/forms/stats.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/stats.py \ No newline at end of file diff --git a/qt/aqt/forms/stats.py b/qt/aqt/forms/stats.py new file mode 100644 index 000000000..a2e5be948 --- /dev/null +++ b/qt/aqt/forms/stats.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .stats_qt6 import * +else: + from .stats_qt5 import * # type: ignore diff --git a/qt/aqt/forms/stats_qt6.py b/qt/aqt/forms/stats_qt6.py new file mode 120000 index 000000000..156dd54a4 --- /dev/null +++ b/qt/aqt/forms/stats_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/stats_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/studydeck.py b/qt/aqt/forms/studydeck.py deleted file mode 120000 index 4dbf7513a..000000000 --- a/qt/aqt/forms/studydeck.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/studydeck.py \ No newline at end of file diff --git a/qt/aqt/forms/studydeck.py b/qt/aqt/forms/studydeck.py new file mode 100644 index 000000000..00f2ee6b7 --- /dev/null +++ b/qt/aqt/forms/studydeck.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .studydeck_qt6 import * +else: + from .studydeck_qt5 import * # type: ignore diff --git a/qt/aqt/forms/studydeck_qt6.py b/qt/aqt/forms/studydeck_qt6.py new file mode 120000 index 000000000..224c0d594 --- /dev/null +++ b/qt/aqt/forms/studydeck_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/studydeck_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/synclog.py b/qt/aqt/forms/synclog.py deleted file mode 120000 index fff84ce3b..000000000 --- a/qt/aqt/forms/synclog.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/synclog.py \ No newline at end of file diff --git a/qt/aqt/forms/synclog.py b/qt/aqt/forms/synclog.py new file mode 100644 index 000000000..efc0d6f71 --- /dev/null +++ b/qt/aqt/forms/synclog.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .synclog_qt6 import * +else: + from .synclog_qt5 import * # type: ignore diff --git a/qt/aqt/forms/synclog_qt6.py b/qt/aqt/forms/synclog_qt6.py new file mode 120000 index 000000000..26c206838 --- /dev/null +++ b/qt/aqt/forms/synclog_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/synclog_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/taglimit.py b/qt/aqt/forms/taglimit.py deleted file mode 120000 index b0edb113d..000000000 --- a/qt/aqt/forms/taglimit.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/taglimit.py \ No newline at end of file diff --git a/qt/aqt/forms/taglimit.py b/qt/aqt/forms/taglimit.py new file mode 100644 index 000000000..2ee3398d5 --- /dev/null +++ b/qt/aqt/forms/taglimit.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .taglimit_qt6 import * +else: + from .taglimit_qt5 import * # type: ignore diff --git a/qt/aqt/forms/taglimit_qt6.py b/qt/aqt/forms/taglimit_qt6.py new file mode 120000 index 000000000..f340c989b --- /dev/null +++ b/qt/aqt/forms/taglimit_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/taglimit_qt6.py \ No newline at end of file diff --git a/qt/aqt/forms/template.py b/qt/aqt/forms/template.py deleted file mode 120000 index 9afe0aac7..000000000 --- a/qt/aqt/forms/template.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel-bin/qt/aqt/forms/template.py \ No newline at end of file diff --git a/qt/aqt/forms/template.py b/qt/aqt/forms/template.py new file mode 100644 index 000000000..73a332c0a --- /dev/null +++ b/qt/aqt/forms/template.py @@ -0,0 +1,5 @@ +from aqt.qt import qtmajor +if qtmajor > 5: + from .template_qt6 import * +else: + from .template_qt5 import * # type: ignore diff --git a/qt/aqt/forms/template_qt6.py b/qt/aqt/forms/template_qt6.py new file mode 120000 index 000000000..284420bf2 --- /dev/null +++ b/qt/aqt/forms/template_qt6.py @@ -0,0 +1 @@ +../../../bazel-bin/qt/aqt/forms/template_qt6.py \ No newline at end of file diff --git a/qt/mypy.ini b/qt/mypy.ini index bb304e0f4..c8dcf12e9 100644 --- a/qt/mypy.ini +++ b/qt/mypy.ini @@ -64,9 +64,11 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-aqt.forms.*] -disallow_untyped_defs=false +disallow_untyped_defs = false + [mypy-anki.*] disallow_untyped_defs=false [mypy-PyQt6.*] -ignore_errors = True \ No newline at end of file +ignore_errors = True +ignore_missing_imports = True