Skip to content

Commit

Permalink
Try to fix false positive message box warning when launching process-
Browse files Browse the repository at this point in the history
>startDetached("qet_tb_generator")
Launch program "qet_tb_generator" by QET only when an project was open
  • Loading branch information
scorpio810 committed Oct 5, 2024
1 parent 5925301 commit e834244
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions sources/qetdiagrameditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2363,48 +2363,32 @@ void QETDiagramEditor::generateTerminalBlock()
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached("qet_tb_generator", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/Application Data/qet/qet_tb_generator.exe", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached(QDir::homePath() + "/Application Data/qet/qet_tb_generator.exe", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {(QETDiagramEditor::currentProjectView()->project()->filePath())});

}
else {
success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {("")});
success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}

#elif defined(Q_OS_MACOS)
if (openedProjects().count()){
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {("")});
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}


#else
if (openedProjects().count()){
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}

else {
success = process->startDetached("qet_tb_generator", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {("")});
}


#endif
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
Expand Down

0 comments on commit e834244

Please sign in to comment.