- fix: ide failed to start, if there are errors in the compiler set settings
This commit is contained in:
parent
a2e514e98a
commit
b8f75cb337
1
NEWS.md
1
NEWS.md
|
@ -1,5 +1,6 @@
|
||||||
Version 0.9.1 For Dev-C++ 7 Beta
|
Version 0.9.1 For Dev-C++ 7 Beta
|
||||||
- enhancement: code completion suggestion for "__func__" variable
|
- enhancement: code completion suggestion for "__func__" variable
|
||||||
|
- fix: ide failed to start, if there are errors in the compiler set settings
|
||||||
|
|
||||||
Version 0.9.0 For Dev-C++ 7 Beta
|
Version 0.9.0 For Dev-C++ 7 Beta
|
||||||
- fix: control keys in the numpad doesn't work in the editor
|
- fix: control keys in the numpad doesn't work in the editor
|
||||||
|
|
|
@ -2393,11 +2393,19 @@ void Settings::CompilerSets::loadSets()
|
||||||
mDefaultIndex =mSettings->mSettings.value(SETTING_COMPILTER_SETS_DEFAULT_INDEX,-1).toInt();
|
mDefaultIndex =mSettings->mSettings.value(SETTING_COMPILTER_SETS_DEFAULT_INDEX,-1).toInt();
|
||||||
int listSize = mSettings->mSettings.value(SETTING_COMPILTER_SETS_COUNT,0).toInt();
|
int listSize = mSettings->mSettings.value(SETTING_COMPILTER_SETS_COUNT,0).toInt();
|
||||||
mSettings->mSettings.endGroup();
|
mSettings->mSettings.endGroup();
|
||||||
|
bool loadError = false;
|
||||||
for (int i=0;i<listSize;i++) {
|
for (int i=0;i<listSize;i++) {
|
||||||
PCompilerSet pSet=loadSet(i);
|
PCompilerSet pSet=loadSet(i);
|
||||||
|
if (!pSet) {
|
||||||
|
loadError = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
mList.push_back(pSet);
|
mList.push_back(pSet);
|
||||||
}
|
}
|
||||||
|
if (loadError) {
|
||||||
|
mList.clear();
|
||||||
|
mDefaultIndex = -1;
|
||||||
|
}
|
||||||
PCompilerSet pCurrentSet = defaultSet();
|
PCompilerSet pCurrentSet = defaultSet();
|
||||||
if (pCurrentSet) {
|
if (pCurrentSet) {
|
||||||
QString msg;
|
QString msg;
|
||||||
|
@ -2419,6 +2427,9 @@ void Settings::CompilerSets::loadSets()
|
||||||
mDefaultIndex = mList.size()-1;
|
mDefaultIndex = mList.size()-1;
|
||||||
pCurrentSet = defaultSet();
|
pCurrentSet = defaultSet();
|
||||||
if (!pCurrentSet) {
|
if (!pCurrentSet) {
|
||||||
|
mList.clear();
|
||||||
|
mDefaultIndex = -1;
|
||||||
|
saveSets();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
saveSet(mDefaultIndex);
|
saveSet(mDefaultIndex);
|
||||||
|
@ -2442,6 +2453,9 @@ void Settings::CompilerSets::loadSets()
|
||||||
findSets();
|
findSets();
|
||||||
pCurrentSet = defaultSet();
|
pCurrentSet = defaultSet();
|
||||||
if (!pCurrentSet) {
|
if (!pCurrentSet) {
|
||||||
|
mList.clear();
|
||||||
|
mDefaultIndex = -1;
|
||||||
|
saveSets();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
saveSets();
|
saveSets();
|
||||||
|
@ -2641,6 +2655,8 @@ Settings::PCompilerSet Settings::CompilerSets::loadSet(int index)
|
||||||
|
|
||||||
mSettings->mSettings.endGroup();
|
mSettings->mSettings.endGroup();
|
||||||
|
|
||||||
|
if (pSet->binDirs().isEmpty())
|
||||||
|
return PCompilerSet();
|
||||||
pSet->setDirectories(pSet->binDirs()[0]);
|
pSet->setDirectories(pSet->binDirs()[0]);
|
||||||
pSet->setDefines();
|
pSet->setDefines();
|
||||||
return pSet;
|
return pSet;
|
||||||
|
|
Loading…
Reference in New Issue