diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-05-18 22:56:05 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-05-22 12:31:07 +0000 |
commit | eb78330fcf98e56968ae5d436d17bc114b8a4890 (patch) | |
tree | c90f832f2da1eede2e04745fbf45d9f4f9f29a4e /share/qbs/modules/protobuf/cpp/protobufcpp.qbs | |
parent | 9facadbb0e7b6032daac736f5a3084e9ea3c96ba (diff) |
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 <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/protobuf/cpp/protobufcpp.qbs')
-rw-r--r-- | share/qbs/modules/protobuf/cpp/protobufcpp.qbs | 14 |
1 files changed, 8 insertions, 6 deletions
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 { |