Skip to content
Snippets Groups Projects
Commit e9384a9f authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

Boost Python String conversion causes problems with Boost 1.65.

Tested with Boost 1.53 on CentOS 7.5 so it still works with old Boost.
parent 76edff0c
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,8 @@ void MainThreadRunner::Run(const QString& widget)
PyGILState_STATE gstate = PyGILState_Ensure();
bp::object main_module = bp::import("__main__");
bp::object main_namespace = main_module.attr("__dict__");
bp::exec(bp::str("Proxy._widget_=QtGui."+widget.toStdString()+"()\n"),main_namespace,main_namespace);
std::string cmd = "Proxy._widget_=QtGui." + widget.toStdString() + "()\n";
bp::exec(cmd.c_str(), main_namespace, main_namespace);
PyGILState_Release(gstate);
}
......
......@@ -126,7 +126,7 @@ void PythonInterpreterWorker::run_command_(std::pair<unsigned int,QString> pair)
handle_redirector_output(QString::fromStdString(rstring)+"\n");
}
} else {
bp::exec(bp::str(command.toStdString()),main_namespace_,main_namespace_);
bp::exec(command.toStdString().c_str(), main_namespace_, main_namespace_);
}
output_redirector_->Flush();
error_redirector_->Flush();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment