forked from qt-creator/qt-creator
Python: avoid detecting pythonw on windows
Change-Id: I75fcba53fa671904405d3411409c6ea67335e81b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -661,25 +661,12 @@ static QList<Interpreter> pythonsFromRegistry()
|
|||||||
FilePath::fromUserInput(regVal.toString())};
|
FilePath::fromUserInput(regVal.toString())};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
regVal = pythonRegistry.value("InstallPath/WindowedExecutablePath");
|
|
||||||
if (regVal.isValid()) {
|
|
||||||
const FilePath &executable = FilePath::fromUserInput(regVal.toString());
|
|
||||||
if (executable.exists()) {
|
|
||||||
pythons << Interpreter{QUuid::createUuid().toString(),
|
|
||||||
//: <python display name> (Windowed)
|
|
||||||
Tr::tr("%1 (Windowed)").arg(name),
|
|
||||||
FilePath::fromUserInput(regVal.toString())};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
regVal = pythonRegistry.value("InstallPath/.");
|
regVal = pythonRegistry.value("InstallPath/.");
|
||||||
if (regVal.isValid()) {
|
if (regVal.isValid()) {
|
||||||
const FilePath &path = FilePath::fromUserInput(regVal.toString());
|
const FilePath &path = FilePath::fromUserInput(regVal.toString());
|
||||||
const FilePath python = path.pathAppended("python").withExecutableSuffix();
|
const FilePath python = path.pathAppended("python").withExecutableSuffix();
|
||||||
if (python.exists())
|
if (python.exists())
|
||||||
pythons << createInterpreter(python, "Python " + versionGroup);
|
pythons << createInterpreter(python, "Python " + versionGroup);
|
||||||
const FilePath pythonw = path.pathAppended("pythonw").withExecutableSuffix();
|
|
||||||
if (pythonw.exists())
|
|
||||||
pythons << createInterpreter(pythonw, "Python " + versionGroup, "(Windowed)");
|
|
||||||
}
|
}
|
||||||
pythonRegistry.endGroup();
|
pythonRegistry.endGroup();
|
||||||
}
|
}
|
||||||
@@ -697,10 +684,6 @@ static QList<Interpreter> pythonsFromPath()
|
|||||||
if (executable.exists())
|
if (executable.exists())
|
||||||
pythons << createInterpreter(executable, "Python from Path");
|
pythons << createInterpreter(executable, "Python from Path");
|
||||||
}
|
}
|
||||||
for (const FilePath &executable : FilePath("pythonw").searchAllInPath()) {
|
|
||||||
if (executable.exists())
|
|
||||||
pythons << createInterpreter(executable, "Python from Path", "(Windowed)");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const QStringList filters = {"python",
|
const QStringList filters = {"python",
|
||||||
"python[1-9].[0-9]",
|
"python[1-9].[0-9]",
|
||||||
|
|||||||
Reference in New Issue
Block a user