consolidate Read* options
this brings some clarity which combinations are actually possible, which allows for some optimization later on. Change-Id: I930027e426c5f9abea8d21eb1ebaa39bd29787b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
parent
41914453d3
commit
af93c70de7
@ -1284,7 +1284,7 @@ QMakeProject::read(uchar cmd)
|
||||
if(!Option::user_template_prefix.isEmpty())
|
||||
base_vars["TEMPLATE_PREFIX"] = QStringList(Option::user_template_prefix);
|
||||
|
||||
if(cmd & ReadCache && Option::mkfile::do_cache) { // parse the cache
|
||||
if ((cmd & ReadSetup) && Option::mkfile::do_cache) { // parse the cache
|
||||
int cache_depth = -1;
|
||||
QString qmake_cache = Option::mkfile::cachefile;
|
||||
if(qmake_cache.isEmpty()) { //find it as it has not been specified
|
||||
@ -1315,7 +1315,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cmd & ReadConf) { // parse mkspec
|
||||
if (cmd & ReadSetup) { // parse mkspec
|
||||
QString qmakespec = fixEnvVariables(Option::mkfile::qmakespec);
|
||||
QStringList mkspec_roots = qmake_mkspec_paths();
|
||||
debug_msg(2, "Looking for mkspec %s in (%s)", qmakespec.toLatin1().constData(),
|
||||
@ -1389,7 +1389,7 @@ QMakeProject::read(uchar cmd)
|
||||
vars["TARGET"].append(QFileInfo(pfile).baseName());
|
||||
|
||||
//before commandline
|
||||
if(cmd & ReadCmdLine) {
|
||||
if (cmd & ReadSetup) {
|
||||
cfile = pfile;
|
||||
parser.file = "(internal)";
|
||||
parser.from_file = false;
|
||||
@ -1406,7 +1406,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
|
||||
//commandline configs
|
||||
if(cmd & ReadConfigs && !Option::user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1421,7 +1421,7 @@ QMakeProject::read(uchar cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(cmd & ReadCmdLine) {
|
||||
if (cmd & ReadSetup) {
|
||||
parser.file = "(internal)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1437,7 +1437,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
|
||||
//after configs (set in BUILDS)
|
||||
if(cmd & ReadConfigs && !Option::after_user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::after_user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1447,7 +1447,7 @@ QMakeProject::read(uchar cmd)
|
||||
if(pfile != "-" && vars["TARGET"].isEmpty())
|
||||
vars["TARGET"].append(QFileInfo(pfile).baseName());
|
||||
|
||||
if(cmd & ReadConfigs && !Option::user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
|
@ -117,8 +117,7 @@ public:
|
||||
QMakeProject(QMakeProperty *p, const QHash<QString, QStringList> &nvars) { init(p, &nvars); }
|
||||
~QMakeProject();
|
||||
|
||||
enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08,
|
||||
ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF };
|
||||
enum { ReadProFile=0x01, ReadSetup=0x02, ReadFeatures=0x04, ReadAll=0xFF };
|
||||
inline bool parse(const QString &text) { return parse(text, vars); }
|
||||
bool read(const QString &project, uchar cmd=ReadAll);
|
||||
bool read(uchar cmd=ReadAll);
|
||||
|
Loading…
x
Reference in New Issue
Block a user