fix: anki anki-qt5 (#790)

* fix: anki anki-qt5

* Update anki-qt5.spec

Signed-off-by: madomado <madonuko@outlook.com>

* Update anki.spec

Signed-off-by: madomado <madonuko@outlook.com>

* idk

* yeah you too

---------

Signed-off-by: madomado <madonuko@outlook.com>
This commit is contained in:
madomado
2023-11-13 00:09:37 +08:00
committed by GitHub
parent dc20adc9d2
commit ed0d944976
5 changed files with 32 additions and 42 deletions
+8 -8
View File
@@ -1,20 +1,20 @@
diff -uNr anki-2.1.55.old/qt/aqt/qt/__init__.py anki-2.1.55/qt/aqt/qt/__init__.py
--- anki-2.1.55.old/qt/aqt/qt/__init__.py 2023-01-02 18:34:13.716216913 +0800
+++ anki-2.1.55/qt/aqt/qt/__init__.py 2023-01-02 18:34:00.410033708 +0800
@@ -9,16 +9,7 @@
--- a/qt/aqt/qt/__init__.py
+++ b/qt/aqt/qt/__init__.py
@@ -9,16 +9,7 @@ import sys
import traceback
from typing import Callable, TypeVar, Union
-try:
- import PyQt6
-except:
- from .qt5 import * # type: ignore
-else:
- if not os.getenv("DISABLE_QT5_COMPAT"):
- if os.getenv("ENABLE_QT5_COMPAT"):
- print("Running with temporary Qt5 compatibility shims.")
- print("Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.")
- from . import qt5_compat # needs to be imported first
- from .qt6 import *
-
+from .qt5 import * # type: ignore
from anki.utils import is_mac, is_win
# fix buggy ubuntu12.04 display of language selector
+12 -16
View File
@@ -1,17 +1,13 @@
diff -uNr anki-2.1.55.old/qt/aqt/profiles.py anki-2.1.55/qt/aqt/profiles.py
--- anki-2.1.55.old/qt/aqt/profiles.py 2023-01-02 18:35:44.574467892 +0800
+++ anki-2.1.55/qt/aqt/profiles.py 2023-01-02 18:34:00.412033736 +0800
@@ -77,11 +77,11 @@
diff --git a/qt/aqt/update.py b/qt/aqt/update.py
index 212ddf93d..6f716cc04 100644
--- a/qt/aqt/update.py
+++ b/qt/aqt/update.py
@@ -11,6 +11,8 @@ from aqt.utils import openLink, show_warning, showText, tr
metaConf = dict(
ver=0,
- updates=True,
+ updates=False,
created=int_time(),
id=random.randrange(0, 2**63),
lastMsg=-1,
- suppressUpdate=False,
+ suppressUpdate=True,
firstRun=True,
defaultLang=None,
)
def check_for_update() -> None:
+ return
+
from aqt import mw
def do_check(_col: Collection) -> CheckForUpdateResponse:
-1
View File
@@ -22,7 +22,6 @@ Anki is based on a theory called spaced repetition.
%prep
git clone https://github.com/ankitects/anki .
git checkout %version
%patch0 -p1
%patch1 -p1
# See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=anki-qt5
+12 -16
View File
@@ -1,17 +1,13 @@
diff -uNr anki-2.1.55.old/qt/aqt/profiles.py anki-2.1.55/qt/aqt/profiles.py
--- anki-2.1.55.old/qt/aqt/profiles.py 2023-01-02 18:35:44.574467892 +0800
+++ anki-2.1.55/qt/aqt/profiles.py 2023-01-02 18:34:00.412033736 +0800
@@ -77,11 +77,11 @@
diff --git a/qt/aqt/update.py b/qt/aqt/update.py
index 212ddf93d..6f716cc04 100644
--- a/qt/aqt/update.py
+++ b/qt/aqt/update.py
@@ -11,6 +11,8 @@ from aqt.utils import openLink, show_warning, showText, tr
metaConf = dict(
ver=0,
- updates=True,
+ updates=False,
created=int_time(),
id=random.randrange(0, 2**63),
lastMsg=-1,
- suppressUpdate=False,
+ suppressUpdate=True,
firstRun=True,
defaultLang=None,
)
def check_for_update() -> None:
+ return
+
from aqt import mw
def do_check(_col: Collection) -> CheckForUpdateResponse:
-1
View File
@@ -22,7 +22,6 @@ Anki is based on a theory called spaced repetition.
%prep
git clone https://github.com/ankitects/anki .
git checkout %{version}
%patch 0 -p1
# See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=anki