Commit f45e34fe authored by Minh Ngo's avatar Minh Ngo
Browse files

Swapping getOutput & getError methods implementation.

They were placed incorrectly, so getError returned output,
and getOutput returned error.
parent 15694cdf
......@@ -40,18 +40,18 @@ void Python3Server::runPythonCommand(const QString& command) const
QString Python3Server::getError() const
{
PyObject *outputPython = PyObject_GetAttrString(m_pModule, "outputPythonBackend");
PyObject *output = PyObject_GetAttrString(outputPython, "value");
PyObject *errorPython = PyObject_GetAttrString(m_pModule, "errorPythonBackend");
PyObject *error = PyObject_GetAttrString(errorPython, "value");
return pyObjectToQString(output);
return pyObjectToQString(error);
}
QString Python3Server::getOutput() const
{
PyObject *errorPython = PyObject_GetAttrString(m_pModule, "errorPythonBackend");
PyObject *error = PyObject_GetAttrString(errorPython, "value");
PyObject *outputPython = PyObject_GetAttrString(m_pModule, "outputPythonBackend");
PyObject *output = PyObject_GetAttrString(outputPython, "value");
return pyObjectToQString(error);
return pyObjectToQString(output);
}
QString Python3Server::pyObjectToQString(PyObject* obj) const
......
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