forked from qt-creator/qt-creator
Python: Wrap some file paths and kit name with quotes
Change-Id: If147eae864013d410239d69184cdb9a4bc4479eb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -108,15 +108,17 @@ public:
|
|||||||
result << BuildSystemTask(Task::Error, Tr::tr("No Python setup."));
|
result << BuildSystemTask(Task::Error, Tr::tr("No Python setup."));
|
||||||
} else if (!path.exists()) {
|
} else if (!path.exists()) {
|
||||||
result << BuildSystemTask(Task::Error,
|
result << BuildSystemTask(Task::Error,
|
||||||
Tr::tr("Python %1 not found.").arg(path.toUserOutput()));
|
Tr::tr("Python \"%1\" not found.").arg(path.toUserOutput()));
|
||||||
} else if (!path.isExecutableFile()) {
|
} else if (!path.isExecutableFile()) {
|
||||||
result << BuildSystemTask(Task::Error,
|
result << BuildSystemTask(Task::Error,
|
||||||
Tr::tr("Python %1 not executable.").arg(path.toUserOutput()));
|
Tr::tr("Python \"%1\" is not executable.")
|
||||||
|
.arg(path.toUserOutput()));
|
||||||
} else {
|
} else {
|
||||||
if (!pipIsUsable(path)) {
|
if (!pipIsUsable(path)) {
|
||||||
result << BuildSystemTask(
|
result << BuildSystemTask(
|
||||||
Task::Warning,
|
Task::Warning,
|
||||||
Tr::tr("Python %1 does not contain a usable pip. Pip is used to install python "
|
Tr::tr("Python \"%1\" does not contain a usable pip. Pip is used to install "
|
||||||
|
"python "
|
||||||
"packages from the Python Package Index, like PySide and the python "
|
"packages from the Python Package Index, like PySide and the python "
|
||||||
"language server. If you want to use any of that functionality "
|
"language server. If you want to use any of that functionality "
|
||||||
"ensure pip is installed for that python.")
|
"ensure pip is installed for that python.")
|
||||||
@@ -125,7 +127,8 @@ public:
|
|||||||
if (!venvIsUsable(path)) {
|
if (!venvIsUsable(path)) {
|
||||||
result << BuildSystemTask(
|
result << BuildSystemTask(
|
||||||
Task::Warning,
|
Task::Warning,
|
||||||
Tr::tr("Python %1 does not contain a usable venv. venv is the recommended way "
|
Tr::tr(
|
||||||
|
"Python \"%1\" does not contain a usable venv. venv is the recommended way "
|
||||||
"to isolate a development environment for a project from the globally "
|
"to isolate a development environment for a project from the globally "
|
||||||
"installed python.")
|
"installed python.")
|
||||||
.arg(path.toUserOutput()));
|
.arg(path.toUserOutput()));
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ Tasks PythonProject::projectIssues(const Kit *k) const
|
|||||||
{
|
{
|
||||||
if (PythonKitAspect::python(k))
|
if (PythonKitAspect::python(k))
|
||||||
return {};
|
return {};
|
||||||
return {BuildSystemTask{Task::Error,
|
return {
|
||||||
Tr::tr("No python interpreter set for kit %1").arg(k->displayName())}};
|
BuildSystemTask{Task::Error,
|
||||||
|
Tr::tr("No python interpreter set for kit \"%1\"").arg(k->displayName())}};
|
||||||
}
|
}
|
||||||
|
|
||||||
PythonProjectNode::PythonProjectNode(const FilePath &path)
|
PythonProjectNode::PythonProjectNode(const FilePath &path)
|
||||||
|
|||||||
Reference in New Issue
Block a user