diff --git a/NEWS.md b/NEWS.md
index f83606ce..c3f0c740 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -91,6 +91,7 @@ Red Panda C++ Version 2.27
- enhancement: Auto define macro "_DEBUG" for "Debug" compiler set(like visual studio).
- enhancement: Suggest macro names after "#ifdef"/"#ifndef".
+ - enhancement: Info contents from stderr are logged into "Tools Output" panel, add problem case name info to the log.
Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors.
diff --git a/RedPandaIDE/compiler/ojproblemcasesrunner.cpp b/RedPandaIDE/compiler/ojproblemcasesrunner.cpp
index 3dc7c58e..245c697c 100644
--- a/RedPandaIDE/compiler/ojproblemcasesrunner.cpp
+++ b/RedPandaIDE/compiler/ojproblemcasesrunner.cpp
@@ -84,7 +84,7 @@ void OJProblemCasesRunner::runCase(int index,POJProblemCase problemCase)
env.insert("PATH",path);
process.setProcessEnvironment(env);
if (pSettings->executor().redirectStderrToToolLog()) {
- emit logStderrOutput("\n");
+ emit logStderrOutput("\n"+tr("--- stderr from %1 ---").arg(problemCase->name)+"\n");
} else {
process.setProcessChannelMode(QProcess::MergedChannels);
process.setReadChannel(QProcess::StandardOutput);
diff --git a/RedPandaIDE/compiler/ojproblemcasesrunner.h b/RedPandaIDE/compiler/ojproblemcasesrunner.h
index bc443388..c1e14b93 100644
--- a/RedPandaIDE/compiler/ojproblemcasesrunner.h
+++ b/RedPandaIDE/compiler/ojproblemcasesrunner.h
@@ -49,6 +49,9 @@ public:
void setMemoryLimit(size_t limit);
+ bool includeOutputFromStderr() const;
+ void setIncludeOutputFromStderr(bool newIncludeOutputFromStderr);
+
signals:
void caseStarted(const QString &caseId, int current, int total);
void caseFinished(const QString &caseId, int current, int total);
@@ -68,6 +71,7 @@ private:
int mOutputRefreshTime;
int mExecTimeout;
size_t mMemoryLimit;
+ bool mIncludeOutputFromStderr;
};
#endif // OJPROBLEMCASESRUNNER_H
diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
index 6fcee7db..98d5eca5 100644
--- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
@@ -1382,7 +1382,7 @@
-
+
@@ -1390,7 +1390,7 @@
Erro
-
+
Salvar como
@@ -1400,7 +1400,7 @@
Arquivo %1 já aberto!
-
+
O texto a ser copiado excede o limite do contador!
@@ -1432,7 +1432,7 @@
Ctrl+clik para mais informações
-
+
astyle não encontrado
@@ -1457,13 +1457,13 @@
Apenas leitura
-
+
Erro ao carregar arquivo
-
+
@@ -2907,18 +2907,18 @@
-
+
Impossível remover o antigo arquivo executável "%1".
-
+
Impossível encontrar o compilador para o arquivo %1
-
+
O compilador '%1' é inexistente!
@@ -2942,7 +2942,7 @@
-
+
@@ -2952,7 +2952,7 @@
-
+
Comando: %1
@@ -7345,7 +7345,12 @@
-
+
+
+
+
+
+
@@ -7674,7 +7679,7 @@
- Arquivo de recursos: %1
-
+
Compilando alterações em projeto ...
@@ -8374,7 +8379,7 @@
-
+
@@ -9676,7 +9681,7 @@
Impossível abrir '%1' para gravar!
-
+
Compilando alterações em projeto ...
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
index 82394379..5621a1db 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
@@ -1596,7 +1596,7 @@ p, li { white-space: pre-wrap; }
-
+
@@ -1608,7 +1608,7 @@ p, li { white-space: pre-wrap; }
无法写入文件"%1"
-
+
载入文件错误
@@ -1648,7 +1648,7 @@ p, li { white-space: pre-wrap; }
文件%1已经被打开!
-
+
要复制的内容超过了行数限制!
@@ -1694,7 +1694,7 @@ p, li { white-space: pre-wrap; }
未找到符号'%1'!
-
+
找不到astyle程序
@@ -3222,13 +3222,13 @@ p, li { white-space: pre-wrap; }
-
+
无法删除旧的可执行文件"%1".
-
+
GNU汇编
@@ -3239,7 +3239,7 @@ p, li { white-space: pre-wrap; }
找不到适合文件%1的编译器
-
+
编译器程序"%1"不存在!
@@ -7930,7 +7930,12 @@ p, li { white-space: pre-wrap; }
案例运行超时
-
+
+
+ --- 来自“%1”的stderr ---
+
+
+
运行时间超限!
@@ -8312,7 +8317,7 @@ p, li { white-space: pre-wrap; }
- 资源文件: %1
-
+
正在编译项目修改...
@@ -9234,7 +9239,7 @@ p, li { white-space: pre-wrap; }
生成调试信息(-g3)
-
+
您同意小熊猫C++在PATH路径中寻找gcc编译器吗?
@@ -10421,7 +10426,7 @@ p, li { white-space: pre-wrap; }
无法写入文件'%1'!
-
+
正在编译项目修改...
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
index 382f3c6e..d6e5c091 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
@@ -1227,7 +1227,7 @@
-
+
@@ -1235,7 +1235,7 @@
-
+
@@ -1245,7 +1245,7 @@
-
+
@@ -1277,7 +1277,7 @@
-
+
@@ -1302,13 +1302,13 @@
-
+
-
+
@@ -2716,18 +2716,18 @@
-
+
-
+
-
+
@@ -2747,7 +2747,7 @@
-
+
@@ -2757,7 +2757,7 @@
-
+
@@ -7030,7 +7030,12 @@
-
+
+
+
+
+
+
@@ -7335,7 +7340,7 @@
-
+
@@ -8002,7 +8007,7 @@
-
+
@@ -9077,7 +9082,7 @@
-
+