From 57d4b8f328a480ad837c518323c3af369a14d781 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Aug 2016 18:38:39 +0200 Subject: de-duplicate code relating to evaluation of 'negative' flags Change-Id: I3fe4816719d9b2885319a1bb516cfb137f13e3f8 Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 0a75c998b5..536ae2cd8a 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1363,8 +1363,7 @@ defineTest(qtConfOutputVar) { defineTest(qtConfOutputVarHelper) { negative = $$eval($${2}.negative) isEmpty(negative): negative = false - !$${3}:!$$negative: return() - $${3}:$$negative: return() + equals(3, $$negative): return() output = $$qtConfOutputSelectProFile($${2}) name = $$eval($${2}.name) @@ -1394,6 +1393,7 @@ defineTest(qtConfOutputConfigVar) { var = $$4 negative = $$eval($${1}.negative) isEmpty(negative): negative = false + equals(2, $$negative): return() val = $$eval($${1}.name) isEmpty(val) { @@ -1401,11 +1401,7 @@ defineTest(qtConfOutputConfigVar) { $$negative: val = no-$$val } - $${2} { - !$$negative: qtConfOutputVar(append, $$pro, $$var, $$val) - } else { - $$negative: qtConfOutputVar(append, $$pro, $$var, $$val) - } + qtConfOutputVar(append, $$pro, $$var, $$val) } defineTest(qtConfOutput_publicQtConfig) { @@ -1436,12 +1432,9 @@ defineTest(qtConfOutput_define) { negative = $$eval($${1}.negative) isEmpty(negative): negative = false + equals(2, $$negative): return() - $${2} { - !$$negative: qtConfOutputSetDefine($$output, $$define, $$value) - } else { - $$negative: qtConfOutputSetDefine($$output, $$define, $$value) - } + qtConfOutputSetDefine($$output, $$define, $$value) } defineTest(qtConfOutput_feature) { -- cgit v1.2.3