py3: web: gathering diff of py3-branch
76b3397762
ec9dcf7453d44ce21e6ab5e460293006a49e7ccc
11eb995a2e88df1125056403fb302ce85749f83c
This commit is contained in:
parent
99131438c6
commit
f94e1ff280
|
@ -110,7 +110,7 @@ PyObject* initModule()
|
|||
|
||||
|
||||
/* Python entry */
|
||||
PyMODINIT_FUNC initWebGui()
|
||||
PyMOD_INIT_FUNC(WebGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
|
|
|
@ -238,7 +238,8 @@ void BrowserView::onLinkClicked (const QUrl & url)
|
|||
QString ext = fi.completeSuffix();
|
||||
if (ext == QString::fromLatin1("py")) {
|
||||
try {
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"execfile('%s')",(const char*) fi.absoluteFilePath(). toLocal8Bit());
|
||||
// Gui::Command::doCommand(Gui::Command::Gui,"execfile('%s')",(const char*) fi.absoluteFilePath(). toLocal8Bit());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"exec(open('%s').read())",(const char*) fi.absoluteFilePath(). toLocal8Bit());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
QMessageBox::critical(this, tr("Error"), QString::fromUtf8(e.what()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user