forked from qt-creator/qt-creator
Cope with Qt 5.14's dropping of the MIME type DB as a resource
The copy is still present on non-Linux systems, but is not accessible as a resource, so we must ship our own copy. Fixes: QTCREATORBUG-22636 Change-Id: Ie7ae7616eadf4035bec6fffd15ac303c1d2badce Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Eike Ziller
parent
bcc41909c5
commit
64d2965e29
7
src/libs/3rdparty/xdg/README
vendored
Normal file
7
src/libs/3rdparty/xdg/README
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
This contains a copy of freedesktop.org's shared-mime-info base package.
|
||||
|
||||
Update instructions:
|
||||
|
||||
curl https://people.freedesktop.org/~hadess/shared-mime-info-{VERSION}.tar.xz | \
|
||||
xzcat | \
|
||||
tar -xO shared-mime-info-{VERSION}/freedestop.org.xml > freedesktop.org.xml
|
41233
src/libs/3rdparty/xdg/freedesktop.org.xml
vendored
Normal file
41233
src/libs/3rdparty/xdg/freedesktop.org.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -789,16 +789,9 @@ void MimeXMLProvider::ensureLoaded()
|
||||
QStandardPaths::LocateFile);
|
||||
|
||||
if (allFiles.isEmpty()) {
|
||||
// System freedesktop.org.xml file not found, try to use the one in QtCore.
|
||||
// This is private API and has changed in the past:
|
||||
// - Qt 5.11 added "package" subdir in 7a5644d6481a3c1a7416772998ca4e60c977bfbd
|
||||
// - Qt 5.13 added an option to not bundle it at all
|
||||
const QString fdoXml5_11 = QStringLiteral(":/qt-project.org/qmime/packages/freedesktop.org.xml");
|
||||
if (QFile::exists(fdoXml5_11))
|
||||
allFiles << fdoXml5_11;
|
||||
else
|
||||
qFatal("Utils::MimeXMLProvider: could not find the system freedesktop.org.xml file "
|
||||
"and QtCore does not have an accessible copy.");
|
||||
// System freedsktop.org.xml file not found, use our bundled copy
|
||||
const char freedesktopOrgXml[] = ":/utils/mimetypes/freedesktop.org.xml";
|
||||
allFiles.prepend(QLatin1String(freedesktopOrgXml));
|
||||
}
|
||||
|
||||
m_nameMimeTypeMap.clear();
|
||||
|
@@ -223,6 +223,7 @@
|
||||
<file>images/toggleprogressdetails@2x.png</file>
|
||||
<file>images/unknownfile.png</file>
|
||||
<file>images/dir.png</file>
|
||||
<file alias="mimetypes/freedesktop.org.xml" compression-algorithm="best">../3rdparty/xdg/freedesktop.org.xml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/codemodel">
|
||||
<file>images/enum.png</file>
|
||||
|
Reference in New Issue
Block a user