- fix: "Run all problem cases" with project is not correctly handled.
This commit is contained in:
parent
7a8a239dfc
commit
fbe051f709
1
NEWS.md
1
NEWS.md
|
@ -14,6 +14,7 @@ Red Panda C++ Version 2.19
|
||||||
- enhancement: Use key sequences as shortcut to actions in the options dialog's environment->shortcut page.
|
- enhancement: Use key sequences as shortcut to actions in the options dialog's environment->shortcut page.
|
||||||
- change: Use ctrl+shift+S as the shortcut for "save as".
|
- change: Use ctrl+shift+S as the shortcut for "save as".
|
||||||
- change: Use ctrl+K,ctrl+S as the shortcut for "save all".
|
- change: Use ctrl+K,ctrl+S as the shortcut for "save all".
|
||||||
|
- fix: "Run all problem cases" with project is not correctly handled.
|
||||||
|
|
||||||
Red Panda C++ Version 2.18
|
Red Panda C++ Version 2.18
|
||||||
|
|
||||||
|
|
|
@ -2088,7 +2088,7 @@ void MainWindow::runExecutable(RunType runType)
|
||||||
//if project options changed, or units added/removed
|
//if project options changed, or units added/removed
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunNormal;
|
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->executable();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
|
@ -2099,7 +2099,7 @@ void MainWindow::runExecutable(RunType runType)
|
||||||
//if units modified;
|
//if units modified;
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunNormal;
|
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->executable();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
|
@ -7902,16 +7902,7 @@ void MainWindow::doCompileRun(RunType runType)
|
||||||
}
|
}
|
||||||
mCompileSuccessionTask = std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask = std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
switch (runType) {
|
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
||||||
case RunType::CurrentProblemCase:
|
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunCurrentProblemCase;
|
|
||||||
break;
|
|
||||||
case RunType::ProblemCases:
|
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunProblemCases;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunNormal;
|
|
||||||
}
|
|
||||||
compile();
|
compile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8549,6 +8540,18 @@ void MainWindow::switchCurrentStackTrace(int idx)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainWindow::CompileSuccessionTaskType MainWindow::runTypeToCompileSuccessionTaskType(RunType runType)
|
||||||
|
{
|
||||||
|
switch (runType) {
|
||||||
|
case RunType::CurrentProblemCase:
|
||||||
|
return CompileSuccessionTaskType::RunCurrentProblemCase;
|
||||||
|
case RunType::ProblemCases:
|
||||||
|
return CompileSuccessionTaskType::RunProblemCases;
|
||||||
|
default:
|
||||||
|
return CompileSuccessionTaskType::RunNormal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionTool_Window_Bars_triggered()
|
void MainWindow::on_actionTool_Window_Bars_triggered()
|
||||||
{
|
{
|
||||||
|
|
|
@ -231,6 +231,8 @@ public:
|
||||||
|
|
||||||
void switchCurrentStackTrace(int idx);
|
void switchCurrentStackTrace(int idx);
|
||||||
|
|
||||||
|
static CompileSuccessionTaskType runTypeToCompileSuccessionTaskType(RunType runType);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void logToolsOutput(const QString& msg);
|
void logToolsOutput(const QString& msg);
|
||||||
void onCompileIssue(PCompileIssue issue);
|
void onCompileIssue(PCompileIssue issue);
|
||||||
|
|
|
@ -4956,7 +4956,7 @@ Are you really want to continue?</oldsource>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2132"/>
|
<location filename="../mainwindow.ui" line="2132"/>
|
||||||
<source>Ctrl+K, Ctrl+S</source>
|
<source>Ctrl+K, Ctrl+S</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2259"/>
|
<location filename="../mainwindow.ui" line="2259"/>
|
||||||
|
@ -10765,7 +10765,7 @@ Are you really want to continue?</oldsource>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../toolsmanager.cpp" line="51"/>
|
<location filename="../toolsmanager.cpp" line="51"/>
|
||||||
<source>Open compiled in explorer</source>
|
<source>Open compiled in explorer</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>在文件管理器中打开编译结果</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../toolsmanager.cpp" line="64"/>
|
<location filename="../toolsmanager.cpp" line="64"/>
|
||||||
|
|
Loading…
Reference in New Issue