aboutsummaryrefslogtreecommitdiffstats
path: root/qbs-resources
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-04-04 22:01:57 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-04-21 14:59:16 +0000
commitbe4e5b79dcca141559eb7e8b88a107a556b4980d (patch)
treebc549ab30a3568ae447a5a561963140ac53da08b /qbs-resources
parentaf385fc34a98023ba2ab854f8890c6983ae57a3a (diff)
Enable QT_NO_CAST_FROM_BYTEARRAY
Silently casting QByteArray to char* is dangerous and it's hard to find an error in the code. Thus, forbid implicit casting and fix code accordingly. Change-Id: I216f1b19768ad529ff050df0e81bfc4ad10b7c00 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'qbs-resources')
-rw-r--r--qbs-resources/imports/QbsProduct.qbs6
1 files changed, 5 insertions, 1 deletions
diff --git a/qbs-resources/imports/QbsProduct.qbs b/qbs-resources/imports/QbsProduct.qbs
index b3a166e42..ed71f7e66 100644
--- a/qbs-resources/imports/QbsProduct.qbs
+++ b/qbs-resources/imports/QbsProduct.qbs
@@ -8,7 +8,11 @@ Product {
property bool install: true
property string targetInstallDir
cpp.defines: {
- var res = ["QT_NO_CAST_FROM_ASCII", "QT_NO_PROCESS_COMBINED_ARGUMENT_START"];
+ var res = [
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_FROM_BYTEARRAY",
+ "QT_NO_PROCESS_COMBINED_ARGUMENT_START"
+ ];
if (qbs.toolchain.contains("msvc"))
res.push("_SCL_SECURE_NO_WARNINGS");
if (qbs.enableDebugCode)