qt5base-lts/tests/auto
Ahmad Samir 9547ef58c7 QMimeDatabase: handle glob-deleteall tags
According to the Freedesktop spec[1], a mimetype that has glob-deleteall
overwrites other glob-pattern definitions for a mimetype if it is in a
higher precedence dir, the default order is (from high to low)
~/.local/share/mime, /usr/local/share/mime, /usr/share/mime. Or if the
XDG_DATA_DIRS env var is set, then it takes precedence. The
QMime*ProviderS in m_providers are constructed/stored in that same
order, high to low).

For QMimeXMLProvider, we can just clear the glob patterns associated
with those mimetypes from the lists/maps. For the QMimeBinaryProvider
however, we can't change the binary (mmap'ed) cache file, instead check
mimetype names against the exclusion list before modifying a
QMimeGlobMatchResult.

[1] https://specifications.freedesktop.org/shared-mime-info-spec/latest/ar01s02.html

This test uses XDG_DATA_DIRS so only viable when USE_XDG_DATA_DIRS is
defined.

Fixes: QTBUG-101755
Pick-to: 6.5
Change-Id: Icadbdf1027155296377c5a6ab3be8e41b6668325
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-05-07 14:29:17 +03:00
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake Introduce the qt_internal_project_setup macro 2023-04-24 14:20:25 +02:00
concurrent tst_qtconcurrentrun: fix UB (uninit'ed values) 2023-03-31 11:32:46 +02:00
corelib QMimeDatabase: handle glob-deleteall tags 2023-05-07 14:29:17 +03:00
dbus QDBusServer: Fix potential crash when private pointer is null 2023-05-02 14:54:19 +02:00
gui Make tst_QFont::italicOblique failures easier to debug 2023-05-04 15:05:18 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Update public suffix list 2023-05-04 17:40:33 +00:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Network tests: drop testing ftp proxy server 2023-04-20 16:10:03 +02:00
printsupport tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql QSqlField: add move ctor & move operator 2023-04-26 19:56:07 +00:00
testlib Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00
tools test: Don't remove macdeployqt test directory when debugging test 2023-05-05 19:05:08 +02:00
wasm Support filter list for file input when opening a file on WASM 2023-03-07 12:50:41 +01:00
widgets Use boolean to indicate QTableWidgetItem is header item 2023-05-05 05:28:19 +00:00
xml QDomDocument: no longer drop a provided 'standalone' attribute if 'no' 2023-04-24 21:49:29 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00