- fix: compiler settings not correctly saved
This commit is contained in:
parent
f258f56117
commit
9545ad9b6f
1
NEWS.md
1
NEWS.md
|
@ -13,6 +13,7 @@ Red Panda C++ Version 1.1.0
|
|||
- enhancement: hide all menu actions in the option dialog's shortcut panel
|
||||
- enhancement: add 'run all problem cases' / 'run current problem case' / 'batch set cases' to the option dialog's shortcut panel
|
||||
- enhancement: more templates for raylib
|
||||
- fix: compiler settings not correctly saved
|
||||
|
||||
Red Panda C++ Version 1.0.10
|
||||
- fix: modify watch doesn't work
|
||||
|
|
|
@ -2229,11 +2229,12 @@ void MainWindow::buildContextMenus()
|
|||
this, &MainWindow::onLstProblemSetContextMenu);
|
||||
mProblem_Properties = createActionFor(
|
||||
tr("Properties..."),
|
||||
ui->lstProblemSet
|
||||
this
|
||||
);
|
||||
mProblem_Properties->setObjectName("Probelm_Properties");
|
||||
mProblem_Properties->setObjectName("actionProbelm_Properties");
|
||||
connect(mProblem_Properties, &QAction::triggered, this,
|
||||
&MainWindow::onProblemProperties);
|
||||
|
||||
mProblem_OpenSource=createActionFor(
|
||||
tr("Open Source File"),
|
||||
ui->lstProblemSet
|
||||
|
@ -2247,7 +2248,7 @@ void MainWindow::buildContextMenus()
|
|||
this, &MainWindow::onTableProblemCasesContextMenu);
|
||||
mProblem_RunAllCases = createActionFor(
|
||||
tr("Run All Cases"),
|
||||
ui->tblProblemCases
|
||||
this
|
||||
);
|
||||
mProblem_RunAllCases->setObjectName("Problem_RunAllCases");
|
||||
connect(mProblem_RunAllCases, &QAction::triggered, this,
|
||||
|
@ -2255,7 +2256,7 @@ void MainWindow::buildContextMenus()
|
|||
|
||||
mProblem_RunCurrentCase = createActionFor(
|
||||
tr("Run Current Case"),
|
||||
ui->tblProblemCases
|
||||
this
|
||||
);
|
||||
mProblem_RunCurrentCase->setObjectName("Problem_RunCurrentCases");
|
||||
connect(mProblem_RunCurrentCase, &QAction::triggered, this,
|
||||
|
@ -2263,7 +2264,7 @@ void MainWindow::buildContextMenus()
|
|||
|
||||
mProblem_batchSetCases = createActionFor(
|
||||
tr("Batch Set Cases"),
|
||||
ui->tblProblemCases);
|
||||
this);
|
||||
mProblem_batchSetCases->setObjectName("Problem_BatchSetCases");
|
||||
connect(mProblem_batchSetCases, &QAction::triggered, this,
|
||||
&MainWindow::onProblemBatchSetCases);
|
||||
|
@ -3260,12 +3261,16 @@ void MainWindow::onProblemNameChanged(int index)
|
|||
|
||||
void MainWindow::onProblemRunCurrentCase()
|
||||
{
|
||||
if (!ui->tblProblemCases->currentIndex().isValid())
|
||||
return;
|
||||
showHideMessagesTab(ui->tabProblem,ui->actionProblem);
|
||||
applyCurrentProblemCaseChanges();
|
||||
runExecutable(RunType::CurrentProblemCase);
|
||||
}
|
||||
|
||||
void MainWindow::onProblemBatchSetCases()
|
||||
{
|
||||
showHideMessagesTab(ui->tabProblem,ui->actionProblem);
|
||||
if (mOJProblemModel.count()>0 && QMessageBox::question(this,tr("Batch Set Cases"),
|
||||
tr("This operation will remove all cases for the current problem.")
|
||||
+"<br />"
|
||||
|
@ -3522,6 +3527,7 @@ void MainWindow::onFilesViewRename() {
|
|||
|
||||
void MainWindow::onProblemProperties()
|
||||
{
|
||||
showHideMessagesTab(ui->tabProblem,ui->actionProblem);
|
||||
QModelIndex idx = ui->lstProblemSet->currentIndex();
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
|
@ -6864,6 +6870,9 @@ void MainWindow::on_btnAddProblemCase_clicked()
|
|||
|
||||
void MainWindow::on_btnRunAllProblemCases_clicked()
|
||||
{
|
||||
if (mOJProblemModel.count()<=0)
|
||||
return;
|
||||
showHideMessagesTab(ui->tabProblem,ui->actionProblem);
|
||||
applyCurrentProblemCaseChanges();
|
||||
runExecutable(RunType::ProblemCases);
|
||||
}
|
||||
|
|
|
@ -2682,6 +2682,9 @@ void Settings::CompilerSets::saveSet(int index)
|
|||
savePath("profiler", pSet->profiler());
|
||||
|
||||
mSettings->mSettings.remove("Options");
|
||||
foreach(const PCompilerOption& option, pCompilerInfoManager->getCompilerOptions(pSet->compilerType())) {
|
||||
mSettings->mSettings.remove(option->key);
|
||||
}
|
||||
// Save option string
|
||||
for (const QString& optionKey : pSet->compileOptions().keys()) {
|
||||
mSettings->mSettings.setValue(optionKey, pSet->compileOptions().value(optionKey));
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="settingTabs">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>false</bool>
|
||||
|
|
Loading…
Reference in New Issue