- enhancement: use project's compiler set type info to find a nearest system compiler set, when the project compiler set is not valid.

- fix: toolbar's compiler set info not correctly updated when change it in the project settings dialog.
This commit is contained in:
royqh1979 2021-10-25 21:59:01 +08:00
parent a3c335eed6
commit 4f2b87662f
3 changed files with 13 additions and 1 deletions

View File

@ -16,6 +16,8 @@ Version 0.7.3
- enhancement: prompt for filename when create new project unit file - enhancement: prompt for filename when create new project unit file
- fix: options not correctly set when change compiler set in the project settings - fix: options not correctly set when change compiler set in the project settings
- change: reset compiler settings when change the project compiler set - change: reset compiler settings when change the project compiler set
- enhancement: use project's compiler set type info to find a nearest system compiler set, when the project compiler set is not valid.
- fix: toolbar's compiler set info not correctly updated when change it in the project settings dialog.
Version 0.7.2 Version 0.7.2
- fix: rainbow parenthesis stop functioning when change editor's general options - fix: rainbow parenthesis stop functioning when change editor's general options

View File

@ -4108,6 +4108,7 @@ void MainWindow::on_actionProject_options_triggered()
QString oldName = mProject->name(); QString oldName = mProject->name();
PSettingsDialog dialog = SettingsDialog::projectOptionDialog(); PSettingsDialog dialog = SettingsDialog::projectOptionDialog();
dialog->exec(); dialog->exec();
updateCompilerSet();
} }

View File

@ -1374,13 +1374,22 @@ void Project::loadOptions(SimpleIni& ini)
QMessageBox::Ok QMessageBox::Ok
); );
mOptions.compilerSet = pSettings->compilerSets().defaultIndex(); mOptions.compilerSet = pSettings->compilerSets().defaultIndex();
int compilerSetType = ini.GetLongValue("Project","CompilerSetType",-1);
if (compilerSetType>=0) {
for (int i=0;i<pSettings->compilerSets().size();i++) {
Settings::PCompilerSet pSet = pSettings->compilerSets().getSet(i);
if (pSet && pSet->compilerSetType() == compilerSetType) {
mOptions.compilerSet = i;
break;
}
}
}
setModified(true); setModified(true);
} }
mOptions.compilerOptions = ini.GetValue("Project", "CompilerSettings", ""); mOptions.compilerOptions = ini.GetValue("Project", "CompilerSettings", "");
mOptions.staticLink = ini.GetBoolValue("Project", "StaticLink", true); mOptions.staticLink = ini.GetBoolValue("Project", "StaticLink", true);
mOptions.addCharset = ini.GetBoolValue("Project", "AddCharset", true); mOptions.addCharset = ini.GetBoolValue("Project", "AddCharset", true);
mOptions.compilerSetType = ini.GetLongValue("Project","CompilerSetType",-1);
if (mOptions.compilerSetType<0) { if (mOptions.compilerSetType<0) {
updateCompilerSetType(); updateCompilerSetType();
} }