- fix: Project's file encoding is wrongly set to 'AUTO' when load project.
This commit is contained in:
parent
0f746957a5
commit
dbc9a1829c
1
NEWS.md
1
NEWS.md
|
@ -8,6 +8,7 @@ Red Panda C++ Version 2.9
|
|||
- enhancement: Auto backup editing contents. (Save editing contents 3 seconds after input stopped. Auto delete when editor successfully closed)
|
||||
- enhancement: Add "Auto backup editing contents" option in options/editor/auto save
|
||||
- fix: rename project file will wrongly set it's encoding to 'ASCII';
|
||||
- fix: Project's file encoding is wrongly set to 'AUTO' when load project.
|
||||
|
||||
Red Panda C++ Version 2.8
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ void Project::open()
|
|||
newUnit->setBuildCmd(fromByteArray(ini.GetValue(groupName,"BuildCmd", "")));
|
||||
QByteArray defaultEncoding = toByteArray(mOptions.encoding);
|
||||
//Compatibility
|
||||
if (ini.GetBoolValue(groupName,"DetectEncoding",true)){
|
||||
if (ini.GetBoolValue(groupName,"DetectEncoding",false)){
|
||||
defaultEncoding = ENCODING_AUTO_DETECT;
|
||||
}
|
||||
|
||||
|
@ -767,7 +767,6 @@ bool Project::saveUnits()
|
|||
ini.SetValue(groupName,"FileEncoding", toByteArray(unit->encoding()));
|
||||
else
|
||||
ini.Delete(groupName,"FileEncoding");
|
||||
|
||||
}
|
||||
ini.SetLongValue("Project","UnitCount",count);
|
||||
ini.SaveFile(mFilename.toLocal8Bit());
|
||||
|
|
|
@ -1519,7 +1519,7 @@ void Settings::Editor::doLoad()
|
|||
mSyntaxCheckWhenLineChanged = boolValue("check_syntax_when_line_changed",true);
|
||||
|
||||
//auto save
|
||||
mEnableEditTempBackup = boolValue("enable_edit_temp_backup",true);
|
||||
mEnableEditTempBackup = boolValue("enable_edit_temp_backup", false);
|
||||
mEnableAutoSave = boolValue("enable_auto_save",false);
|
||||
mAutoSaveInterval = intValue("auto_save_interal",10);
|
||||
mAutoSaveTarget = static_cast<enum AutoSaveTarget>(
|
||||
|
|
Loading…
Reference in New Issue