cement: If console pauser doesn't exist, warn and stop running programs.
This commit is contained in:
parent
e161ec42ae
commit
9af7c736d9
1
NEWS.md
1
NEWS.md
|
@ -7,6 +7,7 @@ Red Panda C++ Version 0.13.3
|
||||||
- fix: symbols defind locally should be sorted to the front in the code suggestion popup list
|
- fix: symbols defind locally should be sorted to the front in the code suggestion popup list
|
||||||
- fix: when show function tips, can't correctly calcuate the current position in the function param list
|
- fix: when show function tips, can't correctly calcuate the current position in the function param list
|
||||||
- fix: app will become very slow when processing very long lines.
|
- fix: app will become very slow when processing very long lines.
|
||||||
|
- enhancement: If console pauser doesn't exist, warn and stop running programs.
|
||||||
|
|
||||||
Red Panda C++ Version 0.13.2
|
Red Panda C++ Version 0.13.2
|
||||||
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly
|
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly
|
||||||
|
|
|
@ -248,16 +248,25 @@ void CompilerManager::run(const QString &filename, const QString &arguments, con
|
||||||
#else
|
#else
|
||||||
QString newArguments;
|
QString newArguments;
|
||||||
if (consoleFlag!=0) {
|
if (consoleFlag!=0) {
|
||||||
|
QString consolePauserPath=includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"consolepauser";
|
||||||
|
if (!fileExists(consolePauserPath)) {
|
||||||
|
QMessageBox::critical(pMainWindow,
|
||||||
|
tr("Can't find Console Pauser"),
|
||||||
|
tr("Console Pauser \"%1\" doesn't exists!")
|
||||||
|
.arg(consolePauserPath));
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
if (redirectInput) {
|
if (redirectInput) {
|
||||||
newArguments = QString(" -e \"%1\" %2 \"%3\" \"%4\" %5")
|
newArguments = QString(" -e \"%1\" %2 \"%3\" \"%4\" %5")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"consolepauser")
|
.arg(consolePauserPath)
|
||||||
.arg(consoleFlag)
|
.arg(consoleFlag)
|
||||||
.arg(redirectInputFilename)
|
.arg(redirectInputFilename)
|
||||||
.arg(localizePath(filename))
|
.arg(localizePath(filename))
|
||||||
.arg(arguments);
|
.arg(arguments);
|
||||||
} else {
|
} else {
|
||||||
newArguments = QString(" -e \"%1\" %2 \"%3\" %4")
|
newArguments = QString(" -e \"%1\" %2 \"%3\" %4")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"consolepauser")
|
.arg(consolePauserPath)
|
||||||
.arg(consoleFlag)
|
.arg(consoleFlag)
|
||||||
.arg(localizePath(filename)).arg(arguments);
|
.arg(localizePath(filename)).arg(arguments);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ void ExecutableRunner::run()
|
||||||
mProcess = std::make_shared<QProcess>();
|
mProcess = std::make_shared<QProcess>();
|
||||||
mProcess->setProgram(mFilename);
|
mProcess->setProgram(mFilename);
|
||||||
mProcess->setArguments(splitProcessCommand(mArguments));
|
mProcess->setArguments(splitProcessCommand(mArguments));
|
||||||
|
qDebug()<<splitProcessCommand(mArguments);
|
||||||
mProcess->setWorkingDirectory(mWorkDir);
|
mProcess->setWorkingDirectory(mWorkDir);
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
QString path = env.value("PATH");
|
QString path = env.value("PATH");
|
||||||
|
|
Loading…
Reference in New Issue