Loading src/config.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -543,6 +543,7 @@ class Config } } private: private: void checkFileName(const char *); QList<ConfigOption> *m_options; QList<ConfigOption> *m_options; QList<ConfigOption> *m_obsolete; QList<ConfigOption> *m_obsolete; QList<ConfigOption> *m_disabled; QList<ConfigOption> *m_disabled; Loading src/config.l +14 −1 Original line number Original line Diff line number Diff line Loading @@ -285,7 +285,7 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const } } else if (opt->kind()!=ConfigOption::O_Bool) else if (opt->kind()!=ConfigOption::O_Bool) { { config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name); exit(1); exit(1); } } return *((ConfigBool *)opt)->valueRef(); return *((ConfigBool *)opt)->valueRef(); Loading Loading @@ -1045,6 +1045,18 @@ static void cleanUpPaths(QStrList &str) } } } } void Config::checkFileName(const char *optionName) { QCString &s = Config_getString(optionName); QCString val = s.stripWhiteSpace().lower(); if ((val=="yes" || val=="true" || val=="1" || val=="all") || (val=="no" || val=="false" || val=="0" || val=="none")) { config_err("Error: file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data()); s=""; // note tihe use of &s above: this will change the option value! } } void Config::check() void Config::check() { { //if (!projectName.isEmpty()) //if (!projectName.isEmpty()) Loading Loading @@ -1536,6 +1548,7 @@ void Config::check() Config_getBool("EXTRACT_PACKAGE") = TRUE; Config_getBool("EXTRACT_PACKAGE") = TRUE; } } checkFileName("GENERATE_TAGFILE"); } } void Config::init() void Config::init() Loading Loading
src/config.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -543,6 +543,7 @@ class Config } } private: private: void checkFileName(const char *); QList<ConfigOption> *m_options; QList<ConfigOption> *m_options; QList<ConfigOption> *m_obsolete; QList<ConfigOption> *m_obsolete; QList<ConfigOption> *m_disabled; QList<ConfigOption> *m_disabled; Loading
src/config.l +14 −1 Original line number Original line Diff line number Diff line Loading @@ -285,7 +285,7 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const } } else if (opt->kind()!=ConfigOption::O_Bool) else if (opt->kind()!=ConfigOption::O_Bool) { { config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name); exit(1); exit(1); } } return *((ConfigBool *)opt)->valueRef(); return *((ConfigBool *)opt)->valueRef(); Loading Loading @@ -1045,6 +1045,18 @@ static void cleanUpPaths(QStrList &str) } } } } void Config::checkFileName(const char *optionName) { QCString &s = Config_getString(optionName); QCString val = s.stripWhiteSpace().lower(); if ((val=="yes" || val=="true" || val=="1" || val=="all") || (val=="no" || val=="false" || val=="0" || val=="none")) { config_err("Error: file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data()); s=""; // note tihe use of &s above: this will change the option value! } } void Config::check() void Config::check() { { //if (!projectName.isEmpty()) //if (!projectName.isEmpty()) Loading Loading @@ -1536,6 +1548,7 @@ void Config::check() Config_getBool("EXTRACT_PACKAGE") = TRUE; Config_getBool("EXTRACT_PACKAGE") = TRUE; } } checkFileName("GENERATE_TAGFILE"); } } void Config::init() void Config::init() Loading