- 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: 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
|
- 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: 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
|
Red Panda C++ Version 2.8
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ void Project::open()
|
||||||
newUnit->setBuildCmd(fromByteArray(ini.GetValue(groupName,"BuildCmd", "")));
|
newUnit->setBuildCmd(fromByteArray(ini.GetValue(groupName,"BuildCmd", "")));
|
||||||
QByteArray defaultEncoding = toByteArray(mOptions.encoding);
|
QByteArray defaultEncoding = toByteArray(mOptions.encoding);
|
||||||
//Compatibility
|
//Compatibility
|
||||||
if (ini.GetBoolValue(groupName,"DetectEncoding",true)){
|
if (ini.GetBoolValue(groupName,"DetectEncoding",false)){
|
||||||
defaultEncoding = ENCODING_AUTO_DETECT;
|
defaultEncoding = ENCODING_AUTO_DETECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,7 +767,6 @@ bool Project::saveUnits()
|
||||||
ini.SetValue(groupName,"FileEncoding", toByteArray(unit->encoding()));
|
ini.SetValue(groupName,"FileEncoding", toByteArray(unit->encoding()));
|
||||||
else
|
else
|
||||||
ini.Delete(groupName,"FileEncoding");
|
ini.Delete(groupName,"FileEncoding");
|
||||||
|
|
||||||
}
|
}
|
||||||
ini.SetLongValue("Project","UnitCount",count);
|
ini.SetLongValue("Project","UnitCount",count);
|
||||||
ini.SaveFile(mFilename.toLocal8Bit());
|
ini.SaveFile(mFilename.toLocal8Bit());
|
||||||
|
|
|
@ -1519,7 +1519,7 @@ void Settings::Editor::doLoad()
|
||||||
mSyntaxCheckWhenLineChanged = boolValue("check_syntax_when_line_changed",true);
|
mSyntaxCheckWhenLineChanged = boolValue("check_syntax_when_line_changed",true);
|
||||||
|
|
||||||
//auto save
|
//auto save
|
||||||
mEnableEditTempBackup = boolValue("enable_edit_temp_backup",true);
|
mEnableEditTempBackup = boolValue("enable_edit_temp_backup", false);
|
||||||
mEnableAutoSave = boolValue("enable_auto_save",false);
|
mEnableAutoSave = boolValue("enable_auto_save",false);
|
||||||
mAutoSaveInterval = intValue("auto_save_interal",10);
|
mAutoSaveInterval = intValue("auto_save_interal",10);
|
||||||
mAutoSaveTarget = static_cast<enum AutoSaveTarget>(
|
mAutoSaveTarget = static_cast<enum AutoSaveTarget>(
|
||||||
|
|
Loading…
Reference in New Issue