summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-01-30 15:29:56 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-09 22:11:13 +0100
commitaf93c70de72f6bcea948b43e8f7bf50dad8face3 (patch)
tree0c45803d408165cd0678b311671b45358c3aa29f
parent41914453d38d01b9b69e16ccee69444d1a304bf7 (diff)
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>
-rw-r--r--qmake/project.cpp14
-rw-r--r--qmake/project.h3
2 files changed, 8 insertions, 9 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index fbeb033b86..f8b24bb097 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -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
diff --git a/qmake/project.h b/qmake/project.h
index 83174455d1..7a9cc1eae4 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -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);