PICARD-2331: Upgrade to PyQt6

This commit is contained in:
Philipp Wolfer
2022-06-08 21:56:03 +02:00
parent f95f3ead9a
commit 7d55ae5e5d
156 changed files with 766 additions and 685 deletions

View File

@@ -57,16 +57,11 @@ mv "$APP_BUNDLE.tmp" "$APP_BUNDLE"
# Fix placing text files in Resources instead of Contents to avoid signatures ending up in extended attributes.
# This fixes the signature breaking if extended attributes get removed or modified.
# Fixes https://tickets.metabrainz.org/browse/PICARD-1943 and related issues.
echo "Fixing location of Qt5 translation resources for code signing..."
if [[ -d "$APP_BUNDLE/Contents/MacOS/PyQt5/Qt5/" ]]; then
QT5_DIR=Qt5
else # For older PyQt5 installs
QT5_DIR=Qt
fi
mkdir "$APP_BUNDLE/Contents/Resources/$QT5_DIR/"
mv "$APP_BUNDLE/Contents/MacOS/PyQt5/$QT5_DIR/translations" "$APP_BUNDLE/Contents/Resources/$QT5_DIR/"
pushd "$APP_BUNDLE/Contents/MacOS/PyQt5/$QT5_DIR/"
ln -s "../../../Resources/$QT5_DIR/translations" .
echo "Fixing location of Qt6 translation resources for code signing..."
mkdir "$APP_BUNDLE/Contents/Resources/Qt6/"
mv "$APP_BUNDLE/Contents/MacOS/PyQt6/Qt6/translations" "$APP_BUNDLE/Contents/Resources/Qt6/"
pushd "$APP_BUNDLE/Contents/MacOS/PyQt6/Qt6/"
ln -s "../../../Resources/Qt6/translations" .
popd
# Mitigate libwebp vulnerability allowing for arbitrary code execution (CVE-2023-4863).

View File

@@ -139,7 +139,7 @@ def parse_file(path, encoding='utf-8'):
authors_from_file = {}
fix_header_pattern = re.compile(r'^(?:#|/\*|//)\s+(fix-header:)\s*(.*)$', re.IGNORECASE)
skip_pattern = re.compile(r'^(?:#|/\*|//)\s+(Automatically\s+generated|Created\s+by:\s+The\s+Resource\s+Compiler\s+for\s+PyQt5)', re.IGNORECASE)
skip_pattern = re.compile(r'^(?:#|/\*|//)\s+(Automatically\s+generated|Created\s+by:\s+The\s+Resource\s+Compiler\s+for\s+PyQt6)', re.IGNORECASE)
with open(path, encoding=encoding) as f:
lines = f.readlines()
found = defaultdict(lambda: None)