- fix: Option 'Pause after run in console' for tools doesn't work.
This commit is contained in:
parent
5b77c6f3fb
commit
5b328f1e1a
1
NEWS.md
1
NEWS.md
|
@ -70,6 +70,7 @@ Red Panda C++ Version 2.27
|
||||||
- fix: '*=' is treadted as '*' when parsing.
|
- fix: '*=' is treadted as '*' when parsing.
|
||||||
- fix: Can't correctly retrieve function parameters type.
|
- fix: Can't correctly retrieve function parameters type.
|
||||||
- fix: Auto type induction for expression contains '[]' are not correct.
|
- fix: Auto type induction for expression contains '[]' are not correct.
|
||||||
|
- fix: Option 'Pause after run in console' for tools doesn't work.
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
- enhancement: Code suggestion for embedded std::vectors.
|
- enhancement: Code suggestion for embedded std::vectors.
|
||||||
|
|
|
@ -36,12 +36,6 @@
|
||||||
#include <sys/posix_shm.h>
|
#include <sys/posix_shm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum RunProgramFlag {
|
|
||||||
RPF_PAUSE_CONSOLE = 0x0001,
|
|
||||||
RPF_REDIRECT_INPUT = 0x0002,
|
|
||||||
RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
|
|
||||||
};
|
|
||||||
|
|
||||||
CompilerManager::CompilerManager(QObject *parent) : QObject(parent),
|
CompilerManager::CompilerManager(QObject *parent) : QObject(parent),
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||||
mCompileMutex(),
|
mCompileMutex(),
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
#include "../utils.h"
|
#include "../utils.h"
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
|
enum RunProgramFlag {
|
||||||
|
RPF_PAUSE_CONSOLE = 0x0001,
|
||||||
|
RPF_REDIRECT_INPUT = 0x0002,
|
||||||
|
RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
|
||||||
|
};
|
||||||
|
|
||||||
class Runner;
|
class Runner;
|
||||||
class Project;
|
class Project;
|
||||||
class Compiler;
|
class Compiler;
|
||||||
|
|
|
@ -3443,9 +3443,15 @@ void MainWindow::updateTools()
|
||||||
+ LINE_BREAKER);
|
+ LINE_BREAKER);
|
||||||
file.close();
|
file.close();
|
||||||
if (item->pauseAfterExit) {
|
if (item->pauseAfterExit) {
|
||||||
|
QString sharedMemoryId = QUuid::createUuid().toString();
|
||||||
|
QStringList execArgs = QStringList{
|
||||||
|
QString::number(RPF_PAUSE_CONSOLE),
|
||||||
|
sharedMemoryId,
|
||||||
|
localizePath(file.fileName())
|
||||||
|
};
|
||||||
executeFile(
|
executeFile(
|
||||||
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
|
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
|
||||||
{"1", localizePath(file.fileName())},
|
execArgs,
|
||||||
workDir, file.fileName());
|
workDir, file.fileName());
|
||||||
} else {
|
} else {
|
||||||
executeFile(
|
executeFile(
|
||||||
|
@ -3456,9 +3462,15 @@ void MainWindow::updateTools()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (item->pauseAfterExit) {
|
if (item->pauseAfterExit) {
|
||||||
|
QString sharedMemoryId = QUuid::createUuid().toString();
|
||||||
|
QStringList execArgs = QStringList{
|
||||||
|
QString::number(RPF_PAUSE_CONSOLE),
|
||||||
|
sharedMemoryId,
|
||||||
|
localizePath(program)
|
||||||
|
};
|
||||||
executeFile(
|
executeFile(
|
||||||
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
|
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
|
||||||
QStringList{"1", program} + params,
|
execArgs + params,
|
||||||
workDir, "");
|
workDir, "");
|
||||||
} else {
|
} else {
|
||||||
executeFile(
|
executeFile(
|
||||||
|
|
Loading…
Reference in New Issue