mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 02:39:08 -07:00
dev-qt/qtbase: backport fix for shared-mime-info-2.5
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
22
dev-qt/qtbase/files/qtbase-6.11.2-mimeinfo2.5.patch
Normal file
22
dev-qt/qtbase/files/qtbase-6.11.2-mimeinfo2.5.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
https://bugs.kde.org/show_bug.cgi?id=522948
|
||||
https://codereview.qt-project.org/c/qt/qtbase/+/765860
|
||||
--- a/src/corelib/mimetypes/qmimedatabase.cpp
|
||||
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
|
||||
@@ -270,5 +270,2 @@
|
||||
const QStringView myGroup = QStringView{mimeTypeName}.left(mimeTypeName.indexOf(u'/'));
|
||||
- // All text/* types are subclasses of text/plain.
|
||||
- if (myGroup == "text"_L1 && mimeTypeName != plainTextMimeType())
|
||||
- return plainTextMimeType();
|
||||
// All real-file mimetypes implicitly derive from application/octet-stream
|
||||
@@ -297,2 +294,11 @@
|
||||
provider->addParents(mimeName, result);
|
||||
+
|
||||
+ // Implicit rule from the spec: all text/* types are subclasses of text/plain. It holds even
|
||||
+ // for types that declare other parents, and shared-mime-info >= 2.5 relies on that rather
|
||||
+ // than listing text/plain (e.g. text/x-shellscript only declares application/x-executable).
|
||||
+ if (mimeName.startsWith("text/"_L1) && mimeName != plainTextMimeType()
|
||||
+ && !result.contains(plainTextMimeType())) {
|
||||
+ result.append(plainTextMimeType());
|
||||
+ }
|
||||
+
|
||||
if (result.isEmpty()) {
|
||||
@@ -189,6 +189,7 @@ PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.8.2-cross.patch
|
||||
"${FILESDIR}"/${PN}-6.9.0-no-direct-extern-access.patch
|
||||
"${FILESDIR}"/${PN}-6.11.2-QTBUG-149431.patch
|
||||
"${FILESDIR}"/${PN}-6.11.2-mimeinfo2.5.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
Reference in New Issue
Block a user