introduce PROEVALUATOR_FULL #define

if this is enabled, the evaluator implements all functionality
necessary for qmake. without it, functionality which is unnecessary or
outright dangerous in qt creator or lupdate context is omitted.

Change-Id: I233cfa6daf2e4451f9f1d3d14711be2a7cfe4293
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-06-28 17:54:27 +02:00
parent 9067399e37
commit aca1c4bd50
2 changed files with 4 additions and 2 deletions

View File

@@ -1044,8 +1044,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
// ### Consider real termination in non-cumulative mode
return returnBool(function != QLatin1String("error"));
}
#if 0 // Way too dangerous to enable.
#ifdef PROEVALUATOR_FULL
case T_SYSTEM: {
if (m_cumulative) // Anything else would be insanity
return ReturnFalse;
if (args.count() != 1) {
evalError(fL1S("system(exec) requires one argument."));
return ReturnFalse;

View File

@@ -23,4 +23,4 @@ DEFINES += QMAKE_BUILTIN_PRFS
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
DEFINES += PROEVALUATOR_CUMULATIVE PROEVALUATOR_INIT_PROPS
DEFINES += PROEVALUATOR_FULL PROEVALUATOR_CUMULATIVE PROEVALUATOR_INIT_PROPS