diff options
author | David Faure <david.faure@kdab.com> | 2023-11-15 12:47:56 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2023-11-20 17:21:20 +0100 |
commit | 64b6e6b85cdeafbd5b3b4a98dcaa6cdce21f7aa3 (patch) | |
tree | 273376132d3e8a42140f276d22068c06a67857c7 /tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp | |
parent | 969bef94549d5bceacd68f7524ce9122d5c7ccae (diff) |
QMimeDatabase: update freedesktop.org.xml to shared-mime-info 2.4
A severe incompatibility was detected in 2.3, which is why 2.4
is being released so soon afterwards. The mimetype for *.bz2 files
changed (from bzip to bzip2), breaking much code in KDE for instance.
This is now handled in a more compatible way. And the two last-minute
fixes in the Qt copy of 2.3 are part of 2.4, so this is now more in line
with upstream shared-mime-info.
Change-Id: Ibca358cf2ca9f341d148f54bb18044683c4a05eb
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp')
-rw-r--r-- | tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index d7db4bb9bf..b97e30642a 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -736,7 +736,7 @@ void tst_QMimeDatabase::allMimeTypes() QVERIFY(!lst.isEmpty()); // Hardcoding this is the only way to check both providers find the same number of mimetypes. - QCOMPARE(lst.size(), 888); + QCOMPARE(lst.size(), 908); for (const QMimeType &mime : lst) { const QString name = mime.name(); @@ -757,7 +757,9 @@ void tst_QMimeDatabase::suffixes_data() QTest::newRow("mimetype with a single pattern") << "application/pdf" << "*.pdf" << "pdf"; QTest::newRow("mimetype-with-multiple-patterns-kpr") << "application/x-kpresenter" << "*.kpr;*.kpt" << "kpr"; // The preferred suffix for image/jpeg is *.jpg, as per https://bugs.kde.org/show_bug.cgi?id=176737 - QTest::newRow("jpeg") << "image/jpeg" << "*.jpe;*.jpg;*.jpeg" << "jpg"; + QTest::newRow("jpeg") << "image/jpeg" + << "*.jfif;*.jpe;*.jpg;*.jpeg" + << "jpg"; QTest::newRow("mimetype with many patterns") << "application/vnd.wordperfect" << "*.wp;*.wp4;*.wp5;*.wp6;*.wpd;*.wpp" << "wp"; QTest::newRow("oasis text mimetype") << "application/vnd.oasis.opendocument.text" << "*.odt" << "odt"; QTest::newRow("oasis presentation mimetype") << "application/vnd.oasis.opendocument.presentation" << "*.odp" << "odp"; @@ -1270,7 +1272,7 @@ void tst_QMimeDatabase::installNewLocalMimeType() // QTBUG-116905: globPatterns() should merge all locations // add-extension.xml adds *.jnewext - const QStringList expectedJpegPatterns{ "*.jpg", "*.jpeg", "*.jpe", "*.jnewext" }; + const QStringList expectedJpegPatterns{ "*.jpg", "*.jpeg", "*.jpe", "*.jfif", "*.jnewext" }; QCOMPARE(db.mimeTypeForName(QStringLiteral("image/jpeg")).globPatterns(), expectedJpegPatterns); // Now that we have two directories with mime definitions, check that everything still works |