aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-09-02 10:35:54 +0200
committerEike Ziller <eike.ziller@qt.io>2024-09-20 10:35:46 +0000
commit36dca9eb8c0018b6a3cb802e35a9ce3f36786ef8 (patch)
treeb54b18267fa4987c5c3ece775a1b405230f9ff94 /src/plugins/python/pythonutils.cpp
parent914b7fab4fafbc3fe343b6609ba10f95f3c44e9b (diff)
Change the mime database to Apache Tika
qtbase/2d2975bd9fb32bb6dc50c7f513cbe00337fc16b0 Change the mimetype database embedded into QtCore Like before, this is a copy from Qt, because we do not want to depend on Qt versions for this and also always use the embedded database and never system ones on Linux, so we get something deterministic. Add some MIME types that are missing in the Tika database to corresponding plugins. Fixes: QTCREATORBUG-31272 Change-Id: I5c1ff5d7c5f22bb1276570195b0719beb5268925 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index 87156e3b9cc..04144a3e41b 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -98,7 +98,7 @@ static QStringList replImportArgs(const FilePath &pythonFile, ReplType type)
? MimeTypes()
: mimeTypesForFileName(pythonFile.toString());
const bool isPython = Utils::anyOf(mimeTypes, [](const MimeType &mt) {
- return mt.inherits("text/x-python") || mt.inherits("text/x-python3");
+ return mt.inherits(Constants::C_PY_MIMETYPE) || mt.inherits(Constants::C_PY3_MIMETYPE);
});
if (type == ReplType::Unmodified || !isPython)
return {};