musredit_qt5: adopted call of musrview such that it works under macOS 10.12
This commit is contained in:
parent
ea841ec186
commit
19d5c09b45
@ -2205,9 +2205,22 @@ void PTextEdit::musrView()
|
||||
if (fAdmin->getMusrviewShowFourierFlag())
|
||||
arg << "-f";
|
||||
|
||||
QProcess proc(this);
|
||||
if (!proc.startDetached(cmd, arg, workDir)) {
|
||||
QMessageBox::critical(this, "ERROR", "**ERROR** musrview process couldn't be launched properly, sorry.");
|
||||
QProcess *proc = new QProcess(this);
|
||||
|
||||
// make sure that the system environment variables are properly set
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" + env.value("LD_LIBRARY_PATH"));
|
||||
proc->setProcessEnvironment(env);
|
||||
proc->setWorkingDirectory(workDir);
|
||||
proc->start(cmd, arg);
|
||||
if (!proc->waitForStarted()) {
|
||||
// error handling
|
||||
QString msg(tr("Could not execute the output command: ")+cmd[0]);
|
||||
QMessageBox::critical( 0,
|
||||
tr("Fatal error"),
|
||||
msg,
|
||||
tr("Quit") );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user