musredit: improved path-file handling needed for musrview

This commit is contained in:
suter_a 2016-04-11 12:14:40 +02:00
parent 82ba938c2d
commit 2339ee9b80
2 changed files with 14 additions and 0 deletions

View File

@ -2186,6 +2186,9 @@ void PTextEdit::musrView()
cmd = str + " \"";
str = *fFilenames.find( currentEditor() );
int pos = str.lastIndexOf("/");
if (pos != -1)
str.remove(0, pos+1);
QString numStr;
numStr.setNum(fAdmin->getTimeout());
cmd += str + "\" --timeout " + numStr;
@ -2194,6 +2197,10 @@ void PTextEdit::musrView()
cmd += " &";
int status=system(cmd.toLatin1());
if (status != 0) {
cerr << "**WARNING** musrView: something went wrong ..." << endl;
}
}
//----------------------------------------------------------------------------------------------------

View File

@ -2184,6 +2184,9 @@ void PTextEdit::musrView()
cmd = str + " \"";
str = *fFilenames.find( currentEditor() );
int pos = str.lastIndexOf("/");
if (pos != -1)
str.remove(0, pos+1);
QString numStr;
numStr.setNum(fAdmin->getTimeout());
cmd += str + "\" --timeout " + numStr;
@ -2192,6 +2195,10 @@ void PTextEdit::musrView()
cmd += " &";
int status=system(cmd.toLatin1());
if (status != 0) {
cerr << "**WARNING** musrView: something went wrong ..." << endl;
}
}
//----------------------------------------------------------------------------------------------------