From eb78330fcf98e56968ae5d436d17bc114b8a4890 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Sat, 18 May 2019 22:56:05 +0200 Subject: Use validateFunc property in protobuf modules This allows to use more native .base property to call super class validate function. Change-Id: I0f68be8e5823796502c53d719a00825075666b43 Reviewed-by: Denis Shienkov Reviewed-by: Christian Kandeler --- share/qbs/modules/protobuf/cpp/protobufcpp.qbs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'share/qbs/modules/protobuf/cpp/protobufcpp.qbs') diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs index 5cb3257d4..2b6e94e83 100644 --- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs +++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs @@ -28,12 +28,14 @@ ProtobufBase { prepare: HelperFunctions.doPrepare(input.protobuf.cpp, product, input, outputs, "cpp") } - validate: { - baseValidate(); - if (!HelperFunctions.checkPath(includePath)) - throw "Can't find cpp protobuf include files. Please set the includePath property."; - if (!HelperFunctions.checkPath(libraryPath)) - throw "Can't find cpp protobuf library. Please set the libraryPath property."; + validateFunc: { + return function() { + base(); + if (!HelperFunctions.checkPath(includePath)) + throw "Can't find cpp protobuf include files. Please set the includePath property."; + if (!HelperFunctions.checkPath(libraryPath)) + throw "Can't find cpp protobuf library. Please set the libraryPath property."; + } } Probes.IncludeProbe { -- cgit v1.2.3