MACOS remove static path "/Library/Frameworks/Python.framework/Versions/
    *" for launching  qet_tb_generator plugin
This commit is contained in:
Laurent Trinques
2020-04-05 09:45:26 +02:00
parent f8e0b499f3
commit 4774389ee0

View File

@@ -2234,6 +2234,14 @@ void QETDiagramEditor::generateTerminalBlock()
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
//process->start("qet_tb_generator");
#ifdef Q_OS_MACOS
if (openedProjects().count()){
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.8/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.8/bin/qet_tb_generator");
}
#else
if (openedProjects().count()){
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
@@ -2241,6 +2249,7 @@ void QETDiagramEditor::generateTerminalBlock()
success = process->startDetached("qet_tb_generator");
}
#endif
if ( !success ) {
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
QMessageBox::warning(nullptr,