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 <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2023-03-22 10:05:10 +01:00
parent 6079b7b378
commit 7014376aaa
3 changed files with 9 additions and 3 deletions

View File

@@ -30,12 +30,16 @@
\" <comment>Python module interface file</comment>\",
\" <glob pattern=\'*.pyi\'/>\",
\" </mime-type>\",
\" <mime-type type=\'text/x-python-project\'>\",
\" <mime-type type=\'text/x-pyqt-project\'>\",
\" <sub-class-of type=\'text/x-python\'/>\",
\" <comment>Qt Creator Python project file</comment>\",
\" <glob pattern=\'*.pyproject\'/>\",
\" <glob pattern=\'*.pyqtc\'/>\",
\" </mime-type>\",
\" <mime-type type=\'text/x-python-project\'>\",
\" <sub-class-of type=\'application/json\'/>\",
\" <comment>Qt Creator Python project file</comment>\",
\" <glob pattern=\'*.pyproject\'/>\",
\" </mime-type>\",
\"</mime-info>\"
]
}

View File

@@ -59,6 +59,7 @@ void PythonPlugin::initialize()
d = new PythonPluginPrivate;
ProjectManager::registerProjectType<PythonProject>(PythonMimeType);
ProjectManager::registerProjectType<PythonProject>(PythonMimeTypeLegacy);
JsonWizardFactory::registerPageFactory(new PythonWizardPageFactory);
}

View File

@@ -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";