From 7014376aaaafad1c17d2bfc265eb419aeb7c8f04 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 22 Mar 2023 10:05:10 +0100 Subject: [PATCH] Python: Tweak handling of python project files Improves the handling of the preferred python project file (*.pyproject) and makes use of the json support. Change-Id: I24d6e2c1d10899efacec0fc9b03660bb8f25dfe7 Reviewed-by: David Schulz --- src/plugins/python/Python.json.in | 8 ++++++-- src/plugins/python/pythonplugin.cpp | 1 + src/plugins/python/pythonproject.h | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/python/Python.json.in b/src/plugins/python/Python.json.in index 3e62d146313..98fd52ec8d5 100644 --- a/src/plugins/python/Python.json.in +++ b/src/plugins/python/Python.json.in @@ -30,12 +30,16 @@ \" Python module interface file\", \" \", \" \", - \" \", + \" \", \" \", \" Qt Creator Python project file\", - \" \", \" \", \" \", + \" \", + \" \", + \" Qt Creator Python project file\", + \" \", + \" \", \"\" ] } diff --git a/src/plugins/python/pythonplugin.cpp b/src/plugins/python/pythonplugin.cpp index 4728da37ae5..7eefbc5d4bd 100644 --- a/src/plugins/python/pythonplugin.cpp +++ b/src/plugins/python/pythonplugin.cpp @@ -59,6 +59,7 @@ void PythonPlugin::initialize() d = new PythonPluginPrivate; ProjectManager::registerProjectType(PythonMimeType); + ProjectManager::registerProjectType(PythonMimeTypeLegacy); JsonWizardFactory::registerPageFactory(new PythonWizardPageFactory); } diff --git a/src/plugins/python/pythonproject.h b/src/plugins/python/pythonproject.h index 0217a77b615..676e010a015 100644 --- a/src/plugins/python/pythonproject.h +++ b/src/plugins/python/pythonproject.h @@ -7,7 +7,8 @@ namespace Python::Internal { -const char PythonMimeType[] = "text/x-python-project"; // ### FIXME +const char PythonMimeType[] = "text/x-python-project"; +const char PythonMimeTypeLegacy[] = "text/x-pyqt-project"; const char PythonProjectId[] = "PythonProject"; const char PythonErrorTaskCategory[] = "Task.Category.Python";