Commit faacf1ce authored by Nikita Sirgienko's avatar Nikita Sirgienko

[Python] Remove python server path from settings

parent 2acb346a
......@@ -99,7 +99,7 @@ KConfigSkeleton* PythonBackend::config() const
bool PythonBackend::requirementsFullfilled(QString* const reason) const
{
const QString& path = PythonSettings::pythonServerPath().toLocalFile();
const QString& path = QStandardPaths::findExecutable(QLatin1String("cantor_pythonserver"));
return Cantor::Backend::checkExecutable(QLatin1String("Cantor Python Server"), path, reason);
}
......
......@@ -6,10 +6,6 @@
<include>QStandardPaths</include>
<kcfgfile name="cantorrc"/>
<group name="PythonBackend">
<entry name="pythonServerPath" type="Url">
<label>Path to Cantor python server executable</label>
<default code="true">QUrl::fromLocalFile(QStandardPaths::findExecutable(QLatin1String("cantor_pythonserver")))</default>
</entry>
<entry name="localDoc" type="Url">
<label>Url to the local Python documentation</label>
</entry>
......
......@@ -79,11 +79,12 @@ void PythonSession::login()
m_process = new QProcess(this);
m_process->setProcessChannelMode(QProcess::ForwardedErrorChannel);
const QString& serverExecutablePath = QStandardPaths::findExecutable(QLatin1String("cantor_pythonserver"));
#ifdef Q_OS_WIN
// On Windows QProcess can't handle paths with spaces, so add escaping
m_process->start(QLatin1String("\"") + PythonSettings::pythonServerPath().toLocalFile() + QLatin1String("\""));
m_process->start(QLatin1String("\"") + serverExecutablePath + QLatin1String("\""));
#else
m_process->start(PythonSettings::pythonServerPath().toLocalFile());
m_process->start(serverExecutablePath);
#endif
m_process->waitForStarted();
......
......@@ -11,9 +11,6 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="3">
<widget class="KUrlRequester" name="kcfg_pythonServerPath"/>
</item>
<item row="1" column="3">
<widget class="KUrlRequester" name="kcfg_localDoc">
<property name="toolTip">
......@@ -155,13 +152,6 @@
</property>
</spacer>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label3">
<property name="text">
<string>Executable:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label2">
<property name="toolTip">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment