summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2009-06-24 00:43:38 (GMT)
committerKeith Isdale <keith.isdale@nokia.com>2009-06-24 00:43:38 (GMT)
commit07d3055a7402ba58bc299e79b96808c8025e33de (patch)
treed59f8ce6a71f2175c84d7947d83f400d575bbbc7 /qmake
parent688454f4fa508e5262786070a149f604156d5197 (diff)
downloadQt-07d3055a7402ba58bc299e79b96808c8025e33de.zip
Qt-07d3055a7402ba58bc299e79b96808c8025e33de.tar.gz
Qt-07d3055a7402ba58bc299e79b96808c8025e33de.tar.bz2
Do not crash qmake if MAKEFILE_GENERATOR is not defined in a loaded .pr* file
If there is a issue loading the usual .pr* files do not crash qmake. Print out a useful warning if MAKEFILE_GENERATOR is not defined by a loaded .pr* file. Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/metamakefile.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 233e8e5..7f4e914 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -136,7 +136,12 @@ BuildsMetaMakefileGenerator::init()
Build *build = new Build;
build->name = name;
build->makefile = createMakefileGenerator(project, false);
- makefiles += build;
+ if (build->makefile){
+ makefiles += build;
+ }else {
+ delete build;
+ return false;
+ }
}
return true;
}
@@ -437,7 +442,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
QString gen = proj->first("MAKEFILE_GENERATOR");
if(gen.isEmpty()) {
- fprintf(stderr, "No generator specified in config file: %s\n",
+ fprintf(stderr, "MAKEFILE_GENERATOR variable not set as a result of parsing : %s. Possibly qmake was not able to find files included using \"include(..)\" - enable qmake debugging to investigate more.\n",
proj->projectFile().toLatin1().constData());
} else if(gen == "UNIX") {
mkfile = new UnixMakefileGenerator;