Commit ea436bd6 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Removed message, minor restructuring

parent 268da0c8
...@@ -1591,21 +1591,22 @@ void Config::check() ...@@ -1591,21 +1591,22 @@ void Config::check()
checkFileName("GENERATE_TAGFILE"); checkFileName("GENERATE_TAGFILE");
// sanity check if all depends relations are valid // disable any boolean options that depend on disabled options
QListIterator<ConfigOption> it = iterator(); QListIterator<ConfigOption> it = iterator();
ConfigOption *option; ConfigOption *option;
for (it.toFirst();(option=it.current());++it) for (it.toFirst();(option=it.current());++it)
{ {
QCString depName = option->dependsOn(); QCString depName = option->dependsOn(); // option has a dependency
if (!depName.isEmpty()) if (!depName.isEmpty())
{ {
ConfigOption * dep = Config::instance()->get(depName); ConfigOption * dep = Config::instance()->get(depName);
if (dep->kind()==ConfigOption::O_Bool if (dep->kind()==ConfigOption::O_Bool &&
&& Config_getBool(depName)==FALSE) Config_getBool(depName)==FALSE) // dependent option is disabled
{ {
msg("disabling %s since its dependency(%s) is also disabled\n",option->name().data(),depName.data());
if (option->kind()==ConfigOption::O_Bool) if (option->kind()==ConfigOption::O_Bool)
Config_getBool(option->name())=FALSE; {
Config_getBool(option->name())=FALSE; // also disable this option
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment